summaryrefslogtreecommitdiffstats
path: root/recipes-containers/lxc/files/run-ptest
diff options
context:
space:
mode:
Diffstat (limited to 'recipes-containers/lxc/files/run-ptest')
-rw-r--r--recipes-containers/lxc/files/run-ptest57
1 files changed, 55 insertions, 2 deletions
diff --git a/recipes-containers/lxc/files/run-ptest b/recipes-containers/lxc/files/run-ptest
index 23a6256b..e9855449 100644
--- a/recipes-containers/lxc/files/run-ptest
+++ b/recipes-containers/lxc/files/run-ptest
@@ -1,4 +1,57 @@
1#!/bin/sh 1#!/bin/bash
2 2
3make -C src/tests -k check-TESTS 3# Network interfaces come up and down and can be quite noisy
4# and since we are often on the console when running ptests
5# let's just quiet things some
6dmesg -n 1
4 7
8# Blacklisted test will be skipped
9blacklist=""
10# Not applicable
11blacklist="$blacklist lxc-test-apparmor"
12# These currently hang so skip them until someone fixes them up
13blacklist="$blacklist lxc-test-shutdowntest"
14blacklist="$blacklist lxc-test-state-server"
15
16passed=0
17failed=0
18skipped=0
19
20# Create logs dir and clear old logs if any
21mkdir logs 2> /dev/null
22rm -f logs/*
23
24echo "### Starting LXC ptest ###"
25
26for test in ./tests/*
27do
28 if [[ ! $blacklist = *$(basename $test)* ]]
29 then
30 $test >logs/$(basename $test).log 2>&1
31 else
32 echo "$test SKIPPED"
33 skipped=$((skipped+1))
34 continue
35 fi
36
37 if [ $? -eq 0 ]
38 then
39 echo "$test PASS"
40 passed=$((passed+1))
41 else
42 echo "$test FAIL"
43 failed=$((failed+1))
44 fi
45done
46
47echo ""
48echo "Results:"
49echo " PASSED = $passed"
50echo " FAILED = $failed"
51echo " SKIPPED = $skipped"
52echo "(for details check individual test log in ./logs directory)"
53echo ""
54echo "### LXC ptest complete ###"
55
56# restore dmesg to console
57dmesg -n 6