diff options
author | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 17:36:38 +0100 |
---|---|---|
committer | Adrian Dudau <adrian.dudau@enea.com> | 2013-12-12 17:36:38 +0100 |
commit | 2a7348129a42f21095fcd62e47a035f78d254130 (patch) | |
tree | 544dc8019a8f8cb684ace8674193605e607f9964 /recipes-test/systest-runner/files | |
download | meta-enea-master.tar.gz |
Migrated from the internal git server on the dora-enea branch
Signed-off-by: Adrian Dudau <adrian.dudau@enea.com>
Diffstat (limited to 'recipes-test/systest-runner/files')
-rw-r--r-- | recipes-test/systest-runner/files/systest-runner | 16 | ||||
-rwxr-xr-x | recipes-test/systest-runner/files/tests/ltp | 23 | ||||
-rwxr-xr-x | recipes-test/systest-runner/files/tests/perf-network | 13 | ||||
-rwxr-xr-x | recipes-test/systest-runner/files/tests/posixtest | 40 |
4 files changed, 92 insertions, 0 deletions
diff --git a/recipes-test/systest-runner/files/systest-runner b/recipes-test/systest-runner/files/systest-runner new file mode 100644 index 0000000..f549954 --- /dev/null +++ b/recipes-test/systest-runner/files/systest-runner | |||
@@ -0,0 +1,16 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd /usr/lib/systest-runner/tests >/dev/null | ||
4 | |||
5 | for x in * | ||
6 | do | ||
7 | echo $x | ||
8 | if [[ -f $x ]]; then | ||
9 | date +%Y-%m-%dT%H:%M | ||
10 | echo "BEGIN: $x" | ||
11 | ./$x | ||
12 | echo "END: $x" | ||
13 | date +%Y-%m-%dT%H:%M | ||
14 | fi | ||
15 | done | ||
16 | |||
diff --git a/recipes-test/systest-runner/files/tests/ltp b/recipes-test/systest-runner/files/tests/ltp new file mode 100755 index 0000000..ebdc32f --- /dev/null +++ b/recipes-test/systest-runner/files/tests/ltp | |||
@@ -0,0 +1,23 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd /opt/ltp >/dev/null | ||
4 | addgroup nobody | ||
5 | sed -i -e "/mounts | sort -b$/s/$/ | grep -v deleted/" ./testscripts/test_fs_bind.sh | ||
6 | |||
7 | logname=`date +"%Y_%m_%d_%H_%M_%S"`".log" | ||
8 | ./runltp -p -d /tmp -l $logname | ||
9 | |||
10 | if [ ! -d ./results ]; then | ||
11 | echo "FAIL: no result found" | ||
12 | exit 1 | ||
13 | fi | ||
14 | |||
15 | cat ./results/$logname | while read line | ||
16 | do | ||
17 | resultLine=`echo $line | grep -c -E "PASS|FAIL"` | ||
18 | if [ $resultLine -eq 1 ]; then | ||
19 | testcase=`echo $line | awk '{print $1}'` | ||
20 | result=`echo $line | awk '{print $2}'` | ||
21 | echo "$result: $testcase" | ||
22 | fi | ||
23 | done | ||
diff --git a/recipes-test/systest-runner/files/tests/perf-network b/recipes-test/systest-runner/files/tests/perf-network new file mode 100755 index 0000000..28d88d5 --- /dev/null +++ b/recipes-test/systest-runner/files/tests/perf-network | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | logname=`date +"%Y_%m_%d_%H_%M_%S"`".log" | ||
4 | perf-networking |tee /tmp/$logname | ||
5 | |||
6 | if grep -Fq "Error:" /tmp/$logname | ||
7 | then | ||
8 | echo "FAIL: Test failed" | ||
9 | exit 1 | ||
10 | else | ||
11 | echo "PASS: Performed the netperf tests" | ||
12 | exit 0 | ||
13 | fi | ||
diff --git a/recipes-test/systest-runner/files/tests/posixtest b/recipes-test/systest-runner/files/tests/posixtest new file mode 100755 index 0000000..8da0193 --- /dev/null +++ b/recipes-test/systest-runner/files/tests/posixtest | |||
@@ -0,0 +1,40 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | printit() { | ||
4 | echo "" | ||
5 | sed -i -e "s|FAILED:|FAIL:|g" -e "s|UNRESOLVED:|FAIL:|g" -e "s|UNSUPPORTED:|SKIP:|g" -e "s|UNTESTED:|SKIP:|g" $1 | ||
6 | cat $1 | while read line | ||
7 | do | ||
8 | resultLine=`echo $line | grep -c -E "PASS|FAIL"` | ||
9 | if [ $resultLine -eq 1 ]; then | ||
10 | testcase=`echo $line | awk -F: '{print $1}'` | ||
11 | result=`echo $line | awk -F: '{print $3}'` | ||
12 | if [ -n "$testcase" ] && [ -n "$result" ]; then | ||
13 | echo "$result: $testcase" | ||
14 | fi | ||
15 | fi | ||
16 | done | ||
17 | } | ||
18 | |||
19 | cd /opt/ltp/testcases/open_posix_testsuite >/dev/null | ||
20 | |||
21 | make test | ||
22 | |||
23 | FILES=$(find . -name "logfile.*-test") | ||
24 | for f in $FILES | ||
25 | do | ||
26 | printit $f | ||
27 | done | ||
28 | |||
29 | printf "\n\nRunning POSIX Option Group Feature Tests" | ||
30 | printf "----------------------------------------" | ||
31 | |||
32 | ./bin/run-all-posix-option-group-tests.sh | ||
33 | |||
34 | FILES=$(find . -name "logfile") | ||
35 | for f in $FILES | ||
36 | do | ||
37 | printit $f | ||
38 | done | ||
39 | |||
40 | |||