• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *    http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #include <hctest.h>
17 #include <ohos_types.h>
18 #include <securec.h>
19 #include <stdbool.h>
20 #include <stdio.h>
21 #include <stdlib.h>
22 #include <string.h>
23 #include <time.h>
24 
25 #include "hc_alg_test.h"
26 #include "hc_condition_test.h"
27 #include "hc_dev_info_test.h"
28 #include "hc_file_f_test.h"
29 #include "hc_file_iot_flash_test.h"
30 #include "hc_file_test.h"
31 #include "hc_file_utils_test.h"
32 #include "hc_mutex_test.h"
33 #include "hc_thread_test.h"
34 #include "hc_time_test.h"
35 #include "print_log.h"
36 
LITE_TEST_SUIT(security,deviceAuth,DeviceAuthBasicDepsTestSuite)37 LITE_TEST_SUIT(security, deviceAuth, DeviceAuthBasicDepsTestSuite)
38 
39 static BOOL DeviceAuthBasicDepsTestSuiteSetUp(void)
40 {
41     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
42     (void)(srand(time(NULL)));
43     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
44     return TRUE;
45 }
46 
DeviceAuthBasicDepsTestSuiteTearDown(void)47 static BOOL DeviceAuthBasicDepsTestSuiteTearDown(void)
48 {
49     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
50     return TRUE;
51 }
52 
53 /**
54  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseHcMutex
55  * @tc.desc:
56  * @tc.type: FUNC
57  */
58 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseHcMutex, Function | SmallTest | Level1)
59 {
60     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
61     TestHcMutex();
62     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
63 }
64 
65 /**
66  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseHcThread
67  * @tc.desc:
68  * @tc.type: FUNC
69  */
70 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseHcThread, Function | SmallTest | Level1)
71 {
72     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
73     TestHcThread();
74     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
75 }
76 
77 /**
78  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseHcGetUdid
79  * @tc.desc:
80  * @tc.type: FUNC
81  */
82 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseHcGetUdid, Function | SmallTest | Level1)
83 {
84     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
85     TestHcGetUdid();
86     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
87 }
88 
89 /**
90  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseHcFile
91  * @tc.desc:
92  * @tc.type: FUNC
93  */
94 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseHcFile, Function | SmallTest | Level1)
95 {
96     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
97     TestHcFile();
98     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
99 }
100 
101 /**
102  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseHcFileFApi
103  * @tc.desc:
104  * @tc.type: FUNC
105  */
106 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseHcFileFApi, Function | SmallTest | Level1)
107 {
108     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
109     TestHcFileFApi();
110     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
111 }
112 
113 /**
114  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseHcFileUtilsFile
115  * @tc.desc:
116  * @tc.type: FUNC
117  */
118 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseHcFileUtilsFile, Function | SmallTest | Level1)
119 {
120     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
121     TestHcFileUtilsFile();
122     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
123 }
124 
125 /**
126  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseSemCondition
127  * @tc.desc:
128  * @tc.type: FUNC
129  */
130 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseSemCondition, Function | SmallTest | Level1)
131 {
132     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
133     TestHcSemCondition();
134     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
135 }
136 
137 /**
138  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCasePthreadCondition
139  * @tc.desc:
140  * @tc.type: FUNC
141  */
142 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCasePthreadCondition, Function | SmallTest | Level1)
143 {
144     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
145     TestHcPthreadCondition();
146     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
147 }
148 
149 /**
150  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseHcFileIotFlash
151  * @tc.desc:
152  * @tc.type: FUNC
153  */
154 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseHcFileIotFlash, Function | SmallTest | Level1)
155 {
156     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
157     TestHcFileIotFlash();
158     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
159 }
160 
161 /**
162  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseHcTime
163  * @tc.desc:
164  * @tc.type: FUNC
165  */
166 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseHcTime, Function | SmallTest | Level1)
167 {
168     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
169     TestHcTime();
170     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
171 }
172 
173 /**
174  * @tc.name: DeviceAuthBasicDepsTestSuite.TestCaseHcAlg
175  * @tc.desc:
176  * @tc.type: FUNC
177  */
178 LITE_TEST_CASE(DeviceAuthBasicDepsTestSuite, TestCaseHcAlg, Function | SmallTest | Level1)
179 {
180     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
181     TestHcAlg();
182     LOGI("++++++++++++++++++++++++++++++++++++++++\n");
183 }
184 
185 RUN_TEST_SUITE(DeviceAuthBasicDepsTestSuite)
186