From 4864f5913baccb567e768f647b41f58974283532 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Thu, 28 Feb 2019 14:51:08 +0100 Subject: Add working ptest suite for aktualizr Signed-off-by: Laurent Bonnans --- recipes-sota/aktualizr/files/run-ptest | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100755 recipes-sota/aktualizr/files/run-ptest (limited to 'recipes-sota/aktualizr/files/run-ptest') 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 @@ +#!/bin/sh + +set -e + +filter_logs() { + awk '/^.*Test[[:space:]]*#[[:digit:]]+:/ { + a = gensub(/^.*Test[[:space:]]*#[[:digit:]]+:[[:space:]]*([^[:space:]]+).*(Passed|Skipped|Not Run|Failed|Timeout|Exception)[[:space:]:].*$/, "\\2: \\1", "g"); + a = gensub(/^Passed/, "PASS", "g", a); + a = gensub(/^(Skipped|Disabled)/, "SKIP", "g", a); + a = gensub(/^(Not Run|Failed|Timeout|Exception)/, "FAIL", "g", a); + print a; + }' +} + +cd build +ctest -j 8 -O /tmp/aktualizr-ptest.log --output-on-failure -LE 'noptest' 2> /dev/null | filter_logs -- cgit v1.2.3-54-g00ecf From 9a09ca0dbe25c370e58ba2dd4cc20a4ee8b3fb28 Mon Sep 17 00:00:00 2001 From: Laurent Bonnans Date: Wed, 10 Apr 2019 10:15:08 +0200 Subject: Parametrizable AKTUALIZR_PTEST_PARALLEL_LEVEL Signed-off-by: Laurent Bonnans --- recipes-sota/aktualizr/files/run-ptest | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'recipes-sota/aktualizr/files/run-ptest') diff --git a/recipes-sota/aktualizr/files/run-ptest b/recipes-sota/aktualizr/files/run-ptest index e5f0d56..ff441f9 100755 --- a/recipes-sota/aktualizr/files/run-ptest +++ b/recipes-sota/aktualizr/files/run-ptest @@ -1,6 +1,8 @@ #!/bin/sh -set -e +set -eu + +AKTUALIZR_PTEST_PARALLEL_LEVEL=${AKTUALIZR_PTEST_PARALLEL_LEVEL:-2} filter_logs() { awk '/^.*Test[[:space:]]*#[[:digit:]]+:/ { @@ -13,4 +15,4 @@ filter_logs() { } cd build -ctest -j 8 -O /tmp/aktualizr-ptest.log --output-on-failure -LE 'noptest' 2> /dev/null | filter_logs +ctest -j "$AKTUALIZR_PTEST_PARALLEL_LEVEL" -O /tmp/aktualizr-ptest.log --output-on-failure -LE 'noptest' 2> /dev/null | filter_logs -- cgit v1.2.3-54-g00ecf