Skip to content

Commit f599f3b

Browse files
committed
checkstyle: skip artifact copy and consolidate into single pytest run
checkstyle ran three separate cmd_test invocations (style, doctests, clippy), each launching a container, copying 2.3GB of artifacts, and starting pytest. Style checks don't need artifacts at all. - Add FC_TEST_SKIP_ARTIFACT_COPY=1 support to test.sh - Set it in cmd_checkstyle to skip the artifact copy - Merge the three cmd_test calls into a single pytest invocation Signed-off-by: Riccardo Mancini <mancio@amazon.com>
1 parent f43c53d commit f599f3b

2 files changed

Lines changed: 12 additions & 5 deletions

File tree

tools/devtool

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,7 +1011,7 @@ cmd_test() {
10111011
say "$(sed '/^processor.*: 0$/,/^processor.*: 1$/!d; /^processor.*: 1$/d' /proc/cpuinfo)"
10121012
say "RPM firmware versions: $(rpm -q microcode_ctl amd-ucode-firmware linux-firmware)"
10131013

1014-
env |grep -P "^(AWS_EMF_|BUILDKITE|CODECOV_)" > env.list
1014+
env |grep -P "^(AWS_EMF_|BUILDKITE|CODECOV_|FC_TEST_)" > env.list
10151015
if [[ $performance_tweaks -eq 1 ]]; then
10161016
if [[ "$(uname --machine)" == "x86_64" ]]; then
10171017
say "Detected CI and performance tests, tuning CPU frequency scaling and idle states for reduced variability"
@@ -1230,9 +1230,13 @@ cmd_checkstyle() {
12301230
cmd_sh "git-secrets --register-aws && git-secrets --scan"
12311231
fi
12321232

1233-
cmd_test --no-build --no-kvm-check --no-build-dir-check --no-artifacts-check -- -n 4 --dist worksteal integration_tests/style || exit 1
1234-
cmd_test --no-build --no-kvm-check --no-build-dir-check --no-artifacts-check -- -n 4 --doctest-modules framework || exit 1
1235-
cmd_test --no-build --no-kvm-check --no-build-dir-check --no-artifacts-check -- integration_tests/build/test_clippy.py || exit 1
1233+
export FC_TEST_SKIP_ARTIFACT_COPY=1
1234+
cmd_test --no-build --no-kvm-check --no-build-dir-check --no-artifacts-check -- \
1235+
-n 4 --dist worksteal \
1236+
integration_tests/style \
1237+
integration_tests/build/test_clippy.py \
1238+
--doctest-modules framework \
1239+
|| exit 1
12361240
}
12371241

12381242
cmd_checkbuild() {

tools/test.sh

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

34-
if [ -f build/current_artifacts ]; then
34+
if [ "${FC_TEST_SKIP_ARTIFACT_COPY:-}" = "1" ]; then
35+
mkdir -p /srv/test_artifacts
36+
say "Skipping artifact copy (FC_TEST_SKIP_ARTIFACT_COPY=1)"
37+
elif [ -f build/current_artifacts ]; then
3538
say "Copy artifacts to /srv/test_artifacts, so hardlinks work"
3639
cp -ruvfL $(cat build/current_artifacts) /srv/test_artifacts
3740
else

0 commit comments

Comments
 (0)