From b12475c488417b262bc92976e90f23435222518c Mon Sep 17 00:00:00 2001 From: majiangfeng Date: Thu, 15 Sep 2022 11:18:10 +0800 Subject: [PATCH 1/2] =?UTF-8?q??= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: majiangfeng --- distributedhardware/BUILD.gn | 5 +- .../distributedcameratest/BUILD.gn | 0 .../distributedcameratest/Test.json | 0 .../dcamera_automat_test.cpp | 387 ++++++++++++++++++ .../dcamera_hdf_demo.cpp | 0 .../distributedcameratest/dcamera_hdf_demo.h | 0 .../distributedcameratest/stream_customer.cpp | 0 .../distributedcameratest/stream_customer.h | 0 hdf/BUILD.gn | 21 - .../dcamera_automat_test.cpp | 115 ------ test_packages.gni | 1 - 11 files changed, 391 insertions(+), 138 deletions(-) rename {hdf => distributedhardware}/distributedcameratest/BUILD.gn (100%) rename {hdf => distributedhardware}/distributedcameratest/Test.json (100%) create mode 100644 distributedhardware/distributedcameratest/dcamera_automat_test.cpp rename {hdf => distributedhardware}/distributedcameratest/dcamera_hdf_demo.cpp (100%) rename {hdf => distributedhardware}/distributedcameratest/dcamera_hdf_demo.h (100%) rename {hdf => distributedhardware}/distributedcameratest/stream_customer.cpp (100%) rename {hdf => distributedhardware}/distributedcameratest/stream_customer.h (100%) delete mode 100644 hdf/BUILD.gn delete mode 100644 hdf/distributedcameratest/dcamera_automat_test.cpp diff --git a/distributedhardware/BUILD.gn b/distributedhardware/BUILD.gn index c79953a..41c1c92 100644 --- a/distributedhardware/BUILD.gn +++ b/distributedhardware/BUILD.gn @@ -16,6 +16,9 @@ import("//build/ohos_var.gni") group("distributedhardware") { testonly = true if (is_standard_system) { - deps = [ "distributedscreentest:DctsdisSreenTest" ] + deps = [ + "distributedcameratest:DctsdisCameraTest", + "distributedscreentest:DctsdisSreenTest", + ] } } diff --git a/hdf/distributedcameratest/BUILD.gn b/distributedhardware/distributedcameratest/BUILD.gn similarity index 100% rename from hdf/distributedcameratest/BUILD.gn rename to distributedhardware/distributedcameratest/BUILD.gn diff --git a/hdf/distributedcameratest/Test.json b/distributedhardware/distributedcameratest/Test.json similarity index 100% rename from hdf/distributedcameratest/Test.json rename to distributedhardware/distributedcameratest/Test.json diff --git a/distributedhardware/distributedcameratest/dcamera_automat_test.cpp b/distributedhardware/distributedcameratest/dcamera_automat_test.cpp new file mode 100644 index 0000000..004acef --- /dev/null +++ b/distributedhardware/distributedcameratest/dcamera_automat_test.cpp @@ -0,0 +1,387 @@ +/* + * Copyright (c) 2022 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include "dcamera_hdf_demo.h" +#include "distributed_hardware_log.h" + +using namespace testing::ext; +using namespace OHOS::DistributedHardware; + +auto mainDemo = std::make_shared(); +int32_t cameraOk = 0; +int32_t sleepOk = 2; +int32_t camoreError = -1; + +class DCameraAutomatTest : public testing::Test { +public: + static void SetUpTestCase(void); + static void TearDownTestCase(void); + void SetUp(); + void TearDown(); + DCameraAutomatTest(); +}; +void DCameraAutomatTest::SetUpTestCase(void) +{ + int32_t ret = mainDemo->InitSensors(); + if (ret == camoreError) { + DHLOGE("main test: mainDemo->InitSensors() error"); + return; + } + + ret = mainDemo->InitCameraDevice(); + if (ret == camoreError) { + DHLOGE("main test: mainDemo->InitCameraDevice() error"); + return; + } + mainDemo->SetEnableResult(); +} + +void DCameraAutomatTest::TearDownTestCase(void) +{ + PreviewOff(mainDemo); + mainDemo->QuitDemo(); +} +void DCameraAutomatTest::SetUp(void) {} +void DCameraAutomatTest::TearDown(void) {} +DCameraAutomatTest::DCameraAutomatTest(void) {} + + +HWTEST_F(DCameraAutomatTest, DCameraTest_0100, TestSize.Level1) +{ + int32_t ret = PreviewOn(0, mainDemo); + EXPECT_EQ(cameraOk, ret) << "PreviewOn fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_0200, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAwbMode(sleepOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode incandescent fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_0300, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAwbMode(cameraOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_0400, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAeExpo(); + EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_0500, TestSize.Level1) +{ + int32_t ret = mainDemo->SetMetadata(); + EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_0600, TestSize.Level1) +{ + int32_t ret = CaptureTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "CaptureTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_0700, TestSize.Level1) +{ + int32_t ret = VideoTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "VideoTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_0800, TestSize.Level1) +{ + int32_t ret = FlashLightTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "FlashLightTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_0900, TestSize.Level1) +{ + int32_t ret = OfflineTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "OfflineTest fail"; +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1000, TestSize.Level1) +{ + int32_t ret = PreviewOn(0, mainDemo); + EXPECT_NE(cameraOk, ret) << "PreviewOn fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(sleepOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode incandescent fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(cameraOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1100, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAeExpo(); + EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; + sleep(sleepOk); + ret = mainDemo->SetMetadata(); + EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; + sleep(sleepOk); + ret = CaptureTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "CaptureTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1200, TestSize.Level1) +{ + int32_t ret = VideoTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "VideoTest fail"; + sleep(sleepOk); + ret = FlashLightTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "FlashLightTest fail"; + sleep(sleepOk); + ret = OfflineTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "OfflineTest fail"; +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1300, TestSize.Level1) +{ + int32_t ret = PreviewOn(0, mainDemo); + EXPECT_NE(cameraOk, ret) << "PreviewOn fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(cameraOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(sleepOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode incandescent fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1400, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAeExpo(); + EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; + sleep(sleepOk); + ret = CaptureTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "CaptureTest fail"; + sleep(sleepOk); + ret = mainDemo->SetMetadata(); + EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1500, TestSize.Level1) +{ + int32_t ret = VideoTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "VideoTest fail"; + sleep(sleepOk); + ret = OfflineTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "OfflineTest fail"; + ret = FlashLightTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "FlashLightTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1600, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAwbMode(sleepOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode incandescent fail"; + sleep(sleepOk);ret = PreviewOn(0, mainDemo); + EXPECT_NE(cameraOk, ret) << "PreviewOn fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(cameraOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1700, TestSize.Level1) +{ + int32_t ret = mainDemo->SetMetadata(); + EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; + sleep(sleepOk); + ret = mainDemo->SetAeExpo(); + EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; + sleep(sleepOk); + ret = CaptureTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "CaptureTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1800, TestSize.Level1) +{ + int32_t ret = FlashLightTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "FlashLightTest fail"; + sleep(sleepOk); + ret = VideoTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "VideoTest fail"; + sleep(sleepOk); + ret = OfflineTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "OfflineTest fail"; +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_1900, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAwbMode(cameraOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(sleepOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode incandescent fail"; + sleep(sleepOk); + ret = PreviewOn(0, mainDemo); + EXPECT_NE(cameraOk, ret) << "PreviewOn fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2000, TestSize.Level1) +{ + int32_t ret = CaptureTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "CaptureTest fail"; + sleep(sleepOk); + ret = mainDemo->SetMetadata(); + EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; + sleep(sleepOk); + ret = mainDemo->SetAeExpo(); + EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2100, TestSize.Level1) +{ + int32_t ret = OfflineTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "OfflineTest fail"; + ret = FlashLightTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "FlashLightTest fail"; + sleep(sleepOk); + ret = VideoTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "VideoTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2200, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAeExpo(); + EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; + sleep(sleepOk); + ret = mainDemo->SetMetadata(); + EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; + sleep(sleepOk); + ret = CaptureTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "CaptureTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2300, TestSize.Level1) +{ + int32_t ret = PreviewOn(0, mainDemo); + EXPECT_NE(cameraOk, ret) << "PreviewOn fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(sleepOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode incandescent fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(cameraOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2400, TestSize.Level1) +{ + int32_t ret = VideoTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "VideoTest fail"; + sleep(sleepOk); + ret = FlashLightTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "FlashLightTest fail"; + sleep(sleepOk); + ret = OfflineTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "OfflineTest fail"; +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2500, TestSize.Level1) +{ + int32_t ret = VideoTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "VideoTest fail"; + sleep(sleepOk); + ret = FlashLightTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "FlashLightTest fail"; + sleep(sleepOk); + ret = OfflineTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "OfflineTest fail"; +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2600, TestSize.Level1) +{ + int32_t ret = PreviewOn(0, mainDemo); + EXPECT_NE(cameraOk, ret) << "PreviewOn fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(sleepOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode incandescent fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(cameraOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2700, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAeExpo(); + EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; + sleep(sleepOk); + ret = mainDemo->SetMetadata(); + EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; + sleep(sleepOk); + ret = CaptureTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "CaptureTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2800, TestSize.Level1) +{ + int32_t ret = VideoTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "VideoTest fail"; + sleep(sleepOk); + ret = OfflineTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "OfflineTest fail"; + ret = FlashLightTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "FlashLightTest fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_2900, TestSize.Level1) +{ + int32_t ret = PreviewOn(0, mainDemo); + EXPECT_NE(cameraOk, ret) << "PreviewOn fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(cameraOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode fail"; + sleep(sleepOk); + ret = mainDemo->SetAwbMode(sleepOk); + EXPECT_EQ(cameraOk, ret) << "SetAwbMode incandescent fail"; + sleep(sleepOk); +} + +HWTEST_F(DCameraAutomatTest, DCameraTest_3000, TestSize.Level1) +{ + int32_t ret = mainDemo->SetAeExpo(); + EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; + sleep(sleepOk); + ret = CaptureTest(mainDemo); + EXPECT_EQ(cameraOk, ret) << "CaptureTest fail"; + sleep(sleepOk); + ret = mainDemo->SetMetadata(); + EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; + sleep(sleepOk); +} \ No newline at end of file diff --git a/hdf/distributedcameratest/dcamera_hdf_demo.cpp b/distributedhardware/distributedcameratest/dcamera_hdf_demo.cpp similarity index 100% rename from hdf/distributedcameratest/dcamera_hdf_demo.cpp rename to distributedhardware/distributedcameratest/dcamera_hdf_demo.cpp diff --git a/hdf/distributedcameratest/dcamera_hdf_demo.h b/distributedhardware/distributedcameratest/dcamera_hdf_demo.h similarity index 100% rename from hdf/distributedcameratest/dcamera_hdf_demo.h rename to distributedhardware/distributedcameratest/dcamera_hdf_demo.h diff --git a/hdf/distributedcameratest/stream_customer.cpp b/distributedhardware/distributedcameratest/stream_customer.cpp similarity index 100% rename from hdf/distributedcameratest/stream_customer.cpp rename to distributedhardware/distributedcameratest/stream_customer.cpp diff --git a/hdf/distributedcameratest/stream_customer.h b/distributedhardware/distributedcameratest/stream_customer.h similarity index 100% rename from hdf/distributedcameratest/stream_customer.h rename to distributedhardware/distributedcameratest/stream_customer.h diff --git a/hdf/BUILD.gn b/hdf/BUILD.gn deleted file mode 100644 index 9490de0..0000000 --- a/hdf/BUILD.gn +++ /dev/null @@ -1,21 +0,0 @@ -# Copyright (C) 2022 Huawei Device Co., Ltd. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build/ohos_var.gni") - -group("hdf") { - testonly = true - if (is_standard_system) { - deps = [ "distributedcameratest:DctsdisCameraTest" ] - } -} diff --git a/hdf/distributedcameratest/dcamera_automat_test.cpp b/hdf/distributedcameratest/dcamera_automat_test.cpp deleted file mode 100644 index d146aaa..0000000 --- a/hdf/distributedcameratest/dcamera_automat_test.cpp +++ /dev/null @@ -1,115 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include "dcamera_hdf_demo.h" -#include "distributed_hardware_log.h" - -using namespace testing::ext; -using namespace OHOS::DistributedHardware; - -auto mainDemo = std::make_shared(); -int32_t cameraOk = 0; -int32_t sleepOk = 2; - -class DCameraAutomatTest : public testing::Test { -public: - static void SetUpTestCase(void); - static void TearDownTestCase(void); - void SetUp(); - void TearDown(); - DCameraAutomatTest(); -}; -void DCameraAutomatTest::SetUpTestCase(void) {} - -void DCameraAutomatTest::TearDownTestCase(void) -{ - PreviewOff(mainDemo); - mainDemo->QuitDemo(); -} -void DCameraAutomatTest::SetUp(void) {} -void DCameraAutomatTest::TearDown(void) {} -DCameraAutomatTest::DCameraAutomatTest(void) {} - - -HWTEST_F(DCameraAutomatTest, DCameraTest_0100, TestSize.Level1) -{ - int32_t ret = mainDemo->InitSensors(); - EXPECT_EQ(cameraOk, ret) << "InitSensors fail"; - sleep(sleepOk); - ret = mainDemo->InitCameraDevice(); - EXPECT_EQ(cameraOk, ret) << "InitCameraDevice fail"; - sleep(sleepOk); - mainDemo->SetEnableResult(); - ret = PreviewOn(0, mainDemo); - EXPECT_EQ(cameraOk, ret) << "PreviewOn fail"; - sleep(sleepOk); -} - -HWTEST_F(DCameraAutomatTest, DCameraTest_0200, TestSize.Level1) -{ - int32_t ret = mainDemo->SetAwbMode(sleepOk); - EXPECT_EQ(cameraOk, ret) << "SetAwbMode incandescent fail"; - sleep(sleepOk); -} - -HWTEST_F(DCameraAutomatTest, DCameraTest_0300, TestSize.Level1) -{ - int32_t ret = mainDemo->SetAwbMode(sleepOk); - EXPECT_EQ(cameraOk, ret) << "SetAwbMode fail"; - sleep(sleepOk); -} - -HWTEST_F(DCameraAutomatTest, DCameraTest_0400, TestSize.Level1) -{ - int32_t ret = mainDemo->SetAeExpo(); - EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; - sleep(sleepOk); -} - -HWTEST_F(DCameraAutomatTest, DCameraTest_0500, TestSize.Level1) -{ - int32_t ret = mainDemo->SetMetadata(); - EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; - sleep(sleepOk); -} - -HWTEST_F(DCameraAutomatTest, DCameraTest_0600, TestSize.Level1) -{ - int32_t ret = CaptureTest(mainDemo); - EXPECT_EQ(cameraOk, ret) << "CaptureTest fail"; - sleep(sleepOk); -} - -HWTEST_F(DCameraAutomatTest, DCameraTest_0700, TestSize.Level1) -{ - int32_t ret = VideoTest(mainDemo); - EXPECT_EQ(cameraOk, ret) << "VideoTest fail"; - sleep(sleepOk); -} - -HWTEST_F(DCameraAutomatTest, DCameraTest_0800, TestSize.Level1) -{ - int32_t ret = FlashLightTest(mainDemo); - EXPECT_EQ(cameraOk, ret) << "FlashLightTest fail"; - sleep(sleepOk); -} - -HWTEST_F(DCameraAutomatTest, DCameraTest_0900, TestSize.Level1) -{ - int32_t ret = OfflineTest(mainDemo); - EXPECT_EQ(cameraOk, ret) << "OfflineTest fail"; -} - diff --git a/test_packages.gni b/test_packages.gni index 67aed70..9ebf576 100644 --- a/test_packages.gni +++ b/test_packages.gni @@ -14,7 +14,6 @@ import("//test/xts/tools/build/suite.gni") _all_test_packages = [ - "${DCTS_ROOT}/hdf:hdf", "${DCTS_ROOT}/distributedhardware:distributedhardware", "${DCTS_ROOT}/distributeddatamgr:distributeddatatest", "${DCTS_ROOT}/communication:communication", From 36ec76902d13a7e55557d18b6b8a3746f5073187 Mon Sep 17 00:00:00 2001 From: majiangfeng Date: Thu, 15 Sep 2022 14:54:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q??= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: majiangfeng --- .../distributedcameratest/dcamera_automat_test.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/distributedhardware/distributedcameratest/dcamera_automat_test.cpp b/distributedhardware/distributedcameratest/dcamera_automat_test.cpp index 004acef..9b6fa7b 100644 --- a/distributedhardware/distributedcameratest/dcamera_automat_test.cpp +++ b/distributedhardware/distributedcameratest/dcamera_automat_test.cpp @@ -214,7 +214,7 @@ HWTEST_F(DCameraAutomatTest, DCameraTest_1700, TestSize.Level1) int32_t ret = mainDemo->SetMetadata(); EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; sleep(sleepOk); - ret = mainDemo->SetAeExpo(); + ret = mainDemo->SetAeExpo(); EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; sleep(sleepOk); ret = CaptureTest(mainDemo); @@ -255,7 +255,7 @@ HWTEST_F(DCameraAutomatTest, DCameraTest_2000, TestSize.Level1) ret = mainDemo->SetMetadata(); EXPECT_EQ(cameraOk, ret) << "SetMetadata fail"; sleep(sleepOk); - ret = mainDemo->SetAeExpo(); + ret = mainDemo->SetAeExpo(); EXPECT_EQ(cameraOk, ret) << "SetAeExpo fail"; sleep(sleepOk); }