-
Notifications
You must be signed in to change notification settings - Fork 10
feat: add QNX process configuration, schema, docs for TimeSlave reference Integration #158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
gordon9901
wants to merge
5
commits into
eclipse-score:main
Choose a base branch
from
gordon9901:ecarx_pr5_qnx_config_and_docs
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
adcc187
build: add ITF, rules_oci, rules_pkg and IFS toolchain
gordon9901 0c3a329
build: add json-schema-validator lint rule
gordon9901 c45c5d6
feat(time_slave): add JSON config, schema and parser
gordon9901 735ca7d
docs(time_slave): add QNX setup manual
gordon9901 1559010
test(time_slave): add QNX reference integration
gordon9901 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| """ | ||
| Creates "validate_json_schema_test" test rule which validates the input "json" file against its "schema" | ||
| """ | ||
|
|
||
| visibility(["//..."]) | ||
|
|
||
| def _impl(ctx): | ||
| script = """ | ||
| readonly expected_failure={expected_failure} | ||
| '{validator}' '{schema}' < '{json}' | ||
| readonly ret=$? | ||
| if test "$expected_failure" = true && test "$ret" -ne 0; then | ||
| exit 0 | ||
| elif test "$expected_failure" = false && test "$ret" -eq 0; then | ||
| exit 0 | ||
| fi | ||
| echo "Test Failed: Json validator performed json validation of '{json}' against '{schema}' schema with exit code $ret, meanwhile rule attribute 'expected_failure' is equal to '{expected_failure}'. | ||
| This means in case expected_failure=false then expected exit code should be zero (valid json). Otherwise, if expected_failure=true then exit code is non-zero (invalid json). | ||
| Note: by default expected_failure is false." | ||
| exit 1 | ||
| """.format( | ||
| validator = ctx.attr._validator.files_to_run.executable.short_path, | ||
| schema = ctx.file.schema.short_path, | ||
| json = ctx.file.json.short_path, | ||
| expected_failure = "true" if ctx.attr.expected_failure else "false", | ||
| ) | ||
|
|
||
| ctx.actions.write( | ||
| output = ctx.outputs.executable, | ||
| content = script, | ||
| ) | ||
|
|
||
| # To ensure the files needed by the script are available, put them in the runfiles | ||
| runfiles = ctx.runfiles(files = [ctx.file._validator, ctx.file.json, ctx.file.schema]) | ||
| return [DefaultInfo(runfiles = runfiles)] | ||
|
|
||
| validate_json_schema_test = rule( | ||
| implementation = _impl, | ||
| attrs = { | ||
| "expected_failure": attr.bool(default = False), | ||
| "json": attr.label( | ||
| allow_single_file = True, | ||
| mandatory = True, | ||
| ), | ||
| "schema": attr.label( | ||
| allow_single_file = True, | ||
| mandatory = True, | ||
| ), | ||
| "_validator": attr.label( | ||
| default = Label("@json_schema_validator"), | ||
| allow_single_file = True, | ||
| executable = True, | ||
| cfg = "exec", | ||
| ), | ||
| }, | ||
| test = True, | ||
| ) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| package(default_visibility = ["//visibility:public"]) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I don't think the default public visibility is a good idea. we should know, which of targets are public and which are not |
||
|
|
||
| exports_files(["time_slave_qnx_config.json"]) | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| { | ||
| "iface_name": "emac0", | ||
| "domain_number": 0, | ||
| "pdelay_req_interval_ms": 1000, | ||
| "pdelay_warmup_ms": 2000, | ||
| "sync_timeout_ms": 3300, | ||
| "jump_future_threshold_ns": 500000000, | ||
| "shm_path": "/gptp_shmem", | ||
| "phc": { | ||
| "enabled": true, | ||
| "device": "emac0", | ||
| "step_threshold_ns": 100000000 | ||
| }, | ||
| "qnx": { | ||
| "bpf_device_prefix": "/dev/bpf", | ||
| "see_sent": true | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| .. | ||
| # ******************************************************************************* | ||
| # Copyright (c) 2026 Contributors to the Eclipse Foundation | ||
| # | ||
| # See the NOTICE file(s) distributed with this work for additional | ||
| # information regarding copyright ownership. | ||
| # | ||
| # This program and the accompanying materials are made available under the | ||
| # terms of the Apache License Version 2.0 which is available at | ||
| # https://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # ******************************************************************************* | ||
|
|
||
| Manuals | ||
| ======= | ||
|
|
||
| .. toctree:: | ||
| :maxdepth: 1 | ||
|
|
||
| qnx_setup |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shall we put it to the https://github.com/eclipse-score/time/tree/main/tools ?