From aba59d0a75b3548819c8cead9079c6718c2c622e Mon Sep 17 00:00:00 2001 From: xfiderek Date: Sat, 13 Jan 2024 13:45:58 +0100 Subject: [PATCH] Ensure that cobra is executed during tests (#103). Space ROS's main Earthfile's build-testing procedure is invoked in CI to push results of tests and static code analysis. Currently, for all packages cobra-autosar.sarif results are empty. This is because cobra or some dependent executables are not found when colcon test command is invoked. This commit prefixes the call to colcon test in the Earthfile by a call to source that brings all the necessary tools and dependencies into scope. --- spaceros/Earthfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spaceros/Earthfile b/spaceros/Earthfile index 192078d..7fadc64 100644 --- a/spaceros/Earthfile +++ b/spaceros/Earthfile @@ -153,7 +153,7 @@ build: build-testing: FROM +rosdep RUN colcon build --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_EXPORT_COMPILE_COMMANDS=ON --no-warn-unused-cli - RUN colcon test --retest-until-pass 2 --ctest-args -LE "(ikos|xfail)" --pytest-args -m "not xfail" + RUN . install/setup.sh && colcon test --retest-until-pass 2 --ctest-args -LE "(ikos|xfail)" --pytest-args -m "not xfail" RUN . install/setup.sh && ros2 run process_sarif make_build_archive COPY +vcs-exact/exact.repos install/exact.repos SAVE ARTIFACT log/build_results_archives/build_results_*.tar.bz2 AS LOCAL log/build_results_archives/