diff --git a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/Application/AbilityStage.ts b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/Application/AbilityStage.ts index 379bc0bda5994f317472d4e2d195cf8b5da5d154..e0732e916f734443f2a2457ef55192842fbd00ad 100644 --- a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/Application/AbilityStage.ts +++ b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/Application/AbilityStage.ts @@ -1,3 +1,16 @@ +// Copyright (c) 2023 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 AbilityStage from "@ohos.app.ability.AbilityStage" export default class MyAbilityStage extends AbilityStage { diff --git a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts index d443631109f5f73817ec907b36c1b7a3d353d357..0c95f0e562ab7422c657c2a288b1d7e5247c5d79 100644 --- a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts +++ b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/FormAbility/FormAbility.ts @@ -1,3 +1,16 @@ +// Copyright (c) 2023 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 FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/MainAbility/MainAbility.ts b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/MainAbility/MainAbility.ts index 6ee21a3c6af3d0362880d1bdcd9acd461bcdba10..3141c2eda6c7653c9ae1b68b2e130b4ffc0bb66e 100644 --- a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/MainAbility/MainAbility.ts +++ b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -1,3 +1,16 @@ +// Copyright (c) 2023 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 Ability from '@ohos.app.ability.UIAbility' export default class MainAbility extends Ability { diff --git a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts index d443631109f5f73817ec907b36c1b7a3d353d357..0c95f0e562ab7422c657c2a288b1d7e5247c5d79 100644 --- a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts +++ b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/ServiceAbility/FormAbility.ts @@ -1,3 +1,16 @@ +// Copyright (c) 2023 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 FormExtension from '@ohos.app.form.FormExtensionAbility'; import formBindingData from '@ohos.application.formBindingData'; import formInfo from '@ohos.application.formInfo'; diff --git a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/TestAbility/TestAbility.ts b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/TestAbility/TestAbility.ts index 8f18d888e853da9a70d0b767e5963ae915083926..730e69474a6408407097252fe907fcfa65911adc 100644 --- a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/TestAbility/TestAbility.ts +++ b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/TestAbility/TestAbility.ts @@ -1,3 +1,16 @@ +// Copyright (c) 2023 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 Ability from '@ohos.app.ability.UIAbility' export default class TestAbility extends Ability { diff --git a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts index 42f986744077e5832001eba2ce62d14eca2177a7..f3149068a37ad19e17ee429c973556b16152491a 100644 --- a/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts +++ b/examples/stagetest/actsbundlemanagerstagetest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts @@ -1,3 +1,16 @@ +// Copyright (c) 2023 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 TestRunner from '@ohos.application.testRunner' import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' diff --git a/localCoverage/resident_service/config/ams/ams.xml b/localCoverage/resident_service/config/ams/ams.xml index 9fbe4b6bca8156173ff88a0bf400a1f463433a74..64894c734131f790c800ceecc11070fd6ed3ef71 100644 --- a/localCoverage/resident_service/config/ams/ams.xml +++ b/localCoverage/resident_service/config/ams/ams.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/ams/foundation.xml b/localCoverage/resident_service/config/ams/foundation.xml index 6b8da40fff9804eee374185e77c4a0b10b9e013c..11d2a92046f8a59977b23ebf8d6d1c0ae67503cc 100644 --- a/localCoverage/resident_service/config/ams/foundation.xml +++ b/localCoverage/resident_service/config/ams/foundation.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/bms/bms.xml b/localCoverage/resident_service/config/bms/bms.xml index 6086c2212b3160a16041767d028d7540313629d2..d74a33ec2cdcc33b4d6e0e2199aeeeabeb31dfd4 100644 --- a/localCoverage/resident_service/config/bms/bms.xml +++ b/localCoverage/resident_service/config/bms/bms.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/bms/foundation.xml b/localCoverage/resident_service/config/bms/foundation.xml index 845b3c34e13fc68a2fc0e2c7264c5fcd7c3f4f8f..c7be367c0de6ac02bfd60cfdd8282993ea135cb5 100644 --- a/localCoverage/resident_service/config/bms/foundation.xml +++ b/localCoverage/resident_service/config/bms/foundation.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/call/call.xml b/localCoverage/resident_service/config/call/call.xml index e8d279d29cce1e111fd11792c5e41f69be786ce7..e6f850f613dc16d0fed532b8437195b75b059868 100644 --- a/localCoverage/resident_service/config/call/call.xml +++ b/localCoverage/resident_service/config/call/call.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/call/foundation.xml b/localCoverage/resident_service/config/call/foundation.xml index a8e632c46106d976c1dbedbfcc5bd58c48058c62..d25e2e2c395836bc2b5ebbe3bab8682504be9489 100644 --- a/localCoverage/resident_service/config/call/foundation.xml +++ b/localCoverage/resident_service/config/call/foundation.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/fms/fms.xml b/localCoverage/resident_service/config/fms/fms.xml index abecd7684dd0a334329fc664a453c34ffbcb5e6d..e5f521122231cab248ee8154e62a0677b2ceb9ed 100644 --- a/localCoverage/resident_service/config/fms/fms.xml +++ b/localCoverage/resident_service/config/fms/fms.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/fms/foundation.xml b/localCoverage/resident_service/config/fms/foundation.xml index aae2385e475e903b7df1e2e7368961e76f8c5afb..b4514eb020e506a8ef6893ed1518e5b02738923a 100644 --- a/localCoverage/resident_service/config/fms/foundation.xml +++ b/localCoverage/resident_service/config/fms/foundation.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/notification/foundation.xml b/localCoverage/resident_service/config/notification/foundation.xml index ffcb838bffaabd045d2ce54484d6fc8577809bc2..1951918c690fac8c85822f309524079f57c76d1b 100644 --- a/localCoverage/resident_service/config/notification/foundation.xml +++ b/localCoverage/resident_service/config/notification/foundation.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/notification/notification.xml b/localCoverage/resident_service/config/notification/notification.xml index 259bc9ed9603201ac91063bbe30f5cc172a55068..cc6ad897955ee0835f6e2d6d3faa86ad9e7fabac 100644 --- a/localCoverage/resident_service/config/notification/notification.xml +++ b/localCoverage/resident_service/config/notification/notification.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/power/foundation.xml b/localCoverage/resident_service/config/power/foundation.xml index 8df55e11385800b422a98d234dad49eb058f8480..38a0e7f18b543ae785cff7ce94362d235f174864 100644 --- a/localCoverage/resident_service/config/power/foundation.xml +++ b/localCoverage/resident_service/config/power/foundation.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/power/power.xml b/localCoverage/resident_service/config/power/power.xml index a9f99c8597bb42e3d259c7f8c2fe024112c21920..04e901a21682c5190103e4f3d241509f36ca5eb1 100644 --- a/localCoverage/resident_service/config/power/power.xml +++ b/localCoverage/resident_service/config/power/power.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/state/foundation.xml b/localCoverage/resident_service/config/state/foundation.xml index d72b395825f1dbd88290a3f8b58337c465258c93..864ada0fb74db8c1bd21f9f5765588e6328158e1 100644 --- a/localCoverage/resident_service/config/state/foundation.xml +++ b/localCoverage/resident_service/config/state/foundation.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/state/state.xml b/localCoverage/resident_service/config/state/state.xml index 4fb86e21b20a53d97871ddc486f75ca5065e34ed..511d52f5298b4fec2207cf5f7b5754fbc9614b8e 100644 --- a/localCoverage/resident_service/config/state/state.xml +++ b/localCoverage/resident_service/config/state/state.xml @@ -1,4 +1,19 @@ + + foundation diff --git a/localCoverage/resident_service/config/wms/foundation.xml b/localCoverage/resident_service/config/wms/foundation.xml index f653b6fa902f697f66364817f690703b21eefde3..9cc08186b2ef05e54d55dac26bf2d2af2a436601 100644 --- a/localCoverage/resident_service/config/wms/foundation.xml +++ b/localCoverage/resident_service/config/wms/foundation.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/resident_service/config/wms/wms.xml b/localCoverage/resident_service/config/wms/wms.xml index e74b72ea3d5189b724b08a84bc10158272d98687..826c37f4c51bfb2cc336d350d66cf53d9fa3f354 100644 --- a/localCoverage/resident_service/config/wms/wms.xml +++ b/localCoverage/resident_service/config/wms/wms.xml @@ -1,4 +1,18 @@ + foundation diff --git a/localCoverage/restore_comment/build_before_generate.py b/localCoverage/restore_comment/build_before_generate.py index d5dbfeb303866abce4f165a6342209875e25ee07..b13f32ea984e5c5ee139bd94ebb67a20a6bcc887 100644 --- a/localCoverage/restore_comment/build_before_generate.py +++ b/localCoverage/restore_comment/build_before_generate.py @@ -21,31 +21,6 @@ import subprocess import json -def get_file_list(find_path, postfix=""): - file_names = os.listdir(find_path) - file_list = [] - if len(file_names) > 0: - for fn in file_names: - if postfix != "": - if fn.find(postfix) != -1 and fn[-len(postfix):] == postfix: - file_list.append(fn) - else: - file_list.append(fn) - return - - -def get_file_list_by_postfix(path, postfix=""): - file_list = [] - for dirs in os.walk(path): - files = get_file_list(find_path=dirs[0], postfix=postfix) - for file_name in files: - if "" != file_name and -1 == file_name.find(__file__): - file_name = os.path.join(dirs[0], file_name) - if os.path.isfile(file_name): - file_list.append(file_name) - return file_list - - def get_source_file_list(path): """ 获取path路径下源文件路径列表 @@ -56,7 +31,7 @@ def get_source_file_list(path): for file_name in files: file_path = os.path.join(root, file_name) _, suffix = os.path.splitext(file_name) - if suffix in [".c", ".h", ".cpp"]: + if suffix in [".c", ".cpp"]: file_path_list_append(file_path) return file_path_list @@ -81,15 +56,18 @@ def rewrite_source_file(source_path_list: list): encoding="utf-8", errors="ignore") as write_fp: for line in code_lines: + sign_number = 0 for key in keys: + sign_number += 1 if key in line and line.strip().startswith(key): write_fp.write(line) break - elif " //LCOV_EXCL_BR_LINE" not in line and not line.strip().endswith("\\"): + elif " //LCOV_EXCL_BR_LINE" not in line and not line.strip().endswith("\\") \ + and sign_number == len(keys): write_fp.write(line.strip("\n").strip("\n\r") + " //LCOV_EXCL_BR_LINE") write_fp.write("\n") break - elif key == keys[-1]: + elif sign_number == len(keys): write_fp.write(line) break @@ -107,9 +85,11 @@ def add_lcov(subsystem_config_path): if "path" in value.keys(): for path_str in value["path"]: file_path = os.path.join(root_path, path_str) + primal_path = f"{file_path}_primal" if os.path.exists(file_path): - subprocess.Popen("cp -r %s %s" % ( - file_path, f"{file_path}_primal"), shell=True).communicate() + if not os.path.exists(primal_path): + subprocess.Popen("cp -r %s %s" % ( + file_path, primal_path), shell=True).communicate() source_file_path = get_source_file_list(file_path) rewrite_source_file(source_file_path) else: diff --git a/precise_compilation/.keep b/precise_compilation/.keep deleted file mode 100644 index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..0000000000000000000000000000000000000000 diff --git a/precise_compilation/part_tdd.json b/precise_compilation/part_tdd.json index 9eaa763fa13e4aedef0d5e8f1838774887023993..ed322efa1618bec4f6ca9de787df7aa8e1b39379 100644 --- a/precise_compilation/part_tdd.json +++ b/precise_compilation/part_tdd.json @@ -678,5 +678,83 @@ "name": "graphic_graphic_surface", "parts": "graphic_surface", "buildTarget": "graphic/graphic_surface:graphic_surface_test" + }, + { + "name": "accessibility", + "parts": "accessibility", + "buildTarget": "barrierfree/accessibility:accessibility_test" + }, + { + "name": "drivers_hdf_core", + "parts": "hdf_core", + "buildTarget": "hdf/hdf_core:hdf_core_test" + }, + { + "name": "hiviewdfx_hilog", + "parts": "hilog", + "buildTarget": "hiviewdfx/hilog:hilog_test" + }, + { + "name": "useriam_face_auth", + "parts": "face_auth", + "buildTarget": "useriam/face_auth:face_auth_test" + }, + { + "name": "useriam_fingerprint_auth", + "parts": "fingerprint_auth", + "buildTarget": "useriam/fingerprint_auth:fingerprint_auth_test" + }, + { + "name": "third_party_musl", + "parts": "musl", + "buildTarget": "thirdparty/musl:musl_test" + }, + { + "name": "update_updater", + "parts": "updater", + "buildTarget": "updater/updater:updater_test" + }, + { + "name": "update_update_service", + "parts": "update_service", + "buildTarget": "updater/update_service:update_service_test" + }, + { + "name": "update_sys_installer", + "parts": "sys_installer", + "buildTarget": "updater/sys_installer:sys_installer_test" + }, + { + "name": "resourceschedule_memmgr", + "parts": "memmgr_plugin", + "buildTarget": "resourceschedule/memmgr_plugin:memmgr_plugin_test" + }, + { + "name": "linux_frame_aware_sched", + "parts": "frame_aware_sched", + "buildTarget": "resourceschedule/frame_aware_sched:frame_aware_sched_test" + }, + { + "name": "third_party_mindspore", + "parts": "mindspore", + "buildTarget": "thirdparty/mindspore:mindspore_test" + }, + { + "name": "base_location", + "parts": "location", + "buildTarget": "location/location:location_test" + }, + { + "name": "communication_bluetooth_service", + "parts": "bluetooth_service", + "buildTarget": "communication/bluetooth_service:bluetooth_service_test" + }, + { + "name": "drivers_peripheral", + "buildTarget": "hdf/drivers_peripheral_light:drivers_peripheral_light_test,hdf/drivers_peripheral_battery:drivers_peripheral_battery_test,hdf/drivers_peripheral_memorytracker:drivers_peripheral_memorytracker_test,hdf/drivers_peripheral_sensor:drivers_peripheral_sensor_test,hdf/drivers_peripheral_audio:drivers_peripheral_audio_test,hdf/drivers_peripheral_codec:drivers_peripheral_codec_test,hdf/drivers_peripheral_usb:drivers_peripheral_usb_test,hdf/drivers_peripheral_motion:drivers_peripheral_motion_test,hdf/drivers_peripheral_input:drivers_peripheral_input_test,hdf/drivers_peripheral_distributed_audio:drivers_peripheral_distributed_audio_test,hdf/drivers_peripheral_distributed_camera:drivers_peripheral_distributed_camera_test,hdf/drivers_peripheral_power:drivers_peripheral_power_test,hdf/drivers_peripheral_display:drivers_peripheral_display_test,hdf/drivers_peripheral_wlan:drivers_peripheral_wlan_test,hdf/drivers_peripheral_thermal:drivers_peripheral_thermal_test,hdf/drivers_peripheral_camera:drivers_peripheral_camera_test" + }, + { + "name": "drivers_interface", + "buildTarget": "hdf/drivers_peripheral_light:drivers_peripheral_light_test,hdf/drivers_peripheral_battery:drivers_peripheral_battery_test,hdf/drivers_peripheral_memorytracker:drivers_peripheral_memorytracker_test,hdf/drivers_peripheral_sensor:drivers_peripheral_sensor_test,hdf/drivers_peripheral_audio:drivers_peripheral_audio_test,hdf/drivers_peripheral_codec:drivers_peripheral_codec_test,hdf/drivers_peripheral_usb:drivers_peripheral_usb_test,hdf/drivers_peripheral_motion:drivers_peripheral_motion_test,hdf/drivers_peripheral_input:drivers_peripheral_input_test,hdf/drivers_peripheral_distributed_audio:drivers_peripheral_distributed_audio_test,hdf/drivers_peripheral_distributed_camera:drivers_peripheral_distributed_camera_test,hdf/drivers_peripheral_power:drivers_peripheral_power_test,hdf/drivers_peripheral_display:drivers_peripheral_display_test,hdf/drivers_peripheral_wlan:drivers_peripheral_wlan_test,hdf/drivers_peripheral_thermal:drivers_peripheral_thermal_test,hdf/drivers_peripheral_camera:drivers_peripheral_camera_test" } ] \ No newline at end of file diff --git a/src/core/driver/drivers.py b/src/core/driver/drivers.py index 3fa60f052615cee2d1360fd993795274b045b157..9da4366ab80fb71ccb230de3fb7e4600f19f264a 100644 --- a/src/core/driver/drivers.py +++ b/src/core/driver/drivers.py @@ -101,8 +101,7 @@ class DisplayOutputReceiver: lines = self._process_output(output) for line in lines: line = line.strip() - if "[ RUN ]" in line or "[ OK ]" in line or "[==========]" in line or \ - "[----------]" in line or "[ PASSED ]" in line or "[ FAILED ]" in line: + if line: LOG.info(get_decode(line)) def __error__(self, message): @@ -567,7 +566,8 @@ class CppTestDriver(IDriver): serial = "{}_{}".format(str(request.config.device.__get_serial__()), time.time_ns()) log_tar_file_name = "{}_{}".format(request.get_module_name(), str(serial).replace( ":", "_")) - self.config.device.device_log_collector.stop_hilog_task(log_tar_file_name) + self.config.device.device_log_collector.stop_hilog_task( + log_tar_file_name, module_name=request.get_module_name()) def _init_gtest(self): self.config.device.connector_command("target mount") @@ -1198,9 +1198,13 @@ class OHRustTestDriver(IDriver): log_tar_file_name = "{}_{}".format( request.get_module_name(), str(serial).replace(":", "_")) self.config.device.device_log_collector.stop_hilog_task( - log_tar_file_name) + log_tar_file_name, module_name=request.get_module_name()) self.result = check_result_report( request.config.report_path, self.result, self.error_message) + result_save_path = get_result_savepath( + request.root.source.source_file, self.config.report_path) + shutil.move(self.result, result_save_path) + def _init_oh_rust(self): self.config.device.connector_command("target mount")