summaryrefslogtreecommitdiffstats
path: root/recipes-sota/aktualizr/files
diff options
context:
space:
mode:
authorPatrick Vacek <patrickvacek@gmail.com>2019-05-17 13:52:10 +0200
committerGitHub <noreply@github.com>2019-05-17 13:52:10 +0200
commit1ca755e32215de0a54d9bb221be862391b6c6756 (patch)
treeacad00a07cefd63eafa02e1d8084602445fdd018 /recipes-sota/aktualizr/files
parent7824e3e9ac71300d7f5796ca7ab00c3b568f0578 (diff)
parent64733cc59737ad606f42874c5a825df1e2b3b1ff (diff)
downloadmeta-updater-1ca755e32215de0a54d9bb221be862391b6c6756.tar.gz
Merge pull request #515 from advancedtelematic/fix/sumo/backport
Fix/sumo/backport
Diffstat (limited to 'recipes-sota/aktualizr/files')
-rw-r--r--recipes-sota/aktualizr/files/10-resource-control.conf6
-rwxr-xr-xrecipes-sota/aktualizr/files/run-ptest18
2 files changed, 24 insertions, 0 deletions
diff --git a/recipes-sota/aktualizr/files/10-resource-control.conf b/recipes-sota/aktualizr/files/10-resource-control.conf
new file mode 100644
index 0000000..254713c
--- /dev/null
+++ b/recipes-sota/aktualizr/files/10-resource-control.conf
@@ -0,0 +1,6 @@
1[Service]
2CPUAccounting=true
3CPUWeight=@CPU_WEIGHT@
4MemoryAccounting=true
5MemoryHigh=@MEMORY_HIGH@
6MemoryMax=@MEMORY_MAX@
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
3set -eu
4
5AKTUALIZR_PTEST_PARALLEL_LEVEL=${AKTUALIZR_PTEST_PARALLEL_LEVEL:-2}
6
7filter_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
17cd build
18ctest -j "$AKTUALIZR_PTEST_PARALLEL_LEVEL" -O /tmp/aktualizr-ptest.log --output-on-failure -LE 'noptest' 2> /dev/null | filter_logs