summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr/files/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-sota/aktualizr/files/run-ptest')
-rwxr-xr-xrecipes-sota/aktualizr/files/run-ptest16
1 files changed, 16 insertions, 0 deletions
diff --git a/recipes-sota/aktualizr/files/run-ptest b/recipes-sota/aktualizr/files/run-ptest
new file mode 100755
index 0000000..e5f0d56
--- /dev/null
+++ b/recipes-sota/aktualizr/files/run-ptest
@@ -0,0 +1,16 @@
1#!/bin/sh
2
3set -e
4
5filter_logs() {
6 awk '/^.*Test[[:space:]]*#[[:digit:]]+:/ {
7 a = gensub(/^.*Test[[:space:]]*#[[:digit:]]+:[[:space:]]*([^[:space:]]+).*(Passed|Skipped|Not Run|Failed|Timeout|Exception)[[:space:]:].*$/, "\\2: \\1", "g");
8 a = gensub(/^Passed/, "PASS", "g", a);
9 a = gensub(/^(Skipped|Disabled)/, "SKIP", "g", a);
10 a = gensub(/^(Not Run|Failed|Timeout|Exception)/, "FAIL", "g", a);
11 print a;
12 }'
13}
14
15cd build
16ctest -j 8 -O /tmp/aktualizr-ptest.log --output-on-failure -LE 'noptest' 2> /dev/null | filter_logs