local test improvments#4037
Open
zhijianli88 wants to merge 5 commits into
Open
Conversation
The local test runner ./run_local_tests.sh invokes the mantle container with the scripts checkout mounted as /work. When using a git worktree for the scripts directory, git inside the container may see a .git/worktrees path that does not resolve correctly in that environment and fails with: ./run_local_tests.sh ================================= Using Mantle docker image 'ghcr.io/flatcar/mantle:git-ca80a2eaee4cc195ae6e17f9202c1d72e729d460' ================================= Running qemu_uefi tests git-ca80a2eaee4cc195ae6e17f9202c1d72e729d460: Pulling from flatcar/mantle Digest: sha256:cd37c1ba21b8051eb2632e171d4f1f9bc7e91708883575343265d3d58940d5df Status: Image is up to date for ghcr.io/flatcar/mantle:git-ca80a2eaee4cc195ae6e17f9202c1d72e729d460 fatal: not a git repository: ../flatcar/scripts/.git/worktrees/... git-ca80a2eaee4cc195ae6e17f9202c1d72e729d460: Pulling from flatcar/mantle Digest: sha256:cd37c1ba21b8051eb2632e171d4f1f9bc7e91708883575343265d3d58940d5df Status: Image is up to date for ghcr.io/flatcar/mantle:git-ca80a2eaee4cc195ae6e17f9202c1d72e729d460 zstd could not be found. unpacking container image may fail. ci-automation/tapfile_helper_lib.sh: line 167: __TESTS__/qemu_uefi/results-run-1.tap: No such file or directory The tests only need the precomputed git version and channel written on the host side, and do not require running git inside the mantle container. Remove the git safe.directory configuration from the test docker invocation so that the container no longer attempts to operate on the host worktree, avoiding failures in worktree-based setups while keeping CI behavior unchanged. Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
run_local_tests.sh wraps ci-automation/test.sh for local qemu_uefi and qemu_update testing, but it did not document its arguments or defaults. Add a usage header and a --help option that describe the ARCH, PARALLEL and TEST parameters so that developers can discover how to invoke the script and what behavior to expect without having to read through the implementation. Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
When working with the mantle image it is useful to inspect the set of available kola tests before running any local qemu_uefi or qemu_update runs, but run_local_tests.sh did not provide a way to query them. Add a --list-tests helper option that runs kola list --platform qemu in the configured mantle container and prints the result without starting any tests, allowing developers to quickly discover the test set from the same script they use to run local suites. Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Stop the retry flow when the vendor test runner does not produce a TAP file. This avoids handing an empty result to test_update_reruns.sh and makes the underlying failure visible earlier in the log. After this patch, when it failed to download the qemu image: $ ./run_local_tests.sh amd64 2 docker.base ================================= Using Mantle docker image 'ghcr.io/flatcar/mantle:git-ca80a2eaee4cc195ae6e17f9202c1d72e729d460' ================================= Running qemu_uefi tests git-ca80a2eaee4cc195ae6e17f9202c1d72e729d460: Pulling from flatcar/mantle Digest: sha256:cd37c1ba21b8051eb2632e171d4f1f9bc7e91708883575343265d3d58940d5df Status: Image is up to date for ghcr.io/flatcar/mantle:git-ca80a2eaee4cc195ae6e17f9202c1d72e729d460 zstd could not be found. unpacking container image may fail. ++++ Running qemu_uefi.sh inside __TESTS__/qemu_uefi ++++ ++++ qemu_uefi.sh: downloading /work/__build__/images/images/amd64-usr/latest/flatcar_production_image.bin for 4593.2.0+4-gbc1fd0010d (amd64) ++++ curl: (22) The requested URL returned error: 404 image_escaped: qemu_uefi.sh return 22, __TESTS__/qemu_uefi/results-run-1.tap ERROR: something went wrong, result is empty: __TESTS__/qemu_uefi/results-run-1.tap ########### All re-runs exhausted (5). Giving up. ########### Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
Drop --pull always when starting the rerun helper container. The rerun path should reuse the configured image instead of unconditionally refreshing it from the registry. This avoids unnecessary network pulls and keeps reruns predictable. Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix and improve the run_local_tests.sh and related scripts