From 5b80bfd7bffd4c20d80b7c70a7130529e9a755dd Mon Sep 17 00:00:00 2001 From: ToshikazuOhiwa Date: Mon, 30 Mar 2020 09:24:26 +0900 Subject: agl-basesystem --- .../recipes-containers/lxc/files/run-ptest | 57 ++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 external/meta-virtualization/recipes-containers/lxc/files/run-ptest (limited to 'external/meta-virtualization/recipes-containers/lxc/files/run-ptest') diff --git a/external/meta-virtualization/recipes-containers/lxc/files/run-ptest b/external/meta-virtualization/recipes-containers/lxc/files/run-ptest new file mode 100644 index 00000000..3f3a75f2 --- /dev/null +++ b/external/meta-virtualization/recipes-containers/lxc/files/run-ptest @@ -0,0 +1,57 @@ +#!/bin/bash + +# Network interfaces come up and down and can be quite noisy +# and since we are often on the console when running ptests +# let's just quiet things some +dmesg -n 1 + +# Blacklisted test will be skipped +blacklist="" +# Not applicable +blacklist="$blacklist lxc-test-apparmor" +# These currently hang so skip them until someone fixes them up +blacklist="$blacklist lxc-test-shutdowntest" +blacklist="$blacklist lxc-test-state-server" + +passed=0 +failed=0 +skipped=0 + +# Create logs dir and clear old logs if any +mkdir logs 2> /dev/null +rm -f logs/* + +echo "### Starting LXC ptest ###" + +for test in ./tests/* +do + if [[ ! $blacklist = *$(basename $test)* ]] + then + $test >logs/$(basename $test).log 2>&1 + else + echo "SKIPPED: $(basename $test)" + skipped=$((skipped+1)) + continue + fi + + if [ $? -eq 0 ] + then + echo "PASS: $(basename $test)" + passed=$((passed+1)) + else + echo "FAIL: $(basename $test)" + failed=$((failed+1)) + fi +done + +echo "" +echo "Results:" +echo " PASSED = $passed" +echo " FAILED = $failed" +echo " SKIPPED = $skipped" +echo "(for details check individual test log in ./logs directory)" +echo "" +echo "### LXC ptest complete ###" + +# restore dmesg to console +dmesg -n 6 -- cgit 1.2.3-korg