Skip to content

Commit dc57d46

Browse files
committed
fix(tests): clear test artifacts dir before test runs
Before each test run, we copy artifacts from the build/artifacts/ path to /srv/test_artifacts. This directory was not cleared up though, which led to issues with artifact A/B testing, where A's artifacts persisted and were selected by pytest over B's artifacts. To prevent this, clear the test artifacts dir at the beginning of each run. Signed-off-by: James Curtis <jxcurtis@amazon.co.uk>
1 parent 6383729 commit dc57d46

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tools/test.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ if [ "${FC_TEST_SKIP_ARTIFACT_COPY:-}" = "1" ]; then
3636
say "Skipping artifact copy (FC_TEST_SKIP_ARTIFACT_COPY=1)"
3737
elif [ -f build/current_artifacts ]; then
3838
say "Copy artifacts to /srv/test_artifacts, so hardlinks work"
39-
cp -ruvfL $(cat build/current_artifacts) /srv/test_artifacts
39+
rm -rf /srv/test_artifacts/*
40+
cp -rvfL $(cat build/current_artifacts)/. /srv/test_artifacts/
4041
else
4142
# The directory must exist for pytest to function
4243
mkdir -p /srv/test_artifacts

0 commit comments

Comments
 (0)