Skip to content

Commit f86c6b1

Browse files
ashwinyesharman-kalra
authored andcommitted
ci: write status to output file
* Write status to output file. * Also add the option to continue on failure. Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com> Change-Id: I5515cfa288dd36a487591de306875faab7aa6db0 Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/dataplane/dpu-offload/+/140299 Tested-by: Harman Kalra <hkalra@marvell.com>
1 parent 97f823a commit f86c6b1

File tree

3 files changed

+31
-3
lines changed

3 files changed

+31
-3
lines changed

ci/test/env/cn10k-virtio-perf.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ source $PROJECT_ROOT/ci/test/env/cn10k.env
66

77
DAO_SUITE=dao-virtio
88

9+
# Continue testing regardless of failure
10+
CONTINUE_ON_FAILURE=1
11+
912
# List of perf tests to be run.
1013
RUN_TESTS="
1114
virtio_l2fwd_perf

ci/test/env/cn10k.env

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ CMD_EXTRA_ARGS=""
5555
# List of tests to be run. If list is empty all tests are run except those in SKIP_TESTS.
5656
RUN_TESTS=${RUN_TESTS:-}
5757

58+
# Continue testing regardless of failure
59+
CONTINUE_ON_FAILURE=${CONTINUE_ON_FAILURE:-}
60+
61+
# File to save status into
62+
STATUS_OUTFILE=${STATUS_OUTFILE:-}
63+
5864
FIXME_SKIP_TESTS=""
5965

6066
DEFAULT_SKIP_TESTS="

ci/test/ep/ep_test_run.sh

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ function run_all_tests()
8989
{
9090
local tst
9191
local res
92+
local failed_tests=""
93+
local passed_tests=""
94+
local skipped_tests=""
9295
local test_num=0
9396

9497
# Errors will be handled inline. No need for sig handler
@@ -100,22 +103,38 @@ function run_all_tests()
100103
test_num=$((test_num + 1))
101104
test_enabled $test_num
102105
res=$?
106+
tst=$(get_test_name $test_num)
103107
if [[ $res == 77 ]]; then
108+
skipped_tests="${skipped_tests}${tst}#"
104109
continue
105110
fi
106111
if [[ $res -ne 0 ]]; then
107112
break
108113
fi
109114

110-
tst=$(get_test_name $test_num)
111-
112115
# Run the tests
113116
run_test $tst
114117
res=$?
115118
if [[ $res -ne 0 ]] && [[ $res -ne 77 ]] ; then
116-
test_exit -1 "FAILURE: Test $tst failed"
119+
failed_tests="${failed_tests}${tst}#"
120+
if [[ -n $CONTINUE_ON_FAILURE ]]; then
121+
echo "FAILURE: Test $tst failed"
122+
else
123+
test_exit -1 "FAILURE: Test $tst failed"
124+
fi
125+
else
126+
passed_tests="${passed_tests}${tst}#"
117127
fi
118128
done
129+
130+
if [[ -n $STATUS_OUTFILE ]] ; then
131+
echo "FAILED: $failed_tests" > $STATUS_OUTFILE
132+
echo "PASSED: $passed_tests" >> $STATUS_OUTFILE
133+
echo "SKIPPED: $skipped_tests" >> $STATUS_OUTFILE
134+
fi
135+
if [[ -n $failed_tests ]]; then
136+
test_exit -1 "FAILURE: Test(s) [$failed_tests] failed"
137+
fi
119138
}
120139

121140
function test_exit()

0 commit comments

Comments
 (0)