diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2019-05-17 13:52:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-17 13:52:10 +0200 |
commit | 1ca755e32215de0a54d9bb221be862391b6c6756 (patch) | |
tree | acad00a07cefd63eafa02e1d8084602445fdd018 /recipes-sota/aktualizr/files/run-ptest | |
parent | 7824e3e9ac71300d7f5796ca7ab00c3b568f0578 (diff) | |
parent | 64733cc59737ad606f42874c5a825df1e2b3b1ff (diff) | |
download | meta-updater-1ca755e32215de0a54d9bb221be862391b6c6756.tar.gz |
Merge pull request #515 from advancedtelematic/fix/sumo/backport
Fix/sumo/backport
Diffstat (limited to 'recipes-sota/aktualizr/files/run-ptest')
-rwxr-xr-x | recipes-sota/aktualizr/files/run-ptest | 18 |
1 files changed, 18 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..ff441f9 --- /dev/null +++ b/recipes-sota/aktualizr/files/run-ptest | |||
@@ -0,0 +1,18 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | set -eu | ||
4 | |||
5 | AKTUALIZR_PTEST_PARALLEL_LEVEL=${AKTUALIZR_PTEST_PARALLEL_LEVEL:-2} | ||
6 | |||
7 | filter_logs() { | ||
8 | awk '/^.*Test[[:space:]]*#[[:digit:]]+:/ { | ||
9 | a = gensub(/^.*Test[[:space:]]*#[[:digit:]]+:[[:space:]]*([^[:space:]]+).*(Passed|Skipped|Not Run|Failed|Timeout|Exception)[[:space:]:].*$/, "\\2: \\1", "g"); | ||
10 | a = gensub(/^Passed/, "PASS", "g", a); | ||
11 | a = gensub(/^(Skipped|Disabled)/, "SKIP", "g", a); | ||
12 | a = gensub(/^(Not Run|Failed|Timeout|Exception)/, "FAIL", "g", a); | ||
13 | print a; | ||
14 | }' | ||
15 | } | ||
16 | |||
17 | cd build | ||
18 | ctest -j "$AKTUALIZR_PTEST_PARALLEL_LEVEL" -O /tmp/aktualizr-ptest.log --output-on-failure -LE 'noptest' 2> /dev/null | filter_logs | ||