ci: cram: check-for-crashes.t: make it really execute as the last test
Since we're running DUT specific tests after generic tests, its
possible, that some of them trigger crashes in the components, so we
really need to make sure, that check-for-crashes.t test is being run as
last one, thus move it under generic/post folder and make it run after
all tests via new `CRAM_TEST_SUITE_POST` environment variable.
Fixes: 7a5c6289e6be ("ci: cram: check-for-crashes.t: make it execute as the last test")
Signed-off-by: Petr Štetiar <petr.stetiar@prplfoundation.org>
This commit is contained in:
parent
3a444050ee
commit
582f3a8458
@ -31,6 +31,8 @@
|
||||
.gitlab/tests/cram/$DUT_BOARD/acceleration-plan-components
|
||||
.gitlab/tests/cram/generic
|
||||
.gitlab/tests/cram/$DUT_BOARD
|
||||
CRAM_TEST_SUITE_POST: |
|
||||
.gitlab/tests/cram/post/generic
|
||||
|
||||
before_script:
|
||||
- touch .run_failed
|
||||
@ -85,13 +87,27 @@
|
||||
- ssh root@$TARGET_LAN_IP "ubus call system board" | tee system-$LABGRID_TARGET.json
|
||||
|
||||
script:
|
||||
- >
|
||||
ssh root@$TARGET_LAN_IP 'f=$(logread | grep "procd.*init complete"); echo "${f:-Warning: init is not complete yet,} $(uptime -p)"' || true
|
||||
- ssh root@$TARGET_LAN_IP 'logger -t CI -p local0.info "Testing starts, $(uptime -p)"' || true
|
||||
- set -o pipefail
|
||||
- python3 -m cram --verbose $CRAM_TEST_SUITE $CRAM_TEST_SUITE_EXTRA | tee cram-result-$LABGRID_TARGET.txt
|
||||
- ssh root@$TARGET_LAN_IP 'logger -t CI -p local0.info "Testing finished, $(uptime -p)"' || true
|
||||
- rm .run_failed
|
||||
- |
|
||||
rm -fr .run_check_failed
|
||||
|
||||
run_check() {
|
||||
"$@" || {
|
||||
local statuses=("${PIPESTATUS[@]}")
|
||||
for status in "${statuses[@]}"; do
|
||||
if [ "$status" -ne 0 ]; then
|
||||
touch .run_check_failed
|
||||
fi
|
||||
done
|
||||
}
|
||||
}
|
||||
|
||||
run_check ssh root@$TARGET_LAN_IP 'f=$(logread | grep "procd.*init complete"); echo "${f:-Warning: init is not complete yet,} $(uptime -p)"'
|
||||
run_check ssh root@$TARGET_LAN_IP 'logger -t CI -p local0.info "Testing starts, $(uptime -p)"'
|
||||
run_check python3 -m cram --verbose $CRAM_TEST_SUITE $CRAM_TEST_SUITE_EXTRA | tee cram-result-$LABGRID_TARGET.txt
|
||||
run_check python3 -m cram --verbose $CRAM_TEST_SUITE_POST | tee --append cram-result-$LABGRID_TARGET.txt
|
||||
run_check ssh root@$TARGET_LAN_IP 'logger -t CI -p local0.info "Testing finished, $(uptime -p)"'
|
||||
|
||||
[ -f .run_check_failed ] && exit 1
|
||||
|
||||
after_script:
|
||||
- >
|
||||
|
||||
Loading…
Reference in New Issue
Block a user