summaryrefslogtreecommitdiff
path: root/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest')
-rw-r--r--meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest17
1 files changed, 16 insertions, 1 deletions
diff --git a/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest b/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest
index 611b844853..27d780ace0 100644
--- a/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest
+++ b/meta-openembedded/meta-networking/recipes-filter/nftables/nftables/run-ptest
@@ -1,2 +1,17 @@
#!/bin/sh
-tests/shell/run-tests.sh -v
+
+NFTABLESLIB=@libdir@/nftables
+cd ${NFTABLESLIB}/ptest
+
+LOG="${NFTABLESLIB}/ptest/nftables_ptest_$(date +%Y%m%d-%H%M%S).log"
+tests/shell/run-tests.sh -v | sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: /' | sed "s,\x1B\[[0-9;]*[a-zA-Z],,g" | tee -a ${LOG}
+
+passed=`grep PASS: ${LOG}|wc -l`
+failed=`grep FAIL: ${LOG}|wc -l`
+all=$((passed + failed))
+
+( echo "=== Test Summary ==="
+ echo "TOTAL: ${all}"
+ echo "PASSED: ${passed}"
+ echo "FAILED: ${failed}"
+) | tee -a ${LOG}