Skip to content

Commit 5e27336

Browse files
committed
chore(test.sh): skip aritfact setup if no current is specified
Some tests like style checks do not require artifacts to be present. Signed-off-by: Egor Lazarchuk <yegorlz@amazon.co.uk>
1 parent 3eeca8c commit 5e27336

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

tools/test.sh

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

34-
say "Copy CI artifacts to /srv, so hardlinks work"
35-
cp -ruvfL $(cat build/current_artifacts) /srv/current_artifacts
34+
if [ -f build/current_artifacts ]; then
35+
say "Copy CI artifacts to /srv, so hardlinks work"
36+
cp -ruvfL $(cat build/current_artifacts) /srv/current_artifacts
37+
else
38+
# The directory must exist for pytest to function
39+
mkdir -p /srv/current_artifacts
40+
say "Skipping setting up CI artifacts"
41+
fi
3642

3743
cd tests
3844
export PYTEST_ADDOPTS="${PYTEST_ADDOPTS:-} --pdbcls=IPython.terminal.debugger:TerminalPdb"

0 commit comments

Comments
 (0)