Skip to content

Commit a363aeb

Browse files
committed
chore(test): rename /srv/current_artifacts to /srv/test_artifacts
`current_artifacts` is a name of the FILE that contains a path to artifacts that should be used for test runs. Same name was used for a DIRECTORY within devctr that contained artifacts copied from a build/artifacts... To remove this confusion rename the directory inside devctr to test_artifacts. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent 8ea0f52 commit a363aeb

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

tests/framework/defs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,11 @@
3232

3333
SUPPORTED_HOST_KERNELS = ["5.10", "6.1"]
3434

35-
ARTIFACT_DIR = Path(DEFAULT_TEST_SESSION_ROOT_PATH) / "current_artifacts"
35+
# When pytest is run in the devctr the test.sh scipt copies artifacts (rootfs, guest kernels, etc)
36+
# to the /srv/test_artifacts within the container
37+
ARTIFACT_DIR = Path(DEFAULT_TEST_SESSION_ROOT_PATH) / "test_artifacts"
3638

37-
# fall-back to the local directory
39+
# Fall-back to the local directory if pytest was run without test.sh script
3840
if not ARTIFACT_DIR.exists():
3941
current_artifacts_dir = (
4042
(Path(LOCAL_BUILD_PATH) / "current_artifacts")

tools/test.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ if [ -f $CGROUP/cgroup.controllers -a -e $CGROUP/cgroup.type ]; then
3131
> $CGROUP/cgroup.subtree_control
3232
fi
3333

34-
say "Copy artifacts to /srv, so hardlinks work"
3534
if [ -f build/current_artifacts ]; then
36-
cp -ruvfL $(cat build/current_artifacts) /srv/current_artifacts
35+
say "Copy artifacts to /srv/test_artifacts, so hardlinks work"
36+
cp -ruvfL $(cat build/current_artifacts) /srv/test_artifacts
3737
else
3838
# The directory must exist for pytest to function
39-
mkdir -p /srv/current_artifacts
39+
mkdir -p /srv/test_artifacts
4040
say_warn "No current artifacts are set. Some tests might break"
4141
fi
4242

0 commit comments

Comments
 (0)