1cf60b664265b875258f5d323852e38187e4673c
[platform/core/test/security-tests.git] / src / security-tests.sh
1 #!/bin/sh
2
3 #####################################################################
4 # Copyright (c) 2012 - 2019 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 "security-manager")
32     echo "========================================================================="
33     echo "SECURITY MANAGER TESTS"
34     echo
35     security-manager-tests "${@:2}"
36     ;;
37 "cynara")
38     echo "========================================================================="
39     echo "CYNARA TEST"
40     echo
41     cynara-test "${@:2}"
42     ;;
43 "ckm")
44     echo "========================================================================="
45     echo "KEY MANAGER UNPRIVILEGED TESTS"
46     echo
47     su - owner -c "ckm-tests ${@:2}"
48     echo "========================================================================="
49     echo "KEY MANAGER PRIVILEGED TESTS"
50     echo
51     ckm-privileged-tests "${@:2}"
52     ;;
53 "yaca")
54     echo "========================================================================="
55     echo "YACA TESTS"
56     echo
57     yaca-test "${@:2}"
58     ;;
59 "nether")
60     echo "========================================================================="
61     echo "NETHER TESTS"
62     echo
63     nether-tests "${@:2}"
64     ;;
65 *)
66     echo "Correct using:"
67     echo "    security_test.sh <module> <args_for_module>"
68     echo
69     echo "modules: smack, security-manager, cynara, ckm, yaca, nether"
70     ;;
71
72 esac
73
74 echo "### Tests done ##########################################################"