• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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 #ifndef TEST_SHRINKDEFINE_H
17 #define TEST_SHRINKDEFINE_H
18 
19 #define SHRINK_HWTEST_F(TestSuite, TestCase, VkglCase)   \
20     HWTEST_F(TestSuite, TestCase, Function | MediumTest | Level2)                 \
21     {                                                                             \
22         GTEST_LOG_(INFO) << #TestCase << "start";                                 \
23         int argc = 3;                                                             \
24         const char *argv[3] = {                                                   \
25             ".",                                                                  \
26             "--deqp-case="                                                        \
27             VkglCase,                                                             \
28             "--deqp-archive-dir=/data/local/tmp/"                                  \
29         };                                                                        \
30         FuncRunResult result = RunTestKHRGLES(argc, argv);                        \
31         TestSuite::runResult.numPassed += result.numPassed;                       \
32         TestSuite::runResult.numFailed += result.numFailed;                       \
33         TestSuite::runResult.numNotSupported += result.numNotSupported;           \
34         TestSuite::runResult.numWarnings += result.numWarnings;                   \
35         TestSuite::runResult.numWaived += result.numWaived;                       \
36         if (result.isComplete) {                                                   \
37             EXPECT_TRUE(result.isComplete);                                        \
38             if(result.numPassed==1){                                          \
39                 EXPECT_TRUE(result.numPassed ==1);                                  \
40             }                                                                 \
41             if(result.numNotSupported==1){                                             \
42                 EXPECT_TRUE(result.numNotSupported==1);                         \
43             }                                                                    \
44         }                                                                         \
45         GTEST_LOG_(INFO) << #TestCase << "end";                                   \
46     }
47 
48 #endif // 为缩减代码而存在