Skip to content
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

Cherry-pick to earlgrey_1.0.0: [ci] Introduce a test orchestrator written in bazel #24868

Merged
merged 9 commits into from
Nov 21, 2024

Conversation

github-actions[bot]
Copy link

This is an automatic cherry-pick of #23505 to branch earlgrey_1.0.0.

@jwnrt
Copy link
Contributor

jwnrt commented Oct 24, 2024

Blocked on #24871

@jwnrt jwnrt force-pushed the backport-23505-to-earlgrey_1.0.0 branch 2 times, most recently from 5b1b7a8 to 9005cb4 Compare November 20, 2024 09:55
azure-pipelines.yml Outdated Show resolved Hide resolved
pamaury and others added 9 commits November 21, 2024 12:51
The commit fundamentally changes how tests are considered for running
in CI. Previously, any test not marked as "manual", "broken" and "skip_in_ci"
would be run in CI in all execution environment for which it is defined. We
then came up with some clever bazel queries to try and avoid running them
in multiple execution environment when not necessary but this is quite fragile.

The approach is very different: when creating the tests using opentitan_test,
we call a new function, called "ci_orchestrator" with the list of all exec_env
for which it is defined. This function then returns a subset of that list that
should be marked with skip_in_ci. The current implementation is that there is
a list of exec_env that are mutually-exclusive (_ONLY_RUN_ONE_IN_CI_SORTED)
and all but one will be skipped: the only one to run will the highest one in
the list. With this approach, we are guaranteed to never run duplicate tests.
If more complicated logic is required, it can always be added to this function.

As a byproduct of this, we can significantly simplify the filtering logic when
running FPGS jobs.

Signed-off-by: Amaury Pouly <[email protected]>
(cherry picked from commit 9d846d6)
The --test_tag_filters option of `bazel test` is very convenient
but is only available for testing and not for querying. This script
takes as input a list of tags in the same fort as test_tag_filters
and runs an equivalent bazel query to list all tests that match.

Signed-off-by: Amaury Pouly <[email protected]>
(cherry picked from commit e906405)
Those tests can run in the ROM_EXT stage which should be preferred.

Signed-off-by: Amaury Pouly <[email protected]>
(cherry picked from commit 8e828bf)
Previously we only tagged then with the exec_env name but for the CI
it is convenient to have a global way of querying all FPGA tests.

Signed-off-by: Amaury Pouly <[email protected]>
(cherry picked from commit 046356b)
With the filter tags filtering logic, it is very easily to create a
situation where some tests are run in several jobs, or to forget running
tests because of a non-exhaustive set of filters.

This commit adds a final CI job that checks the above condition. This
is achieved by downaloding the list of tests run by every job and then
making sure that there are no duplicates. We also check for missing tests
by running a query on all non-broken, non-manual, non-skip_in_ci FPGA tests.

Signed-off-by: Amaury Pouly <[email protected]>
(cherry picked from commit fb58259)
Those tests require the host interface to support serial break but
the CW310 used in the CI do not support it so they always fail. These
tests will need to be changed to the hyperdebug interface.

Signed-off-by: Amaury Pouly <[email protected]>
(cherry picked from commit 8a211ea)
The test rv_dm_mem_access_dev_rv_dm_delayed_enabled is broken.

Signed-off-by: Amaury Pouly <[email protected]>
(cherry picked from commit 1c44deb)
This wasn't present in the cherry-picked commits for the test
orchestrator, but was present on this branch before.

Signed-off-by: James Wainwright <[email protected]>
(commit is original to earlgrey_1.0.0)
@jwnrt jwnrt force-pushed the backport-23505-to-earlgrey_1.0.0 branch from 9005cb4 to b284c17 Compare November 21, 2024 12:52
@jwnrt
Copy link
Contributor

jwnrt commented Nov 21, 2024

CI failure looks like flakiness to me (//sw/device/silicon_creator/rom/e2e/bootstrap:e2e_bootstrap_rma_fpga_cw310_rom_with_fake_keys) and since CI is hugely queued I’m going to skip it and merge.

@jwnrt jwnrt merged commit 4085a43 into earlgrey_1.0.0 Nov 21, 2024
34 of 36 checks passed
@jwnrt jwnrt deleted the backport-23505-to-earlgrey_1.0.0 branch November 21, 2024 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants