summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJiaying Song <jiaying.song.cn@windriver.com>2024-07-19 15:30:49 +0800
committerArmin Kuster <akuster808@gmail.com>2024-07-23 15:24:57 -0400
commit80e01188fa822d87d301ee71973c462d7a865493 (patch)
tree0025dcc292a3f3c5ebd8dd8b6fd29b3f8d91aa8b
parent3ce9678aa5f8c0fab94212e795b3a3a085cabd39 (diff)
downloadmeta-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-ptest8
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
6LOG="${NFTABLESLIB}/ptest/nftables_ptest_$(date +%Y%m%d-%H%M%S).log" 6LOG="${NFTABLESLIB}/ptest/nftables_ptest_$(date +%Y%m%d-%H%M%S).log"
7NFT=nft 7NFT=nft
8tests/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}" 8tests/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
10passed=$(grep -c PASS: "${LOG}") 10passed=$(grep -c PASS: "${LOG}")
11failed=$(grep -c FAIL: "${LOG}") 11failed=$(grep -c FAIL: "${LOG}")
12all=$((passed + failed)) 12skiped=$(grep -c SKIP: "${LOG}")
13
14all=$((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}"