CKM: Adopt tests to new api behaviour.
[platform/core/test/security-tests.git] / tests / security-tests.sh
1 #!/bin/sh
2
3 #####################################################################
4 # Copyright (c) 2012-2014 Samsung Electronics Co., Ltd All Rights Reserved
5 #
6 #    Licensed under the Apache License, Version 2.0 (the "License");
7 #    you may not use this file except in compliance with the License.
8 #    You may obtain a copy of the License at
9 #
10 #        http://www.apache.org/licenses/LICENSE-2.0
11 #
12 #    Unless required by applicable law or agreed to in writing, software
13 #    distributed under the License is distributed on an "AS IS" BASIS,
14 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 #    See the License for the specific language governing permissions and
16 #    limitations under the License.
17 #####################################################################
18
19 #testing internet access and date on the target
20
21 echo "### Starting tests ######################################################"
22
23 case $1 in
24
25 "smack")
26     echo "========================================================================="
27     echo $1
28     echo
29     libsmack-test "${@:2}" # propagate all remaining arguments (except first)
30     ;;
31 "smack-dbus")
32     echo "========================================================================="
33     echo "SMACK DBUS TEST"
34     echo
35     smack-dbus-tests "${@:2}"
36     ;;
37 "libprivilege-control")
38     echo "========================================================================="
39     echo $1
40     echo
41     libprivilege-control-test "${@:2}"
42     ;;
43 "ss-clientsmack")
44     echo "========================================================================="
45     echo "SECURITY SERVER TEST CLIENT SMACK"
46     echo
47     security-server-tests-client-smack "${@:2}"
48     ;;
49 "ss-stress")
50     echo "========================================================================="
51     echo "SECURITY SERVER TEST STRESS"
52     echo
53     security-server-tests-stress "${@:2}"
54     ;;
55 "ss-server")
56     echo "========================================================================="
57     echo "SECURITY SERVER TEST SERVER"
58     echo
59     security-server-tests-server "${@:2}"
60     ;;
61 "ss-api-speed")
62     echo "========================================================================="
63     echo "SECURITY SERVER MEASURER SERVER"
64     echo
65     security-server-tests-api-speed "${@:2}"
66     ;;
67 "ss-password")
68     echo "========================================================================="
69     echo "SECURITY SERVER TEST PASSWORD"
70     echo
71     security-server-tests-password "${@:2}"
72     ;;
73 "ss-privilege")
74     echo "========================================================================="
75     echo "SECURITY SERVER TEST PRIVILEGE"
76     echo
77     security-server-tests-privilege "${@:2}"
78     ;;
79 "security-manager")
80     echo "========================================================================="
81     echo "SECURITY MANAGER TESTS"
82     echo
83     security-manager-tests "${@:2}"
84     ;;
85 "cynara")
86     echo "========================================================================="
87     echo "CYNARA TEST"
88     echo
89     cynara-test "${@:2}"
90     ;;
91 *)
92     echo "Correct using:"
93     echo "    security_test.sh <module> <args_for_module>"
94     echo
95     echo "modules: smack, smack-dbus, libprivilege-control, ss-clientsmack"
96     echo "         ss-server, ss-api-speed, ss-password, ss-stress"
97     echo "         ss-privilege, security-manager, cynara"
98     ;;
99
100 esac
101
102 echo "### Tests done ##########################################################"