1f6603c60Sopenharmony_ci/* 2f6603c60Sopenharmony_ci * Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development Co., Ltd. 3f6603c60Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License"); 4f6603c60Sopenharmony_ci * you may not use this file except in compliance with the License. 5f6603c60Sopenharmony_ci * You may obtain a copy of the License at 6f6603c60Sopenharmony_ci * 7f6603c60Sopenharmony_ci * http://www.apache.org/licenses/LICENSE-2.0 8f6603c60Sopenharmony_ci * 9f6603c60Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software 10f6603c60Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS, 11f6603c60Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12f6603c60Sopenharmony_ci * See the License for the specific language governing permissions and 13f6603c60Sopenharmony_ci * limitations under the License. 14f6603c60Sopenharmony_ci */ 15f6603c60Sopenharmony_ci 16f6603c60Sopenharmony_ci#ifndef TEST_SHRINKDEFINE_H 17f6603c60Sopenharmony_ci#define TEST_SHRINKDEFINE_H 18f6603c60Sopenharmony_ci 19f6603c60Sopenharmony_ci#define SHRINK_HWTEST_F(TestSuite, TestCase, VkglCase1, VkglCase2) \ 20f6603c60Sopenharmony_ci HWTEST_F(TestSuite, TestCase, Function | MediumTest | Level2) \ 21f6603c60Sopenharmony_ci { \ 22f6603c60Sopenharmony_ci GTEST_LOG_(INFO) << #TestCase << "start"; \ 23f6603c60Sopenharmony_ci int argc = 3; \ 24f6603c60Sopenharmony_ci const char *argv[3] = { \ 25f6603c60Sopenharmony_ci ".", \ 26f6603c60Sopenharmony_ci "--deqp-case=" \ 27f6603c60Sopenharmony_ci VkglCase1 \ 28f6603c60Sopenharmony_ci VkglCase2, \ 29f6603c60Sopenharmony_ci "--deqp-archive-dir=/data/local/tmp/" \ 30f6603c60Sopenharmony_ci }; \ 31f6603c60Sopenharmony_ci FuncRunResult result = RunTestKHRGLES(argc, argv); \ 32f6603c60Sopenharmony_ci TestSuite::runResult.numPassed += result.numPassed; \ 33f6603c60Sopenharmony_ci TestSuite::runResult.numFailed += result.numFailed; \ 34f6603c60Sopenharmony_ci TestSuite::runResult.numNotSupported += result.numNotSupported; \ 35f6603c60Sopenharmony_ci TestSuite::runResult.numWarnings += result.numWarnings; \ 36f6603c60Sopenharmony_ci TestSuite::runResult.numPassed += result.numWarnings; \ 37f6603c60Sopenharmony_ci TestSuite::runResult.numWaived += result.numWaived; \ 38f6603c60Sopenharmony_ci if (result.numNotSupported == 1) { \ 39f6603c60Sopenharmony_ci GTEST_LOG_(INFO) << #TestCase << "notsupport!"; \ 40f6603c60Sopenharmony_ci } else if (result.isComplete) { \ 41f6603c60Sopenharmony_ci EXPECT_TRUE(result.isComplete); \ 42f6603c60Sopenharmony_ci EXPECT_TRUE(result.numFailed == 0); \ 43f6603c60Sopenharmony_ci }; \ 44f6603c60Sopenharmony_ci GTEST_LOG_(INFO) << #TestCase << "end"; \ 45f6603c60Sopenharmony_ci } 46f6603c60Sopenharmony_ci 47f6603c60Sopenharmony_ci#endif // 为缩减代码而存在