diff options
author | Jiaying Song <jiaying.song.cn@windriver.com> | 2024-07-19 15:30:49 +0800 |
---|---|---|
committer | Armin Kuster <akuster808@gmail.com> | 2024-07-23 15:24:57 -0400 |
commit | 80e01188fa822d87d301ee71973c462d7a865493 (patch) | |
tree | 0025dcc292a3f3c5ebd8dd8b6fd29b3f8d91aa8b | |
parent | 3ce9678aa5f8c0fab94212e795b3a3a085cabd39 (diff) | |
download | meta-openembedded-80e01188fa822d87d301ee71973c462d7a865493.tar.gz |
nftables: change ptest output format
This change adds a simple format for the skip results.
The format selected is the automake "simple test" format:
"result: testname"
Signed-off-by: Jiaying Song <jiaying.song.cn@windriver.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
-rw-r--r-- | meta-networking/recipes-filter/nftables/nftables/run-ptest | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/meta-networking/recipes-filter/nftables/nftables/run-ptest b/meta-networking/recipes-filter/nftables/nftables/run-ptest index 32ddf9f455..55e801f67c 100644 --- a/meta-networking/recipes-filter/nftables/nftables/run-ptest +++ b/meta-networking/recipes-filter/nftables/nftables/run-ptest | |||
@@ -5,14 +5,18 @@ cd ${NFTABLESLIB}/ptest || exit 1 | |||
5 | 5 | ||
6 | LOG="${NFTABLESLIB}/ptest/nftables_ptest_$(date +%Y%m%d-%H%M%S).log" | 6 | LOG="${NFTABLESLIB}/ptest/nftables_ptest_$(date +%Y%m%d-%H%M%S).log" |
7 | NFT=nft | 7 | NFT=nft |
8 | tests/shell/run-tests.sh -v | sed -E '/I: \[OK\]/ s/^/PASS: / ; /W: \[(CHK DUMP|VALGRIND|TAINTED|DUMP FAIL|FAILED)\]/ s/^/FAIL: /' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | tee -a "${LOG}" | 8 | tests/shell/run-tests.sh -v | sed -E '/I: \[OK\]/ s/^/PASS: / ; /W: \[(CHK DUMP|VALGRIND|TAINTED|DUMP FAIL|FAILED)\]/ s/^/FAIL: / ; /I: \[SKIPPED\]/ s/^/SKIP: /' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | tee -a "${LOG}" |
9 | 9 | ||
10 | passed=$(grep -c PASS: "${LOG}") | 10 | passed=$(grep -c PASS: "${LOG}") |
11 | failed=$(grep -c FAIL: "${LOG}") | 11 | failed=$(grep -c FAIL: "${LOG}") |
12 | all=$((passed + failed)) | 12 | skiped=$(grep -c SKIP: "${LOG}") |
13 | |||
14 | all=$((passed + failed + skiped)) | ||
13 | 15 | ||
14 | ( echo "=== Test Summary ===" | 16 | ( echo "=== Test Summary ===" |
15 | echo "TOTAL: ${all}" | 17 | echo "TOTAL: ${all}" |
16 | echo "PASSED: ${passed}" | 18 | echo "PASSED: ${passed}" |
17 | echo "FAILED: ${failed}" | 19 | echo "FAILED: ${failed}" |
20 | echo "SKIPED: ${skiped}" | ||
21 | echo "====================" | ||
18 | ) | tee -a "${LOG}" | 22 | ) | tee -a "${LOG}" |