• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2023 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 
17 #include <cstdio>
18 #include "gtest/gtest.h"
19 
20 #include "devattest_interface.h"
21 
22 #define ACTS_DEVATTEST_SUCCESS 0
23 #define SLEEP_TIMEOUT 1
24 
25 using namespace std;
26 using namespace testing::ext;
27 
28 class DeviceAttestStartTest : public testing::Test {
29 protected:
SetUpTestCase(void)30     static void SetUpTestCase(void) {}
TearDownTestCase(void)31     static void TearDownTestCase(void) {}
SetUp()32     virtual void SetUp() {}
TearDown()33     virtual void TearDown()
34     {
35         sleep(SLEEP_TIMEOUT);
36     }
37 };
38 
39 /**
40  * @tc.number    : Sub_Device_Attest_Test_0100
41  * @tc.name      : HiLog::Info parameter legal test (Cortex-A, C)
42  * @tc.desc      : [C- SOFTWARE -0200]
43  */
44 HWTEST_F(DeviceAttestStartTest, subDeviceAttestTest0100, Function | MediumTest | Level1)
45 {
46     int32_t ret = ACTS_DEVATTEST_SUCCESS;
47     ret = StartDevAttestTask();
48     printf("[CLIENT MAIN] StartDevAttestTask ret:%d.\n", ret);
49     EXPECT_EQ(ret, ACTS_DEVATTEST_SUCCESS);
50 }
51