From 34b93bf24acc5af17a6ca8ae0947943c2ef101a2 Mon Sep 17 00:00:00 2001 From: qiuxiangdong Date: Mon, 6 Jun 2022 10:00:10 +0800 Subject: [PATCH] fix: The rectification directory Signed-off-by: qiuxiangdong Change-Id: Ic3bf9632c9c616a5a2bc24a203c1da7e75a30c54 --- powermgr/BUILD.gn | 8 +- .../BUILD.gn | 0 .../Test.json | 0 .../signature/openharmony_sx.p7b | Bin .../src/main/config.json | 0 .../src/main/js/default/app.js | 0 .../src/main/js/default/i18n/en-US.json | 0 .../src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 6 - .../src/main/js/default/test/List.test.js | 1 - .../default/test/battery_common_event.test.js | 0 .../main/js/default/test/battery_unit.test.js | 0 .../test/batterymanager_performance.test.js | 0 .../js/default/test/system_battery.test.js | 0 .../main/resources/base/element/string.json | 0 .../src/main/resources/base/media/icon.png | Bin .../BUILD.gn | 0 .../Test.json | 0 .../signature/openharmony_sx.p7b | Bin .../src/main/config.json | 0 .../src/main/js/default/app.js | 0 .../src/main/js/default/i18n/en-US.json | 0 .../src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 0 .../src/main/js/default/test/List.test.js | 0 .../js/default/test/system_display.test.js | 0 .../main/resources/base/element/string.json | 0 .../src/main/resources/base/media/icon.png | Bin .../{powermgrpower => power_manager}/BUILD.gn | 0 .../Test.json | 0 .../signature/openharmony_sx.p7b | Bin .../src/main/config.json | 0 .../src/main/js/default/app.js | 0 .../src/main/js/default/i18n/en-US.json | 0 .../src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 0 .../src/main/js/default/test/List.test.js | 0 .../default/test/power_manager_power.test.js | 0 .../test/power_manager_running_lock.test.js | 0 .../js/default/test/power_performance_test.js | 0 .../main/resources/base/element/string.json | 0 .../src/main/resources/base/media/icon.png | Bin .../test/power_manager_running_lock.test.js | 212 ------------------ .../power_manager_running_lock_dev.test.js | 30 --- .../BUILD.gn | 0 .../README_zh.md | 0 .../Test.json | 0 .../signature/openharmony_sx.p7b | Bin .../src/main/config.json | 0 .../src/main/js/default/app.js | 0 .../src/main/js/default/i18n/en-US.json | 0 .../src/main/js/default/i18n/zh-CN.json | 0 .../src/main/js/default/pages/index/index.css | 0 .../src/main/js/default/pages/index/index.hml | 0 .../src/main/js/default/pages/index/index.js | 0 .../src/main/js/default/test/List.test.js | 0 .../default/test/thermal_common_event.test.js | 0 .../default/test/thermal_performance.test.js | 0 .../main/js/default/test/thermal_uint.test.js | 0 .../js/default/test/thermal_unittest.test.js | 0 .../main/resources/base/element/string.json | 0 .../src/main/resources/base/media/icon.png | Bin .../temp.sh | 0 69 files changed, 4 insertions(+), 253 deletions(-) rename powermgr/{powermgrbattery => battery_manager}/BUILD.gn (100%) rename powermgr/{powermgrbattery => battery_manager}/Test.json (100%) rename powermgr/{powermgrbattery => battery_manager}/signature/openharmony_sx.p7b (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/config.json (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/app.js (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/i18n/en-US.json (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/i18n/zh-CN.json (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/pages/index/index.css (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/pages/index/index.hml (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/pages/index/index.js (80%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/test/List.test.js (87%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/test/battery_common_event.test.js (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/test/battery_unit.test.js (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/test/batterymanager_performance.test.js (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/js/default/test/system_battery.test.js (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/resources/base/element/string.json (100%) rename powermgr/{powermgrbattery => battery_manager}/src/main/resources/base/media/icon.png (100%) rename powermgr/{powermgrdisplay => display_manager}/BUILD.gn (100%) rename powermgr/{powermgrdisplay => display_manager}/Test.json (100%) rename powermgr/{powermgrdisplay => display_manager}/signature/openharmony_sx.p7b (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/config.json (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/js/default/app.js (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/js/default/i18n/en-US.json (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/js/default/i18n/zh-CN.json (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/js/default/pages/index/index.css (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/js/default/pages/index/index.hml (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/js/default/pages/index/index.js (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/js/default/test/List.test.js (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/js/default/test/system_display.test.js (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/resources/base/element/string.json (100%) rename powermgr/{powermgrdisplay => display_manager}/src/main/resources/base/media/icon.png (100%) rename powermgr/{powermgrpower => power_manager}/BUILD.gn (100%) rename powermgr/{powermgrpower => power_manager}/Test.json (100%) rename powermgr/{powermgrpower => power_manager}/signature/openharmony_sx.p7b (100%) rename powermgr/{powermgrpower => power_manager}/src/main/config.json (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/app.js (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/i18n/en-US.json (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/i18n/zh-CN.json (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/pages/index/index.css (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/pages/index/index.hml (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/pages/index/index.js (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/test/List.test.js (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/test/power_manager_power.test.js (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/test/power_manager_running_lock.test.js (100%) rename powermgr/{powermgrpower => power_manager}/src/main/js/default/test/power_performance_test.js (100%) rename powermgr/{powermgrpower => power_manager}/src/main/resources/base/element/string.json (100%) rename powermgr/{powermgrpower => power_manager}/src/main/resources/base/media/icon.png (100%) delete mode 100644 powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock.test.js delete mode 100644 powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js rename powermgr/{powermgrthermal => thermal_manager}/BUILD.gn (100%) rename powermgr/{powermgrthermal => thermal_manager}/README_zh.md (100%) rename powermgr/{powermgrthermal => thermal_manager}/Test.json (100%) rename powermgr/{powermgrthermal => thermal_manager}/signature/openharmony_sx.p7b (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/config.json (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/app.js (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/i18n/en-US.json (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/i18n/zh-CN.json (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/pages/index/index.css (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/pages/index/index.hml (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/pages/index/index.js (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/test/List.test.js (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/test/thermal_common_event.test.js (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/test/thermal_performance.test.js (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/test/thermal_uint.test.js (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/js/default/test/thermal_unittest.test.js (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/resources/base/element/string.json (100%) rename powermgr/{powermgrthermal => thermal_manager}/src/main/resources/base/media/icon.png (100%) rename powermgr/{powermgrthermal => thermal_manager}/temp.sh (100%) diff --git a/powermgr/BUILD.gn b/powermgr/BUILD.gn index c2a9a0439..30727b87d 100755 --- a/powermgr/BUILD.gn +++ b/powermgr/BUILD.gn @@ -14,9 +14,9 @@ import("//build/ohos_var.gni") group("powermgr") { testonly = true deps = [ - "powermgrbattery:powermgr_battery_test", - "powermgrdisplay:powermgr_display_test", - "powermgrpower:powermgr_power_test", - "powermgrthermal:powermgr_thermal_test", + "battery_manager:powermgr_battery_test", + "display_manager:powermgr_display_test", + "power_manager:powermgr_power_test", + "thermal_manager:powermgr_thermal_test", ] } diff --git a/powermgr/powermgrbattery/BUILD.gn b/powermgr/battery_manager/BUILD.gn similarity index 100% rename from powermgr/powermgrbattery/BUILD.gn rename to powermgr/battery_manager/BUILD.gn diff --git a/powermgr/powermgrbattery/Test.json b/powermgr/battery_manager/Test.json similarity index 100% rename from powermgr/powermgrbattery/Test.json rename to powermgr/battery_manager/Test.json diff --git a/powermgr/powermgrbattery/signature/openharmony_sx.p7b b/powermgr/battery_manager/signature/openharmony_sx.p7b similarity index 100% rename from powermgr/powermgrbattery/signature/openharmony_sx.p7b rename to powermgr/battery_manager/signature/openharmony_sx.p7b diff --git a/powermgr/powermgrbattery/src/main/config.json b/powermgr/battery_manager/src/main/config.json similarity index 100% rename from powermgr/powermgrbattery/src/main/config.json rename to powermgr/battery_manager/src/main/config.json diff --git a/powermgr/powermgrbattery/src/main/js/default/app.js b/powermgr/battery_manager/src/main/js/default/app.js similarity index 100% rename from powermgr/powermgrbattery/src/main/js/default/app.js rename to powermgr/battery_manager/src/main/js/default/app.js diff --git a/powermgr/powermgrbattery/src/main/js/default/i18n/en-US.json b/powermgr/battery_manager/src/main/js/default/i18n/en-US.json similarity index 100% rename from powermgr/powermgrbattery/src/main/js/default/i18n/en-US.json rename to powermgr/battery_manager/src/main/js/default/i18n/en-US.json diff --git a/powermgr/powermgrbattery/src/main/js/default/i18n/zh-CN.json b/powermgr/battery_manager/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from powermgr/powermgrbattery/src/main/js/default/i18n/zh-CN.json rename to powermgr/battery_manager/src/main/js/default/i18n/zh-CN.json diff --git a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.css b/powermgr/battery_manager/src/main/js/default/pages/index/index.css similarity index 100% rename from powermgr/powermgrbattery/src/main/js/default/pages/index/index.css rename to powermgr/battery_manager/src/main/js/default/pages/index/index.css diff --git a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml b/powermgr/battery_manager/src/main/js/default/pages/index/index.hml similarity index 100% rename from powermgr/powermgrbattery/src/main/js/default/pages/index/index.hml rename to powermgr/battery_manager/src/main/js/default/pages/index/index.hml diff --git a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.js b/powermgr/battery_manager/src/main/js/default/pages/index/index.js similarity index 80% rename from powermgr/powermgrbattery/src/main/js/default/pages/index/index.js rename to powermgr/battery_manager/src/main/js/default/pages/index/index.js index a1ba7d09f..64c0c1e9f 100755 --- a/powermgr/powermgrbattery/src/main/js/default/pages/index/index.js +++ b/powermgr/battery_manager/src/main/js/default/pages/index/index.js @@ -14,7 +14,6 @@ */ import app from '@system.app' -//import {Core, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index' import {Core, ExpectExtend} from 'deccjsunit/index' export default { @@ -31,12 +30,7 @@ export default { 'id': 'extend' }) core.addService('expect', expectExtend) -// core.addService('report', instrumentLog) core.init() -// core.subscribeEvent('spec', instrumentLog) -// core.subscribeEvent('suite', instrumentLog) -// core.subscribeEvent('task', instrumentLog) - const configService = core.getDefaultService('config') configService.setConfig(this) diff --git a/powermgr/powermgrbattery/src/main/js/default/test/List.test.js b/powermgr/battery_manager/src/main/js/default/test/List.test.js similarity index 87% rename from powermgr/powermgrbattery/src/main/js/default/test/List.test.js rename to powermgr/battery_manager/src/main/js/default/test/List.test.js index e0f9230db..b07d678b0 100644 --- a/powermgr/powermgrbattery/src/main/js/default/test/List.test.js +++ b/powermgr/battery_manager/src/main/js/default/test/List.test.js @@ -14,5 +14,4 @@ */ require('./battery_unit.test.js') require('./battery_common_event.test.js') -require('./power_manager_running_lock.test.js') require('./system_battery.test.js') \ No newline at end of file diff --git a/powermgr/powermgrbattery/src/main/js/default/test/battery_common_event.test.js b/powermgr/battery_manager/src/main/js/default/test/battery_common_event.test.js similarity index 100% rename from powermgr/powermgrbattery/src/main/js/default/test/battery_common_event.test.js rename to powermgr/battery_manager/src/main/js/default/test/battery_common_event.test.js diff --git a/powermgr/powermgrbattery/src/main/js/default/test/battery_unit.test.js b/powermgr/battery_manager/src/main/js/default/test/battery_unit.test.js similarity index 100% rename from powermgr/powermgrbattery/src/main/js/default/test/battery_unit.test.js rename to powermgr/battery_manager/src/main/js/default/test/battery_unit.test.js diff --git a/powermgr/powermgrbattery/src/main/js/default/test/batterymanager_performance.test.js b/powermgr/battery_manager/src/main/js/default/test/batterymanager_performance.test.js similarity index 100% rename from powermgr/powermgrbattery/src/main/js/default/test/batterymanager_performance.test.js rename to powermgr/battery_manager/src/main/js/default/test/batterymanager_performance.test.js diff --git a/powermgr/powermgrbattery/src/main/js/default/test/system_battery.test.js b/powermgr/battery_manager/src/main/js/default/test/system_battery.test.js similarity index 100% rename from powermgr/powermgrbattery/src/main/js/default/test/system_battery.test.js rename to powermgr/battery_manager/src/main/js/default/test/system_battery.test.js diff --git a/powermgr/powermgrbattery/src/main/resources/base/element/string.json b/powermgr/battery_manager/src/main/resources/base/element/string.json similarity index 100% rename from powermgr/powermgrbattery/src/main/resources/base/element/string.json rename to powermgr/battery_manager/src/main/resources/base/element/string.json diff --git a/powermgr/powermgrbattery/src/main/resources/base/media/icon.png b/powermgr/battery_manager/src/main/resources/base/media/icon.png similarity index 100% rename from powermgr/powermgrbattery/src/main/resources/base/media/icon.png rename to powermgr/battery_manager/src/main/resources/base/media/icon.png diff --git a/powermgr/powermgrdisplay/BUILD.gn b/powermgr/display_manager/BUILD.gn similarity index 100% rename from powermgr/powermgrdisplay/BUILD.gn rename to powermgr/display_manager/BUILD.gn diff --git a/powermgr/powermgrdisplay/Test.json b/powermgr/display_manager/Test.json similarity index 100% rename from powermgr/powermgrdisplay/Test.json rename to powermgr/display_manager/Test.json diff --git a/powermgr/powermgrdisplay/signature/openharmony_sx.p7b b/powermgr/display_manager/signature/openharmony_sx.p7b similarity index 100% rename from powermgr/powermgrdisplay/signature/openharmony_sx.p7b rename to powermgr/display_manager/signature/openharmony_sx.p7b diff --git a/powermgr/powermgrdisplay/src/main/config.json b/powermgr/display_manager/src/main/config.json similarity index 100% rename from powermgr/powermgrdisplay/src/main/config.json rename to powermgr/display_manager/src/main/config.json diff --git a/powermgr/powermgrdisplay/src/main/js/default/app.js b/powermgr/display_manager/src/main/js/default/app.js similarity index 100% rename from powermgr/powermgrdisplay/src/main/js/default/app.js rename to powermgr/display_manager/src/main/js/default/app.js diff --git a/powermgr/powermgrdisplay/src/main/js/default/i18n/en-US.json b/powermgr/display_manager/src/main/js/default/i18n/en-US.json similarity index 100% rename from powermgr/powermgrdisplay/src/main/js/default/i18n/en-US.json rename to powermgr/display_manager/src/main/js/default/i18n/en-US.json diff --git a/powermgr/powermgrdisplay/src/main/js/default/i18n/zh-CN.json b/powermgr/display_manager/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from powermgr/powermgrdisplay/src/main/js/default/i18n/zh-CN.json rename to powermgr/display_manager/src/main/js/default/i18n/zh-CN.json diff --git a/powermgr/powermgrdisplay/src/main/js/default/pages/index/index.css b/powermgr/display_manager/src/main/js/default/pages/index/index.css similarity index 100% rename from powermgr/powermgrdisplay/src/main/js/default/pages/index/index.css rename to powermgr/display_manager/src/main/js/default/pages/index/index.css diff --git a/powermgr/powermgrdisplay/src/main/js/default/pages/index/index.hml b/powermgr/display_manager/src/main/js/default/pages/index/index.hml similarity index 100% rename from powermgr/powermgrdisplay/src/main/js/default/pages/index/index.hml rename to powermgr/display_manager/src/main/js/default/pages/index/index.hml diff --git a/powermgr/powermgrdisplay/src/main/js/default/pages/index/index.js b/powermgr/display_manager/src/main/js/default/pages/index/index.js similarity index 100% rename from powermgr/powermgrdisplay/src/main/js/default/pages/index/index.js rename to powermgr/display_manager/src/main/js/default/pages/index/index.js diff --git a/powermgr/powermgrdisplay/src/main/js/default/test/List.test.js b/powermgr/display_manager/src/main/js/default/test/List.test.js similarity index 100% rename from powermgr/powermgrdisplay/src/main/js/default/test/List.test.js rename to powermgr/display_manager/src/main/js/default/test/List.test.js diff --git a/powermgr/powermgrdisplay/src/main/js/default/test/system_display.test.js b/powermgr/display_manager/src/main/js/default/test/system_display.test.js similarity index 100% rename from powermgr/powermgrdisplay/src/main/js/default/test/system_display.test.js rename to powermgr/display_manager/src/main/js/default/test/system_display.test.js diff --git a/powermgr/powermgrdisplay/src/main/resources/base/element/string.json b/powermgr/display_manager/src/main/resources/base/element/string.json similarity index 100% rename from powermgr/powermgrdisplay/src/main/resources/base/element/string.json rename to powermgr/display_manager/src/main/resources/base/element/string.json diff --git a/powermgr/powermgrdisplay/src/main/resources/base/media/icon.png b/powermgr/display_manager/src/main/resources/base/media/icon.png similarity index 100% rename from powermgr/powermgrdisplay/src/main/resources/base/media/icon.png rename to powermgr/display_manager/src/main/resources/base/media/icon.png diff --git a/powermgr/powermgrpower/BUILD.gn b/powermgr/power_manager/BUILD.gn similarity index 100% rename from powermgr/powermgrpower/BUILD.gn rename to powermgr/power_manager/BUILD.gn diff --git a/powermgr/powermgrpower/Test.json b/powermgr/power_manager/Test.json similarity index 100% rename from powermgr/powermgrpower/Test.json rename to powermgr/power_manager/Test.json diff --git a/powermgr/powermgrpower/signature/openharmony_sx.p7b b/powermgr/power_manager/signature/openharmony_sx.p7b similarity index 100% rename from powermgr/powermgrpower/signature/openharmony_sx.p7b rename to powermgr/power_manager/signature/openharmony_sx.p7b diff --git a/powermgr/powermgrpower/src/main/config.json b/powermgr/power_manager/src/main/config.json similarity index 100% rename from powermgr/powermgrpower/src/main/config.json rename to powermgr/power_manager/src/main/config.json diff --git a/powermgr/powermgrpower/src/main/js/default/app.js b/powermgr/power_manager/src/main/js/default/app.js similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/app.js rename to powermgr/power_manager/src/main/js/default/app.js diff --git a/powermgr/powermgrpower/src/main/js/default/i18n/en-US.json b/powermgr/power_manager/src/main/js/default/i18n/en-US.json similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/i18n/en-US.json rename to powermgr/power_manager/src/main/js/default/i18n/en-US.json diff --git a/powermgr/powermgrpower/src/main/js/default/i18n/zh-CN.json b/powermgr/power_manager/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/i18n/zh-CN.json rename to powermgr/power_manager/src/main/js/default/i18n/zh-CN.json diff --git a/powermgr/powermgrpower/src/main/js/default/pages/index/index.css b/powermgr/power_manager/src/main/js/default/pages/index/index.css similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/pages/index/index.css rename to powermgr/power_manager/src/main/js/default/pages/index/index.css diff --git a/powermgr/powermgrpower/src/main/js/default/pages/index/index.hml b/powermgr/power_manager/src/main/js/default/pages/index/index.hml similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/pages/index/index.hml rename to powermgr/power_manager/src/main/js/default/pages/index/index.hml diff --git a/powermgr/powermgrpower/src/main/js/default/pages/index/index.js b/powermgr/power_manager/src/main/js/default/pages/index/index.js similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/pages/index/index.js rename to powermgr/power_manager/src/main/js/default/pages/index/index.js diff --git a/powermgr/powermgrpower/src/main/js/default/test/List.test.js b/powermgr/power_manager/src/main/js/default/test/List.test.js similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/test/List.test.js rename to powermgr/power_manager/src/main/js/default/test/List.test.js diff --git a/powermgr/powermgrpower/src/main/js/default/test/power_manager_power.test.js b/powermgr/power_manager/src/main/js/default/test/power_manager_power.test.js similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/test/power_manager_power.test.js rename to powermgr/power_manager/src/main/js/default/test/power_manager_power.test.js diff --git a/powermgr/powermgrpower/src/main/js/default/test/power_manager_running_lock.test.js b/powermgr/power_manager/src/main/js/default/test/power_manager_running_lock.test.js similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/test/power_manager_running_lock.test.js rename to powermgr/power_manager/src/main/js/default/test/power_manager_running_lock.test.js diff --git a/powermgr/powermgrpower/src/main/js/default/test/power_performance_test.js b/powermgr/power_manager/src/main/js/default/test/power_performance_test.js similarity index 100% rename from powermgr/powermgrpower/src/main/js/default/test/power_performance_test.js rename to powermgr/power_manager/src/main/js/default/test/power_performance_test.js diff --git a/powermgr/powermgrpower/src/main/resources/base/element/string.json b/powermgr/power_manager/src/main/resources/base/element/string.json similarity index 100% rename from powermgr/powermgrpower/src/main/resources/base/element/string.json rename to powermgr/power_manager/src/main/resources/base/element/string.json diff --git a/powermgr/powermgrpower/src/main/resources/base/media/icon.png b/powermgr/power_manager/src/main/resources/base/media/icon.png similarity index 100% rename from powermgr/powermgrpower/src/main/resources/base/media/icon.png rename to powermgr/power_manager/src/main/resources/base/media/icon.png diff --git a/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock.test.js b/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock.test.js deleted file mode 100644 index 6493612e1..000000000 --- a/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock.test.js +++ /dev/null @@ -1,212 +0,0 @@ -/* - * Copyright (C) 2021 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 app from '@system.app' -import Context from '@ohos.napi_context' -import runningLock from '@ohos.runningLock'; -import power from '@ohos.power'; -import '@ohos.permission.RUNNING_LOCK' - -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' - -describe('appInfoTest', function () { - console.log("*************Power Unit Test Begin*************"); - //createRunningLock(name: string, type: RunningLockType): Promise - it('create_running_lock_promise_test', 0, async function (done) { - runningLock.createRunningLock("running_lock_test_1", runningLock.RunningLockType.BACKGROUND) - .then(runninglock => { - expect(runninglock !== null).assertTrue(); - console.info('create_running_lock_promise_test success'); - done(); - }) - .catch(error => { - console.log('create_running_lock_promise_test error: ' + error); - expect().assertFail(); - done(); - }) - }) - //createRunningLock(name: string, type: RunningLockType, callback: AsyncCallback) - it('create_running_lock_callback_test', 0, async function (done) { - runningLock.createRunningLock("running_lock_test_2", runningLock.RunningLockType.BACKGROUND, (error, runninglock) => { - if (typeof error === "undefined") { - console.info('create_running_lock_callback_test: runningLock is ' + runninglock); - expect(runninglock !== null).assertTrue(); - let used = runninglock.isUsed(); - console.info('create_running_lock_callback_test is used: ' + used); - expect(used).assertFalse(); - runninglock.lock(500); - used = runninglock.isUsed(); - console.info('after lock create_running_lock_callback_test is used: ' + used); - expect(used).assertTrue(); - console.info('create_running_lock_callback_test success'); - done(); - } else { - console.log('create_running_lock_callback_test: ' + error); - expect().assertFail(); - done(); - } - }) - }) - //lock(timeout: number) - it('running_lock_lock_test', 0, async function (done) { - runningLock.createRunningLock("running_lock_test_3", runningLock.RunningLockType.BACKGROUND) - .then(runninglock => { - expect(runninglock !== null).assertTrue(); - let used = runninglock.isUsed(); - console.info('running_lock_lock_test is used: ' + used); - expect(used).assertFalse(); - runninglock.lock(500); - used = runninglock.isUsed(); - console.info('after lock running_lock_lock_test is used: ' + used); - expect(used).assertTrue(); - console.info('running_lock_lock_test success'); - done(); - }) - .catch(error => { - console.log('running_lock_lock_test error: ' + error); - expect().assertFail(); - done(); - }) - }) - //isUsed() - it('running_lock_isused_test', 0, async function (done) { - runningLock.createRunningLock("running_lock_test_4", runningLock.RunningLockType.BACKGROUND) - .then(runninglock => { - expect(runninglock !== null).assertTrue(); - let used = runninglock.isUsed(); - console.info('running_lock_isused_test used: ' + used); - expect(used).assertFalse(); - console.info('running_lock_isused_test success'); - done(); - }) - .catch(error => { - console.log('running_lock_isused_test error: ' + error); - expect().assertFail(); - done(); - }) - }) - //unlock() - it('running_lock_unlock_test', 0, async function (done) { - runningLock.createRunningLock("running_lock_test_5", runningLock.RunningLockType.BACKGROUND) - .then(runninglock => { - expect(runninglock !== null).assertTrue(); - let used = runninglock.isUsed(); - console.info('running_lock_unlock_test is used: ' + used); - expect(used).assertFalse(); - runninglock.lock(500); - used = runninglock.isUsed(); - console.info('after lock running_lock_unlock_test is used: ' + used); - expect(used).assertTrue(); - runninglock.unlock(); - used = runninglock.isUsed(); - console.info('after unlock running_lock_unlock_test is used: ' + used); - expect(used).assertFalse(); - console.info('running_lock_unlock_test success'); - done(); - }) - .catch(error => { - console.log('running_lock_unlock_test error: ' + error); - expect().assertFail(); - done(); - }) - }) - //Runninglock锁的类型为BACKGROUND - it('enum_runningLock_type_background_test', 0, function () { - let runningLockType = runningLock.RunningLockType.BACKGROUND; - console.info('runningLockType = ' + runningLockType); - expect(runningLockType == 1).assertTrue(); - console.info('enum_runningLock_type_background_test success'); - }) - //Runninglock锁的类型为PROXIMITY_SCREEN_CONTROL - it('enum_runningLock_type_proximityscreencontrol_test', 0, function () { - let runningLockType = runningLock.RunningLockType.PROXIMITY_SCREEN_CONTROL; - console.info('runningLockType = ' + runningLockType); - expect(runningLockType == 2).assertTrue(); - console.info('enum_runningLock_type_proximityscreencontrol_test success'); - }) - //isRunningLockTypeSupported(type: RunningLockType): Promise - it('is_runninglock_type_supported_promise_test_1', 0, async function (done) { - runningLock.isRunningLockTypeSupported(runningLock.RunningLockType.PROXIMITY_SCREEN_CONTROL) - .then(supported => { - console.info('is_runninglock_type_supported_test_1 PROXIMITY_SCREEN_CONTROL supported is ' + supported); - expect(supported).assertTrue(); - console.info('is_runninglock_type_supported_test_1 success'); - done(); - }) - .catch(error => { - console.log('is_runninglock_type_supported_test_1 error: ' + error); - expect().assertFail(); - done(); - }) - }) - //isRunningLockTypeSupported(type: RunningLockType) 多余 - it('is_runninglock_type_supported_promise_test_2', 0, async function (done) { - runningLock.isRunningLockTypeSupported(runningLock.RunningLockType.BACKGROUND) - .then(supported => { - console.info('is_runninglock_type_supported_promise_test_2 BACKGROUND supported is ' + supported); - expect(supported).assertTrue(); - console.info('is_runninglock_type_supported_promise_test_2 success'); - done(); - }) - .catch(error => { - console.log('is_runninglock_type_supported_promise_test_2 error: ' + error); - expect().assertFail(); - done(); - }) - }) - //isRunningLockTypeSupported(type: RunningLockType, callback: AsyncCallback) - it('is_runninglock_type_supported_callback_test_3', 0, async function (done) { - runningLock.isRunningLockTypeSupported(runningLock.RunningLockType.BACKGROUND, (error, supported) => { - if (typeof error === "undefined") { - console.info('is_runninglock_type_supported_callback_test_3 BACKGROUND supported is ' + supported); - expect(supported).assertTrue(); - console.info('is_runninglock_type_supported_callback_test_3 success'); - done(); - } else { - console.log('is_runninglock_type_supported_callback_test_3: ' + error); - expect().assertFail(); - done(); - } - }) - }) - it('power_is_screen_on_promise_test', 0, async function (done) {//isScreenOn(): Promise - power.isScreenOn() - .then(screenOn => { - console.info('power_is_screen_on_promise_test screenOn is ' + screenOn); - expect(screenOn).assertTrue(); - console.info('power_is_screen_on_promise_test success'); - done(); - }) - .catch(error => { - console.log('power_is_screen_on_promise_test error: ' + error); - expect().assertFail(); - done(); - }) - }) - it('power_is_screen_on_callback_test', 0, async function (done) {//isScreenOn(callback: AsyncCallback) - power.isScreenOn((error, screenOn) => { - if (typeof error === "undefined") { - console.info('power_is_screen_on_callback_test screenOn is ' + screenOn); - expect(screenOn).assertTrue(); - console.info('power_is_screen_on_callback_test success'); - done(); - } else { - console.log('power_is_screen_on_callback_test: ' + error); - expect().assertFail(); - done(); - } - }) - }) -}) diff --git a/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js b/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js deleted file mode 100644 index b65aec22d..000000000 --- a/powermgr/powermgrbattery/src/main/js/default/test/power_manager_running_lock_dev.test.js +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright (C) 2021 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 app from '@system.app' -import Context from '@ohos.napi_context' -import runningLock from '@ohos.runningLock'; -import power from '@ohos.power'; -import '@ohos.permission.RUNNING_LOCK' - -import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from 'deccjsunit/index' - -describe('appInfoTest', function () { - console.log("*************Power Unit Test Begin*************"); - it('power_reboot_device_test', 0, function () {//rebootDevice(reason: string): void - power.rebootDevice("power_js_test_reboot"); - console.info('power_reboot_device_test success'); - }) -}) diff --git a/powermgr/powermgrthermal/BUILD.gn b/powermgr/thermal_manager/BUILD.gn similarity index 100% rename from powermgr/powermgrthermal/BUILD.gn rename to powermgr/thermal_manager/BUILD.gn diff --git a/powermgr/powermgrthermal/README_zh.md b/powermgr/thermal_manager/README_zh.md similarity index 100% rename from powermgr/powermgrthermal/README_zh.md rename to powermgr/thermal_manager/README_zh.md diff --git a/powermgr/powermgrthermal/Test.json b/powermgr/thermal_manager/Test.json similarity index 100% rename from powermgr/powermgrthermal/Test.json rename to powermgr/thermal_manager/Test.json diff --git a/powermgr/powermgrthermal/signature/openharmony_sx.p7b b/powermgr/thermal_manager/signature/openharmony_sx.p7b similarity index 100% rename from powermgr/powermgrthermal/signature/openharmony_sx.p7b rename to powermgr/thermal_manager/signature/openharmony_sx.p7b diff --git a/powermgr/powermgrthermal/src/main/config.json b/powermgr/thermal_manager/src/main/config.json similarity index 100% rename from powermgr/powermgrthermal/src/main/config.json rename to powermgr/thermal_manager/src/main/config.json diff --git a/powermgr/powermgrthermal/src/main/js/default/app.js b/powermgr/thermal_manager/src/main/js/default/app.js similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/app.js rename to powermgr/thermal_manager/src/main/js/default/app.js diff --git a/powermgr/powermgrthermal/src/main/js/default/i18n/en-US.json b/powermgr/thermal_manager/src/main/js/default/i18n/en-US.json similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/i18n/en-US.json rename to powermgr/thermal_manager/src/main/js/default/i18n/en-US.json diff --git a/powermgr/powermgrthermal/src/main/js/default/i18n/zh-CN.json b/powermgr/thermal_manager/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/i18n/zh-CN.json rename to powermgr/thermal_manager/src/main/js/default/i18n/zh-CN.json diff --git a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.css b/powermgr/thermal_manager/src/main/js/default/pages/index/index.css similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/pages/index/index.css rename to powermgr/thermal_manager/src/main/js/default/pages/index/index.css diff --git a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml b/powermgr/thermal_manager/src/main/js/default/pages/index/index.hml similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/pages/index/index.hml rename to powermgr/thermal_manager/src/main/js/default/pages/index/index.hml diff --git a/powermgr/powermgrthermal/src/main/js/default/pages/index/index.js b/powermgr/thermal_manager/src/main/js/default/pages/index/index.js similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/pages/index/index.js rename to powermgr/thermal_manager/src/main/js/default/pages/index/index.js diff --git a/powermgr/powermgrthermal/src/main/js/default/test/List.test.js b/powermgr/thermal_manager/src/main/js/default/test/List.test.js similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/test/List.test.js rename to powermgr/thermal_manager/src/main/js/default/test/List.test.js diff --git a/powermgr/powermgrthermal/src/main/js/default/test/thermal_common_event.test.js b/powermgr/thermal_manager/src/main/js/default/test/thermal_common_event.test.js similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/test/thermal_common_event.test.js rename to powermgr/thermal_manager/src/main/js/default/test/thermal_common_event.test.js diff --git a/powermgr/powermgrthermal/src/main/js/default/test/thermal_performance.test.js b/powermgr/thermal_manager/src/main/js/default/test/thermal_performance.test.js similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/test/thermal_performance.test.js rename to powermgr/thermal_manager/src/main/js/default/test/thermal_performance.test.js diff --git a/powermgr/powermgrthermal/src/main/js/default/test/thermal_uint.test.js b/powermgr/thermal_manager/src/main/js/default/test/thermal_uint.test.js similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/test/thermal_uint.test.js rename to powermgr/thermal_manager/src/main/js/default/test/thermal_uint.test.js diff --git a/powermgr/powermgrthermal/src/main/js/default/test/thermal_unittest.test.js b/powermgr/thermal_manager/src/main/js/default/test/thermal_unittest.test.js similarity index 100% rename from powermgr/powermgrthermal/src/main/js/default/test/thermal_unittest.test.js rename to powermgr/thermal_manager/src/main/js/default/test/thermal_unittest.test.js diff --git a/powermgr/powermgrthermal/src/main/resources/base/element/string.json b/powermgr/thermal_manager/src/main/resources/base/element/string.json similarity index 100% rename from powermgr/powermgrthermal/src/main/resources/base/element/string.json rename to powermgr/thermal_manager/src/main/resources/base/element/string.json diff --git a/powermgr/powermgrthermal/src/main/resources/base/media/icon.png b/powermgr/thermal_manager/src/main/resources/base/media/icon.png similarity index 100% rename from powermgr/powermgrthermal/src/main/resources/base/media/icon.png rename to powermgr/thermal_manager/src/main/resources/base/media/icon.png diff --git a/powermgr/powermgrthermal/temp.sh b/powermgr/thermal_manager/temp.sh similarity index 100% rename from powermgr/powermgrthermal/temp.sh rename to powermgr/thermal_manager/temp.sh -- GitLab