Rename /tests to /ckm to align with tizen branch
[platform/core/test/security-tests.git] / src / security-tests-all.sh
1 #!/bin/sh
2 echo "[Trigerring all tests...]"
3
4 total=0
5 passed=0
6 failed=0
7 ignored=0
8
9 ign="--runignored"
10 if [ $# -gt 0 ]; then
11   if [ "$1" = "--noignored" ]; then
12     ign=""
13   fi
14 fi
15
16 function addSummary
17 {
18     read -a words < summary.txt
19     total=$((total + words[0]))
20     passed=$((passed + words[1]))
21     failed=$((failed + words[2]))
22     ignored=$((ignored + words[3]))
23
24     rm summary.txt
25 }
26
27 function runTest
28 {
29     # 'text' - console output
30     # 'summary' - used for summary view
31     security-tests.sh "$1" --output=text --output=summary "$ign"
32     addSummary
33 }
34
35 function printSummary
36 {
37     COLOR_GREEN_START="\033[1;32m"
38     COLOR_DARK_GREEN_START="\033[0;36m"
39     COLOR_END="\033[m"
40
41     printf "\n"
42     printf "$COLOR_GREEN_START"
43     printf "Summary\n"
44     printf "$COLOR_END"
45
46     printf "$COLOR_DARK_GREEN_START"
47     printf "  Total:     %i\n" "$total"
48     printf "  Passed:    %i\n" "$passed"
49     printf "  Failed:    %i\n" "$failed"
50     printf "  Ignored:   %i\n" "$ignored"
51     printf "$COLOR_END"
52     printf "\n"
53 }
54
55 runTest smack
56 runTest smack-dbus
57 #runTest libprivilege-control
58 #runTest ss-clientsmack
59 #runTest ss-server
60 #runTest ss-password
61 #runTest ss-privilege
62 #runTest ss-stress
63 runTest security-manager
64 runTest cynara
65
66 printSummary
67
68 echo "[Done]"