diff --git a/storage/storageerrorjstest/BUILD.gn b/storage/storageerrorjstest/BUILD.gn index f03e5a5ddd533fa845221f5a687fe896ff7404a9..14b6b8a9727ce9e4fe367056d79693a6a9a8d0cb 100644 --- a/storage/storageerrorjstest/BUILD.gn +++ b/storage/storageerrorjstest/BUILD.gn @@ -13,6 +13,24 @@ import("//test/xts/tools/build/suite.gni") ohos_js_hap_suite("storagefileioerror_js_test") { - test_hap_name = "storagefileioerrorjstest" - hap_source_path = "hap/entry-debug-rich-signed.hap" + hap_profile = "./src/main/config.json" + deps = [ + ":storagefileioerror_js_assets", + ":storagefileioerror_js_resources", + ] +# shared_libraries = [ +# "//third_party/giflib:libgif", +# "//third_party/libpng:libpng", +# ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "storagefileioerrorjstest" +# part_name = "prebuilt_hap" +# subsystem_name = "xts" } +ohos_js_assets("storagefileioerror_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("storagefileioerror_js_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" +} \ No newline at end of file diff --git a/storage/storageerrorjstest/hap/entry-debug-rich-signed.hap b/storage/storageerrorjstest/hap/entry-debug-rich-signed.hap deleted file mode 100644 index 0f9cb18ddec9a65763600009b7a33822522e1880..0000000000000000000000000000000000000000 Binary files a/storage/storageerrorjstest/hap/entry-debug-rich-signed.hap and /dev/null differ diff --git a/storage/storageerrorjstest/project/entry/package.json b/storage/storageerrorjstest/project/entry/package.json deleted file mode 100644 index 4cf06fee5959d788e6cb205ae961a5c1cacd65b9..0000000000000000000000000000000000000000 --- a/storage/storageerrorjstest/project/entry/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.1" - } -} diff --git a/storage/storageerrorjstest/signature/openharmony_sx.p7b b/storage/storageerrorjstest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/storage/storageerrorjstest/signature/openharmony_sx.p7b differ diff --git a/storage/storagefileiojstest/project/entry/src/main/config.json b/storage/storageerrorjstest/src/main/config.json similarity index 96% rename from storage/storagefileiojstest/project/entry/src/main/config.json rename to storage/storageerrorjstest/src/main/config.json index 12fda07721102cdd208f3d9021a250592706579a..9b7cfe5d04d1f2f807e5c7dc8ceff403cde6a9df 100644 --- a/storage/storagefileiojstest/project/entry/src/main/config.json +++ b/storage/storageerrorjstest/src/main/config.json @@ -8,8 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 5, - "releaseType": "Release" + "target": 5 } }, "deviceConfig": {}, diff --git a/storage/storageerrorjstest/project/entry/src/main/js/default/app.js b/storage/storageerrorjstest/src/main/js/default/app.js similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/default/app.js rename to storage/storageerrorjstest/src/main/js/default/app.js diff --git a/storage/storageerrorjstest/project/entry/src/main/js/default/i18n/en-US.json b/storage/storageerrorjstest/src/main/js/default/i18n/en-US.json similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/default/i18n/en-US.json rename to storage/storageerrorjstest/src/main/js/default/i18n/en-US.json diff --git a/storage/storageerrorjstest/project/entry/src/main/js/default/i18n/zh-CN.json b/storage/storageerrorjstest/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/default/i18n/zh-CN.json rename to storage/storageerrorjstest/src/main/js/default/i18n/zh-CN.json diff --git a/storage/storageerrorjstest/project/entry/src/main/js/default/pages/index/index.css b/storage/storageerrorjstest/src/main/js/default/pages/index/index.css similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/default/pages/index/index.css rename to storage/storageerrorjstest/src/main/js/default/pages/index/index.css diff --git a/storage/storageerrorjstest/project/entry/src/main/js/default/pages/index/index.hml b/storage/storageerrorjstest/src/main/js/default/pages/index/index.hml similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/default/pages/index/index.hml rename to storage/storageerrorjstest/src/main/js/default/pages/index/index.hml diff --git a/storage/storageerrorjstest/project/entry/src/main/js/default/pages/index/index.js b/storage/storageerrorjstest/src/main/js/default/pages/index/index.js similarity index 93% rename from storage/storageerrorjstest/project/entry/src/main/js/default/pages/index/index.js rename to storage/storageerrorjstest/src/main/js/default/pages/index/index.js index 572ce6e94d0cd867a15eb94b1b7b0da9497a99b3..36886d2e9943155582084f4222205a7e1686aad2 100644 --- a/storage/storageerrorjstest/project/entry/src/main/js/default/pages/index/index.js +++ b/storage/storageerrorjstest/src/main/js/default/pages/index/index.js @@ -13,7 +13,6 @@ * limitations under the License. */ -import file from '@system.file' import app from '@system.app' import {Core} from 'deccjsunit/index' @@ -30,7 +29,7 @@ export default { core.init() const configService = core.getDefaultService('config') configService.setConfig(this) - require('../../../test/List.test') + require('../../test/List.test') core.execute() }, onReady() { diff --git a/storage/storageerrorjstest/project/entry/src/main/js/test/Common.js b/storage/storageerrorjstest/src/main/js/default/test/Common.js similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/test/Common.js rename to storage/storageerrorjstest/src/main/js/default/test/Common.js diff --git a/storage/storageerrorjstest/project/entry/src/main/js/test/FileError.test.js b/storage/storageerrorjstest/src/main/js/default/test/FileError.test.js similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/test/FileError.test.js rename to storage/storageerrorjstest/src/main/js/default/test/FileError.test.js diff --git a/storage/storageerrorjstest/project/entry/src/main/js/test/FileIOError.test.js b/storage/storageerrorjstest/src/main/js/default/test/FileIOError.test.js similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/test/FileIOError.test.js rename to storage/storageerrorjstest/src/main/js/default/test/FileIOError.test.js diff --git a/storage/storageerrorjstest/project/entry/src/main/js/test/FileVirtualPath.test.js b/storage/storageerrorjstest/src/main/js/default/test/FileVirtualPath.test.js similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/test/FileVirtualPath.test.js rename to storage/storageerrorjstest/src/main/js/default/test/FileVirtualPath.test.js diff --git a/storage/storageerrorjstest/project/entry/src/main/js/test/List.test.js b/storage/storageerrorjstest/src/main/js/default/test/List.test.js similarity index 100% rename from storage/storageerrorjstest/project/entry/src/main/js/test/List.test.js rename to storage/storageerrorjstest/src/main/js/default/test/List.test.js diff --git a/storage/storageerrorjstest/src/main/resources/base/element/string.json b/storage/storageerrorjstest/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..0fd37c950e3e7c25acb4b632b057c2c4e181fac0 --- /dev/null +++ b/storage/storageerrorjstest/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "storagefileioerrorjstest" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/storage/storageerrorjstest/src/main/resources/base/media/icon.png b/storage/storageerrorjstest/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/storage/storageerrorjstest/src/main/resources/base/media/icon.png differ diff --git a/storage/storagefileconcurrentjstest/BUILD.gn b/storage/storagefileconcurrentjstest/BUILD.gn index 1c8d7d293e24e7c4f2829bd88a54ba0cd0e9b9bd..e0d87da5eeb95fa2be8cb49b08ef8c21c9906ce8 100644 --- a/storage/storagefileconcurrentjstest/BUILD.gn +++ b/storage/storagefileconcurrentjstest/BUILD.gn @@ -13,6 +13,24 @@ import("//test/xts/tools/build/suite.gni") ohos_js_hap_suite("storagefileconcurrent_js_test") { - test_hap_name = "storagefileconcurrentjstest" - hap_source_path = "hap/entry-debug-rich-signed.hap" + hap_profile = "./src/main/config.json" + deps = [ + ":storagefileconcurrent_js_assets", + ":storagefileconcurrent_js_resources", + ] +# shared_libraries = [ +# "//third_party/giflib:libgif", +# "//third_party/libpng:libpng", +# ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "storagefileconcurrentjstest" +# part_name = "prebuilt_hap" +# subsystem_name = "xts" +} +ohos_js_assets("storagefileconcurrent_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("storagefileconcurrent_js_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" } diff --git a/storage/storagefileconcurrentjstest/hap/entry-debug-rich-signed.hap b/storage/storagefileconcurrentjstest/hap/entry-debug-rich-signed.hap deleted file mode 100644 index f50cd112701e2db182fcd0a96f610b15e452a36f..0000000000000000000000000000000000000000 Binary files a/storage/storagefileconcurrentjstest/hap/entry-debug-rich-signed.hap and /dev/null differ diff --git a/storage/storagefileconcurrentjstest/project/entry/package.json b/storage/storagefileconcurrentjstest/project/entry/package.json deleted file mode 100644 index 4cf06fee5959d788e6cb205ae961a5c1cacd65b9..0000000000000000000000000000000000000000 --- a/storage/storagefileconcurrentjstest/project/entry/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.1" - } -} diff --git a/storage/storagefileconcurrentjstest/signature/openharmony_sx.p7b b/storage/storagefileconcurrentjstest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/storage/storagefileconcurrentjstest/signature/openharmony_sx.p7b differ diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/config.json b/storage/storagefileconcurrentjstest/src/main/config.json similarity index 96% rename from storage/storagefileconcurrentjstest/project/entry/src/main/config.json rename to storage/storagefileconcurrentjstest/src/main/config.json index 12fda07721102cdd208f3d9021a250592706579a..9b7cfe5d04d1f2f807e5c7dc8ceff403cde6a9df 100644 --- a/storage/storagefileconcurrentjstest/project/entry/src/main/config.json +++ b/storage/storagefileconcurrentjstest/src/main/config.json @@ -8,8 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 5, - "releaseType": "Release" + "target": 5 } }, "deviceConfig": {}, diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/js/default/app.js b/storage/storagefileconcurrentjstest/src/main/js/default/app.js similarity index 100% rename from storage/storagefileconcurrentjstest/project/entry/src/main/js/default/app.js rename to storage/storagefileconcurrentjstest/src/main/js/default/app.js diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/js/default/i18n/en-US.json b/storage/storagefileconcurrentjstest/src/main/js/default/i18n/en-US.json similarity index 100% rename from storage/storagefileconcurrentjstest/project/entry/src/main/js/default/i18n/en-US.json rename to storage/storagefileconcurrentjstest/src/main/js/default/i18n/en-US.json diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/js/default/i18n/zh-CN.json b/storage/storagefileconcurrentjstest/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from storage/storagefileconcurrentjstest/project/entry/src/main/js/default/i18n/zh-CN.json rename to storage/storagefileconcurrentjstest/src/main/js/default/i18n/zh-CN.json diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/js/default/pages/index/index.css b/storage/storagefileconcurrentjstest/src/main/js/default/pages/index/index.css similarity index 100% rename from storage/storagefileconcurrentjstest/project/entry/src/main/js/default/pages/index/index.css rename to storage/storagefileconcurrentjstest/src/main/js/default/pages/index/index.css diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/js/default/pages/index/index.hml b/storage/storagefileconcurrentjstest/src/main/js/default/pages/index/index.hml similarity index 100% rename from storage/storagefileconcurrentjstest/project/entry/src/main/js/default/pages/index/index.hml rename to storage/storagefileconcurrentjstest/src/main/js/default/pages/index/index.hml diff --git a/storage/storagefileiojstest/project/entry/src/main/js/default/pages/index/index.js b/storage/storagefileconcurrentjstest/src/main/js/default/pages/index/index.js similarity index 93% rename from storage/storagefileiojstest/project/entry/src/main/js/default/pages/index/index.js rename to storage/storagefileconcurrentjstest/src/main/js/default/pages/index/index.js index 572ce6e94d0cd867a15eb94b1b7b0da9497a99b3..36886d2e9943155582084f4222205a7e1686aad2 100644 --- a/storage/storagefileiojstest/project/entry/src/main/js/default/pages/index/index.js +++ b/storage/storagefileconcurrentjstest/src/main/js/default/pages/index/index.js @@ -13,7 +13,6 @@ * limitations under the License. */ -import file from '@system.file' import app from '@system.app' import {Core} from 'deccjsunit/index' @@ -30,7 +29,7 @@ export default { core.init() const configService = core.getDefaultService('config') configService.setConfig(this) - require('../../../test/List.test') + require('../../test/List.test') core.execute() }, onReady() { diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/js/test/Common.js b/storage/storagefileconcurrentjstest/src/main/js/default/test/Common.js similarity index 100% rename from storage/storagefileconcurrentjstest/project/entry/src/main/js/test/Common.js rename to storage/storagefileconcurrentjstest/src/main/js/default/test/Common.js diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/js/test/FileConcurrent.test.js b/storage/storagefileconcurrentjstest/src/main/js/default/test/FileConcurrent.test.js similarity index 100% rename from storage/storagefileconcurrentjstest/project/entry/src/main/js/test/FileConcurrent.test.js rename to storage/storagefileconcurrentjstest/src/main/js/default/test/FileConcurrent.test.js diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/js/test/List.test.js b/storage/storagefileconcurrentjstest/src/main/js/default/test/List.test.js similarity index 100% rename from storage/storagefileconcurrentjstest/project/entry/src/main/js/test/List.test.js rename to storage/storagefileconcurrentjstest/src/main/js/default/test/List.test.js diff --git a/storage/storagefileconcurrentjstest/src/main/resources/base/element/string.json b/storage/storagefileconcurrentjstest/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..7c3790708107c4cc355743fb4dde94f5922c09f0 --- /dev/null +++ b/storage/storagefileconcurrentjstest/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "storagefileconcurrentjstest" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/storage/storagefileconcurrentjstest/src/main/resources/base/media/icon.png b/storage/storagefileconcurrentjstest/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/storage/storagefileconcurrentjstest/src/main/resources/base/media/icon.png differ diff --git a/storage/storagefileiojstest/BUILD.gn b/storage/storagefileiojstest/BUILD.gn index 6a5383c531151cea2a4fefd1646338658a9d5803..73cfe90e587aa6021d65a906bc35e2169820d59c 100644 --- a/storage/storagefileiojstest/BUILD.gn +++ b/storage/storagefileiojstest/BUILD.gn @@ -13,6 +13,24 @@ import("//test/xts/tools/build/suite.gni") ohos_js_hap_suite("storagefileio_js_test") { - test_hap_name = "Storagefileiojstest" - hap_source_path = "hap/entry-debug-rich-signed.hap" + hap_profile = "./src/main/config.json" + deps = [ + ":storagefileio_js_assets", + ":storagefileio_js_resources", + ] +# shared_libraries = [ +# "//third_party/giflib:libgif", +# "//third_party/libpng:libpng", +# ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "Storagefileiojstest" +# part_name = "prebuilt_hap" +# subsystem_name = "xts" } +ohos_js_assets("storagefileio_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("storagefileio_js_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" +} \ No newline at end of file diff --git a/storage/storagefileiojstest/hap/entry-debug-rich-signed.hap b/storage/storagefileiojstest/hap/entry-debug-rich-signed.hap deleted file mode 100644 index 811743ae375d1798a868bd09f85d49c3152be321..0000000000000000000000000000000000000000 Binary files a/storage/storagefileiojstest/hap/entry-debug-rich-signed.hap and /dev/null differ diff --git a/storage/storagefileiojstest/project/entry/package.json b/storage/storagefileiojstest/project/entry/package.json deleted file mode 100644 index 4cf06fee5959d788e6cb205ae961a5c1cacd65b9..0000000000000000000000000000000000000000 --- a/storage/storagefileiojstest/project/entry/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.1" - } -} diff --git a/storage/storagefileiojstest/signature/openharmony_sx.p7b b/storage/storagefileiojstest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/storage/storagefileiojstest/signature/openharmony_sx.p7b differ diff --git a/storage/storageerrorjstest/project/entry/src/main/config.json b/storage/storagefileiojstest/src/main/config.json similarity index 96% rename from storage/storageerrorjstest/project/entry/src/main/config.json rename to storage/storagefileiojstest/src/main/config.json index 12fda07721102cdd208f3d9021a250592706579a..9b7cfe5d04d1f2f807e5c7dc8ceff403cde6a9df 100644 --- a/storage/storageerrorjstest/project/entry/src/main/config.json +++ b/storage/storagefileiojstest/src/main/config.json @@ -8,8 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 5, - "releaseType": "Release" + "target": 5 } }, "deviceConfig": {}, diff --git a/storage/storagefileiojstest/project/entry/src/main/js/default/app.js b/storage/storagefileiojstest/src/main/js/default/app.js similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/default/app.js rename to storage/storagefileiojstest/src/main/js/default/app.js diff --git a/storage/storagefileiojstest/project/entry/src/main/js/default/i18n/en-US.json b/storage/storagefileiojstest/src/main/js/default/i18n/en-US.json similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/default/i18n/en-US.json rename to storage/storagefileiojstest/src/main/js/default/i18n/en-US.json diff --git a/storage/storagefileiojstest/project/entry/src/main/js/default/i18n/zh-CN.json b/storage/storagefileiojstest/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/default/i18n/zh-CN.json rename to storage/storagefileiojstest/src/main/js/default/i18n/zh-CN.json diff --git a/storage/storagefileiojstest/project/entry/src/main/js/default/pages/index/index.css b/storage/storagefileiojstest/src/main/js/default/pages/index/index.css similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/default/pages/index/index.css rename to storage/storagefileiojstest/src/main/js/default/pages/index/index.css diff --git a/storage/storagefileiojstest/project/entry/src/main/js/default/pages/index/index.hml b/storage/storagefileiojstest/src/main/js/default/pages/index/index.hml similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/default/pages/index/index.hml rename to storage/storagefileiojstest/src/main/js/default/pages/index/index.hml diff --git a/storage/storagefileconcurrentjstest/project/entry/src/main/js/default/pages/index/index.js b/storage/storagefileiojstest/src/main/js/default/pages/index/index.js similarity index 93% rename from storage/storagefileconcurrentjstest/project/entry/src/main/js/default/pages/index/index.js rename to storage/storagefileiojstest/src/main/js/default/pages/index/index.js index 572ce6e94d0cd867a15eb94b1b7b0da9497a99b3..36886d2e9943155582084f4222205a7e1686aad2 100644 --- a/storage/storagefileconcurrentjstest/project/entry/src/main/js/default/pages/index/index.js +++ b/storage/storagefileiojstest/src/main/js/default/pages/index/index.js @@ -13,7 +13,6 @@ * limitations under the License. */ -import file from '@system.file' import app from '@system.app' import {Core} from 'deccjsunit/index' @@ -30,7 +29,7 @@ export default { core.init() const configService = core.getDefaultService('config') configService.setConfig(this) - require('../../../test/List.test') + require('../../test/List.test') core.execute() }, onReady() { diff --git a/storage/storagefileiojstest/project/entry/src/main/js/test/Common.js b/storage/storagefileiojstest/src/main/js/default/test/Common.js similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/test/Common.js rename to storage/storagefileiojstest/src/main/js/default/test/Common.js diff --git a/storage/storagefileiojstest/project/entry/src/main/js/test/File.test.js b/storage/storagefileiojstest/src/main/js/default/test/File.test.js similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/test/File.test.js rename to storage/storagefileiojstest/src/main/js/default/test/File.test.js diff --git a/storage/storagefileiojstest/project/entry/src/main/js/test/FileIO.test.js b/storage/storagefileiojstest/src/main/js/default/test/FileIO.test.js similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/test/FileIO.test.js rename to storage/storagefileiojstest/src/main/js/default/test/FileIO.test.js diff --git a/storage/storagefileiojstest/project/entry/src/main/js/test/FileIODir.test.js b/storage/storagefileiojstest/src/main/js/default/test/FileIODir.test.js similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/test/FileIODir.test.js rename to storage/storagefileiojstest/src/main/js/default/test/FileIODir.test.js diff --git a/storage/storagefileiojstest/project/entry/src/main/js/test/FileIODirent.test.js b/storage/storagefileiojstest/src/main/js/default/test/FileIODirent.test.js similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/test/FileIODirent.test.js rename to storage/storagefileiojstest/src/main/js/default/test/FileIODirent.test.js diff --git a/storage/storagefileiojstest/project/entry/src/main/js/test/FileIOStat.test.js b/storage/storagefileiojstest/src/main/js/default/test/FileIOStat.test.js similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/test/FileIOStat.test.js rename to storage/storagefileiojstest/src/main/js/default/test/FileIOStat.test.js diff --git a/storage/storagefileiojstest/project/entry/src/main/js/test/FileIOStream.test.js b/storage/storagefileiojstest/src/main/js/default/test/FileIOStream.test.js similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/test/FileIOStream.test.js rename to storage/storagefileiojstest/src/main/js/default/test/FileIOStream.test.js diff --git a/storage/storagefileiojstest/project/entry/src/main/js/test/List.test.js b/storage/storagefileiojstest/src/main/js/default/test/List.test.js similarity index 100% rename from storage/storagefileiojstest/project/entry/src/main/js/test/List.test.js rename to storage/storagefileiojstest/src/main/js/default/test/List.test.js diff --git a/storage/storagefileiojstest/src/main/resources/base/element/string.json b/storage/storagefileiojstest/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..6fb8909313d1424e4ce3c0e4ecfe10a1075f7bbf --- /dev/null +++ b/storage/storagefileiojstest/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "Storagefileiojstest" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/storage/storagefileiojstest/src/main/resources/base/media/icon.png b/storage/storagefileiojstest/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/storage/storagefileiojstest/src/main/resources/base/media/icon.png differ diff --git a/storage/storagefileioperformancejstest/BUILD.gn b/storage/storagefileioperformancejstest/BUILD.gn index f5d8af0217e1bf0d868e7388214321243a786fda..adfc3de270cde74d83c5341dce16c73e1578872b 100644 --- a/storage/storagefileioperformancejstest/BUILD.gn +++ b/storage/storagefileioperformancejstest/BUILD.gn @@ -13,6 +13,24 @@ import("//test/xts/tools/build/suite.gni") ohos_js_hap_suite("storagefileioperformance_js_test") { - test_hap_name = "storagefileioperformancejstest" - hap_source_path = "hap/entry-debug-rich-signed.hap" + hap_profile = "./src/main/config.json" + deps = [ + ":storagefileioperformance_js_assets", + ":storagefileioperformance_js_resources", + ] +# shared_libraries = [ +# "//third_party/giflib:libgif", +# "//third_party/libpng:libpng", +# ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "storagefileioperformancejstest" +# part_name = "prebuilt_hap" +# subsystem_name = "xts" } +ohos_js_assets("storagefileioperformance_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("storagefileioperformance_js_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" +} \ No newline at end of file diff --git a/storage/storagefileioperformancejstest/hap/entry-debug-rich-signed.hap b/storage/storagefileioperformancejstest/hap/entry-debug-rich-signed.hap deleted file mode 100644 index 3b621d08132b7cc25888edbd1d8688ad3dea4b56..0000000000000000000000000000000000000000 Binary files a/storage/storagefileioperformancejstest/hap/entry-debug-rich-signed.hap and /dev/null differ diff --git a/storage/storagefileioperformancejstest/project/entry/package.json b/storage/storagefileioperformancejstest/project/entry/package.json deleted file mode 100644 index 4cf06fee5959d788e6cb205ae961a5c1cacd65b9..0000000000000000000000000000000000000000 --- a/storage/storagefileioperformancejstest/project/entry/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.1" - } -} diff --git a/storage/storagefileioperformancejstest/signature/openharmony_sx.p7b b/storage/storagefileioperformancejstest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/storage/storagefileioperformancejstest/signature/openharmony_sx.p7b differ diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/config.json b/storage/storagefileioperformancejstest/src/main/config.json similarity index 96% rename from storage/storagefileioperformancejstest/project/entry/src/main/config.json rename to storage/storagefileioperformancejstest/src/main/config.json index 12fda07721102cdd208f3d9021a250592706579a..9b7cfe5d04d1f2f807e5c7dc8ceff403cde6a9df 100644 --- a/storage/storagefileioperformancejstest/project/entry/src/main/config.json +++ b/storage/storagefileioperformancejstest/src/main/config.json @@ -8,8 +8,7 @@ }, "apiVersion": { "compatible": 4, - "target": 5, - "releaseType": "Release" + "target": 5 } }, "deviceConfig": {}, diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/default/app.js b/storage/storagefileioperformancejstest/src/main/js/default/app.js similarity index 100% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/default/app.js rename to storage/storagefileioperformancejstest/src/main/js/default/app.js diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/default/i18n/en-US.json b/storage/storagefileioperformancejstest/src/main/js/default/i18n/en-US.json similarity index 100% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/default/i18n/en-US.json rename to storage/storagefileioperformancejstest/src/main/js/default/i18n/en-US.json diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/default/i18n/zh-CN.json b/storage/storagefileioperformancejstest/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/default/i18n/zh-CN.json rename to storage/storagefileioperformancejstest/src/main/js/default/i18n/zh-CN.json diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/default/pages/index/index.css b/storage/storagefileioperformancejstest/src/main/js/default/pages/index/index.css similarity index 100% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/default/pages/index/index.css rename to storage/storagefileioperformancejstest/src/main/js/default/pages/index/index.css diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/default/pages/index/index.hml b/storage/storagefileioperformancejstest/src/main/js/default/pages/index/index.hml similarity index 100% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/default/pages/index/index.hml rename to storage/storagefileioperformancejstest/src/main/js/default/pages/index/index.hml diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/default/pages/index/index.js b/storage/storagefileioperformancejstest/src/main/js/default/pages/index/index.js similarity index 93% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/default/pages/index/index.js rename to storage/storagefileioperformancejstest/src/main/js/default/pages/index/index.js index 572ce6e94d0cd867a15eb94b1b7b0da9497a99b3..36886d2e9943155582084f4222205a7e1686aad2 100644 --- a/storage/storagefileioperformancejstest/project/entry/src/main/js/default/pages/index/index.js +++ b/storage/storagefileioperformancejstest/src/main/js/default/pages/index/index.js @@ -13,7 +13,6 @@ * limitations under the License. */ -import file from '@system.file' import app from '@system.app' import {Core} from 'deccjsunit/index' @@ -30,7 +29,7 @@ export default { core.init() const configService = core.getDefaultService('config') configService.setConfig(this) - require('../../../test/List.test') + require('../../test/List.test') core.execute() }, onReady() { diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/test/Common.js b/storage/storagefileioperformancejstest/src/main/js/default/test/Common.js similarity index 100% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/test/Common.js rename to storage/storagefileioperformancejstest/src/main/js/default/test/Common.js diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/test/FileIOPerformance.js b/storage/storagefileioperformancejstest/src/main/js/default/test/FileIOPerformance.js similarity index 100% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/test/FileIOPerformance.js rename to storage/storagefileioperformancejstest/src/main/js/default/test/FileIOPerformance.js diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/test/FilePerformance.js b/storage/storagefileioperformancejstest/src/main/js/default/test/FilePerformance.js similarity index 100% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/test/FilePerformance.js rename to storage/storagefileioperformancejstest/src/main/js/default/test/FilePerformance.js diff --git a/storage/storagefileioperformancejstest/project/entry/src/main/js/test/List.test.js b/storage/storagefileioperformancejstest/src/main/js/default/test/List.test.js similarity index 100% rename from storage/storagefileioperformancejstest/project/entry/src/main/js/test/List.test.js rename to storage/storagefileioperformancejstest/src/main/js/default/test/List.test.js diff --git a/storage/storagefileioperformancejstest/src/main/resources/base/element/string.json b/storage/storagefileioperformancejstest/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..925ea00eda6f3def6a1cd37f45e52d3feb319635 --- /dev/null +++ b/storage/storagefileioperformancejstest/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "storagefileioperformancejstest" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/storage/storagefileioperformancejstest/src/main/resources/base/media/icon.png b/storage/storagefileioperformancejstest/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/storage/storagefileioperformancejstest/src/main/resources/base/media/icon.png differ diff --git a/storage/storagefileioreliabilityjstest/BUILD.gn b/storage/storagefileioreliabilityjstest/BUILD.gn index 94515f31467bd1bfbbb940589e2737c57e81e4a0..6d4ba99da7d32720c7d3e756f0a4f299b07a85a7 100644 --- a/storage/storagefileioreliabilityjstest/BUILD.gn +++ b/storage/storagefileioreliabilityjstest/BUILD.gn @@ -13,6 +13,24 @@ import("//test/xts/tools/build/suite.gni") ohos_js_hap_suite("storagefileioreliability_js_test") { - test_hap_name = "storagefileioreliabilityjstest" - hap_source_path = "hap/entry-debug-rich-signed.hap" + hap_profile = "./src/main/config.json" + deps = [ + ":storagefileioreliability_js_assets", + ":storagefileioreliability_js_resources", + ] +# shared_libraries = [ +# "//third_party/giflib:libgif", +# "//third_party/libpng:libpng", +# ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "storagefileioreliabilityjstest" +# part_name = "prebuilt_hap" +# subsystem_name = "xts" } +ohos_js_assets("storagefileioreliability_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("storagefileioreliability_js_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" +} \ No newline at end of file diff --git a/storage/storagefileioreliabilityjstest/hap/entry-debug-rich-signed.hap b/storage/storagefileioreliabilityjstest/hap/entry-debug-rich-signed.hap deleted file mode 100644 index 6a7ca362364ac887040c065553ad2422c7a2bbfe..0000000000000000000000000000000000000000 Binary files a/storage/storagefileioreliabilityjstest/hap/entry-debug-rich-signed.hap and /dev/null differ diff --git a/storage/storagefileioreliabilityjstest/project/entry/package.json b/storage/storagefileioreliabilityjstest/project/entry/package.json deleted file mode 100644 index 4cf06fee5959d788e6cb205ae961a5c1cacd65b9..0000000000000000000000000000000000000000 --- a/storage/storagefileioreliabilityjstest/project/entry/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.1" - } -} diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/config.json b/storage/storagefileioreliabilityjstest/project/entry/src/main/config.json deleted file mode 100644 index 12fda07721102cdd208f3d9021a250592706579a..0000000000000000000000000000000000000000 --- a/storage/storagefileioreliabilityjstest/project/entry/src/main/config.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "app": { - "bundleName": "ohos.acts.stroage.fileio", - "vendor": "example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Release" - } - }, - "deviceConfig": {}, - "module": { - "package": "ohos.acts.stroage.fileio", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": true - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "ohos.acts.stroage.fileio.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard", - "visible": true - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/pages/index/index.js b/storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index 572ce6e94d0cd867a15eb94b1b7b0da9497a99b3..0000000000000000000000000000000000000000 --- a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,38 +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 file from '@system.file' -import app from '@system.app' - -import {Core} from 'deccjsunit/index' -export default { - data: { - title: '' - }, - onInit() { - this.title = this.$t('strings.world'); - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - require('../../../test/List.test') - core.execute() - }, - onReady() { - }, -} \ No newline at end of file diff --git a/storage/storagefileioreliabilityjstest/signature/openharmony_sx.p7b b/storage/storagefileioreliabilityjstest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/storage/storagefileioreliabilityjstest/signature/openharmony_sx.p7b differ diff --git a/storage/storagefileioreliabilityjstest/src/main/config.json b/storage/storagefileioreliabilityjstest/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..9b7cfe5d04d1f2f807e5c7dc8ceff403cde6a9df --- /dev/null +++ b/storage/storagefileioreliabilityjstest/src/main/config.json @@ -0,0 +1,61 @@ +{ + "app": { + "bundleName": "ohos.acts.stroage.fileio", + "vendor": "example", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5 + } + }, + "deviceConfig": {}, + "module": { + "package": "ohos.acts.stroage.fileio", + "name": ".MyApplication", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": true + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "ohos.acts.stroage.fileio.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard", + "visible": true + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/app.js b/storage/storagefileioreliabilityjstest/src/main/js/default/app.js similarity index 100% rename from storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/app.js rename to storage/storagefileioreliabilityjstest/src/main/js/default/app.js diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/i18n/en-US.json b/storage/storagefileioreliabilityjstest/src/main/js/default/i18n/en-US.json similarity index 100% rename from storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/i18n/en-US.json rename to storage/storagefileioreliabilityjstest/src/main/js/default/i18n/en-US.json diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/i18n/zh-CN.json b/storage/storagefileioreliabilityjstest/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/i18n/zh-CN.json rename to storage/storagefileioreliabilityjstest/src/main/js/default/i18n/zh-CN.json diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/pages/index/index.css b/storage/storagefileioreliabilityjstest/src/main/js/default/pages/index/index.css similarity index 100% rename from storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/pages/index/index.css rename to storage/storagefileioreliabilityjstest/src/main/js/default/pages/index/index.css diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/pages/index/index.hml b/storage/storagefileioreliabilityjstest/src/main/js/default/pages/index/index.hml similarity index 100% rename from storage/storagefileioreliabilityjstest/project/entry/src/main/js/default/pages/index/index.hml rename to storage/storagefileioreliabilityjstest/src/main/js/default/pages/index/index.hml diff --git a/storage/storagefileioreliabilityjstest/src/main/js/default/pages/index/index.js b/storage/storagefileioreliabilityjstest/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..36886d2e9943155582084f4222205a7e1686aad2 --- /dev/null +++ b/storage/storagefileioreliabilityjstest/src/main/js/default/pages/index/index.js @@ -0,0 +1,37 @@ +/* + * 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 {Core} from 'deccjsunit/index' +export default { + data: { + title: '' + }, + onInit() { + this.title = this.$t('strings.world'); + }, + onShow() { + console.info('onShow finish') + const core = Core.getInstance() + core.init() + const configService = core.getDefaultService('config') + configService.setConfig(this) + require('../../test/List.test') + core.execute() + }, + onReady() { + }, +} \ No newline at end of file diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/test/Common.js b/storage/storagefileioreliabilityjstest/src/main/js/default/test/Common.js similarity index 100% rename from storage/storagefileioreliabilityjstest/project/entry/src/main/js/test/Common.js rename to storage/storagefileioreliabilityjstest/src/main/js/default/test/Common.js diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/test/FileIOReliability.js b/storage/storagefileioreliabilityjstest/src/main/js/default/test/FileIOReliability.js similarity index 100% rename from storage/storagefileioreliabilityjstest/project/entry/src/main/js/test/FileIOReliability.js rename to storage/storagefileioreliabilityjstest/src/main/js/default/test/FileIOReliability.js diff --git a/storage/storagefileioreliabilityjstest/project/entry/src/main/js/test/List.test.js b/storage/storagefileioreliabilityjstest/src/main/js/default/test/List.test.js similarity index 100% rename from storage/storagefileioreliabilityjstest/project/entry/src/main/js/test/List.test.js rename to storage/storagefileioreliabilityjstest/src/main/js/default/test/List.test.js diff --git a/storage/storagefileioreliabilityjstest/src/main/resources/base/element/string.json b/storage/storagefileioreliabilityjstest/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..7184b78931e474a3e1d89bec58d6343bd33e8985 --- /dev/null +++ b/storage/storagefileioreliabilityjstest/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "storagefileioreliabilityjstest" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/storage/storagefileioreliabilityjstest/src/main/resources/base/media/icon.png b/storage/storagefileioreliabilityjstest/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/storage/storagefileioreliabilityjstest/src/main/resources/base/media/icon.png differ diff --git a/storage/storagefileiostabilityjstest/BUILD.gn b/storage/storagefileiostabilityjstest/BUILD.gn index 0b81565b1d639916b53bfced953783adca47e569..bc553e2f654c1487cad4f34c2e2883b00d3b8cee 100644 --- a/storage/storagefileiostabilityjstest/BUILD.gn +++ b/storage/storagefileiostabilityjstest/BUILD.gn @@ -13,6 +13,24 @@ import("//test/xts/tools/build/suite.gni") ohos_js_hap_suite("storagefileiostability_js_test") { - test_hap_name = "storagefileiostabilityjstest" - hap_source_path = "hap/entry-debug-rich-signed.hap" + hap_profile = "./src/main/config.json" + deps = [ + ":storagefileiostability_js_assets", + ":storagefileiostability_js_resources", + ] +# shared_libraries = [ +# "//third_party/giflib:libgif", +# "//third_party/libpng:libpng", +# ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "storagefileiostabilityjstest" +# part_name = "prebuilt_hap" +# subsystem_name = "xts" } +ohos_js_assets("storagefileiostability_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("storagefileiostability_js_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" +} \ No newline at end of file diff --git a/storage/storagefileiostabilityjstest/hap/entry-debug-rich-signed.hap b/storage/storagefileiostabilityjstest/hap/entry-debug-rich-signed.hap deleted file mode 100644 index 3debebce74f4e00316c8219268d38d57ca925bad..0000000000000000000000000000000000000000 Binary files a/storage/storagefileiostabilityjstest/hap/entry-debug-rich-signed.hap and /dev/null differ diff --git a/storage/storagefileiostabilityjstest/project/entry/package.json b/storage/storagefileiostabilityjstest/project/entry/package.json deleted file mode 100644 index 4cf06fee5959d788e6cb205ae961a5c1cacd65b9..0000000000000000000000000000000000000000 --- a/storage/storagefileiostabilityjstest/project/entry/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.1" - } -} diff --git a/storage/storagefileiostabilityjstest/project/entry/src/main/config.json b/storage/storagefileiostabilityjstest/project/entry/src/main/config.json deleted file mode 100644 index 12fda07721102cdd208f3d9021a250592706579a..0000000000000000000000000000000000000000 --- a/storage/storagefileiostabilityjstest/project/entry/src/main/config.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "app": { - "bundleName": "ohos.acts.stroage.fileio", - "vendor": "example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Release" - } - }, - "deviceConfig": {}, - "module": { - "package": "ohos.acts.stroage.fileio", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": true - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "ohos.acts.stroage.fileio.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard", - "visible": true - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/storage/storagefileiostabilityjstest/signature/openharmony_sx.p7b b/storage/storagefileiostabilityjstest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/storage/storagefileiostabilityjstest/signature/openharmony_sx.p7b differ diff --git a/storage/storagefileiostabilityjstest/src/main/config.json b/storage/storagefileiostabilityjstest/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..9b7cfe5d04d1f2f807e5c7dc8ceff403cde6a9df --- /dev/null +++ b/storage/storagefileiostabilityjstest/src/main/config.json @@ -0,0 +1,61 @@ +{ + "app": { + "bundleName": "ohos.acts.stroage.fileio", + "vendor": "example", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5 + } + }, + "deviceConfig": {}, + "module": { + "package": "ohos.acts.stroage.fileio", + "name": ".MyApplication", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": true + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "ohos.acts.stroage.fileio.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard", + "visible": true + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/default/app.js b/storage/storagefileiostabilityjstest/src/main/js/default/app.js similarity index 100% rename from storage/storagefilestabilityjstest/project/entry/src/main/js/default/app.js rename to storage/storagefileiostabilityjstest/src/main/js/default/app.js diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/default/i18n/en-US.json b/storage/storagefileiostabilityjstest/src/main/js/default/i18n/en-US.json similarity index 100% rename from storage/storagefilestabilityjstest/project/entry/src/main/js/default/i18n/en-US.json rename to storage/storagefileiostabilityjstest/src/main/js/default/i18n/en-US.json diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/default/i18n/zh-CN.json b/storage/storagefileiostabilityjstest/src/main/js/default/i18n/zh-CN.json similarity index 100% rename from storage/storagefilestabilityjstest/project/entry/src/main/js/default/i18n/zh-CN.json rename to storage/storagefileiostabilityjstest/src/main/js/default/i18n/zh-CN.json diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/default/pages/index/index.css b/storage/storagefileiostabilityjstest/src/main/js/default/pages/index/index.css similarity index 100% rename from storage/storagefilestabilityjstest/project/entry/src/main/js/default/pages/index/index.css rename to storage/storagefileiostabilityjstest/src/main/js/default/pages/index/index.css diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/default/pages/index/index.hml b/storage/storagefileiostabilityjstest/src/main/js/default/pages/index/index.hml similarity index 100% rename from storage/storagefilestabilityjstest/project/entry/src/main/js/default/pages/index/index.hml rename to storage/storagefileiostabilityjstest/src/main/js/default/pages/index/index.hml diff --git a/storage/storagefileiostabilityjstest/src/main/js/default/pages/index/index.js b/storage/storagefileiostabilityjstest/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..36886d2e9943155582084f4222205a7e1686aad2 --- /dev/null +++ b/storage/storagefileiostabilityjstest/src/main/js/default/pages/index/index.js @@ -0,0 +1,37 @@ +/* + * 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 {Core} from 'deccjsunit/index' +export default { + data: { + title: '' + }, + onInit() { + this.title = this.$t('strings.world'); + }, + onShow() { + console.info('onShow finish') + const core = Core.getInstance() + core.init() + const configService = core.getDefaultService('config') + configService.setConfig(this) + require('../../test/List.test') + core.execute() + }, + onReady() { + }, +} \ No newline at end of file diff --git a/storage/storagefileiostabilityjstest/project/entry/src/main/js/test/Common.js b/storage/storagefileiostabilityjstest/src/main/js/default/test/Common.js similarity index 100% rename from storage/storagefileiostabilityjstest/project/entry/src/main/js/test/Common.js rename to storage/storagefileiostabilityjstest/src/main/js/default/test/Common.js diff --git a/storage/storagefileiostabilityjstest/project/entry/src/main/js/test/FileIOStability.js b/storage/storagefileiostabilityjstest/src/main/js/default/test/FileIOStability.js similarity index 100% rename from storage/storagefileiostabilityjstest/project/entry/src/main/js/test/FileIOStability.js rename to storage/storagefileiostabilityjstest/src/main/js/default/test/FileIOStability.js diff --git a/storage/storagefileiostabilityjstest/project/entry/src/main/js/test/List.test.js b/storage/storagefileiostabilityjstest/src/main/js/default/test/List.test.js similarity index 100% rename from storage/storagefileiostabilityjstest/project/entry/src/main/js/test/List.test.js rename to storage/storagefileiostabilityjstest/src/main/js/default/test/List.test.js diff --git a/storage/storagefileiostabilityjstest/src/main/resources/base/element/string.json b/storage/storagefileiostabilityjstest/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..8bb43fe55c80d98278152a1bb88b004035aa620f --- /dev/null +++ b/storage/storagefileiostabilityjstest/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "storagefileiostabilityjstest" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/storage/storagefileiostabilityjstest/src/main/resources/base/media/icon.png b/storage/storagefileiostabilityjstest/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/storage/storagefileiostabilityjstest/src/main/resources/base/media/icon.png differ diff --git a/storage/storagefilestabilityjstest/BUILD.gn b/storage/storagefilestabilityjstest/BUILD.gn index b139df6eab79a771b195748f0a510d753eabb172..15d53876787dbdc808c5555497b29490719056de 100644 --- a/storage/storagefilestabilityjstest/BUILD.gn +++ b/storage/storagefilestabilityjstest/BUILD.gn @@ -13,6 +13,24 @@ import("//test/xts/tools/build/suite.gni") ohos_js_hap_suite("storagefilestability_js_test") { - test_hap_name = "storagefilestabilityjstest" - hap_source_path = "hap/entry-debug-rich-signed.hap" + hap_profile = "./src/main/config.json" + deps = [ + ":storagefilestability_js_assets", + ":storagefilestability_js_resources", + ] +# shared_libraries = [ +# "//third_party/giflib:libgif", +# "//third_party/libpng:libpng", +# ] + certificate_profile = "./signature/openharmony_sx.p7b" + hap_name = "storagefilestabilityjstest" +# part_name = "prebuilt_hap" +# subsystem_name = "xts" } +ohos_js_assets("storagefilestability_js_assets") { + source_dir = "./src/main/js/default" +} +ohos_resources("storagefilestability_js_resources") { + sources = [ "./src/main/resources" ] + hap_profile = "./src/main/config.json" +} \ No newline at end of file diff --git a/storage/storagefilestabilityjstest/hap/entry-debug-rich-signed.hap b/storage/storagefilestabilityjstest/hap/entry-debug-rich-signed.hap deleted file mode 100644 index 8672c6ec961c8051b5908cbfc65cc9656b50541c..0000000000000000000000000000000000000000 Binary files a/storage/storagefilestabilityjstest/hap/entry-debug-rich-signed.hap and /dev/null differ diff --git a/storage/storagefilestabilityjstest/project/entry/package.json b/storage/storagefilestabilityjstest/project/entry/package.json deleted file mode 100644 index 4cf06fee5959d788e6cb205ae961a5c1cacd65b9..0000000000000000000000000000000000000000 --- a/storage/storagefilestabilityjstest/project/entry/package.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "devDependencies": { - "chai": "^4.3.4", - "mocha": "^9.0.1" - } -} diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/config.json b/storage/storagefilestabilityjstest/project/entry/src/main/config.json deleted file mode 100644 index 12fda07721102cdd208f3d9021a250592706579a..0000000000000000000000000000000000000000 --- a/storage/storagefilestabilityjstest/project/entry/src/main/config.json +++ /dev/null @@ -1,62 +0,0 @@ -{ - "app": { - "bundleName": "ohos.acts.stroage.fileio", - "vendor": "example", - "version": { - "code": 1000000, - "name": "1.0.0" - }, - "apiVersion": { - "compatible": 4, - "target": 5, - "releaseType": "Release" - } - }, - "deviceConfig": {}, - "module": { - "package": "ohos.acts.stroage.fileio", - "name": ".MyApplication", - "deviceType": [ - "phone" - ], - "distro": { - "deliveryWithInstall": true, - "moduleName": "entry", - "moduleType": "entry", - "installationFree": true - }, - "abilities": [ - { - "skills": [ - { - "entities": [ - "entity.system.home" - ], - "actions": [ - "action.system.home" - ] - } - ], - "name": "ohos.acts.stroage.fileio.MainAbility", - "icon": "$media:icon", - "description": "$string:mainability_description", - "label": "$string:app_name", - "type": "page", - "launchType": "standard", - "visible": true - } - ], - "js": [ - { - "pages": [ - "pages/index/index" - ], - "name": "default", - "window": { - "designWidth": 720, - "autoDesignWidth": false - } - } - ] - } -} \ No newline at end of file diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/default/pages/index/index.js b/storage/storagefilestabilityjstest/project/entry/src/main/js/default/pages/index/index.js deleted file mode 100644 index 572ce6e94d0cd867a15eb94b1b7b0da9497a99b3..0000000000000000000000000000000000000000 --- a/storage/storagefilestabilityjstest/project/entry/src/main/js/default/pages/index/index.js +++ /dev/null @@ -1,38 +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 file from '@system.file' -import app from '@system.app' - -import {Core} from 'deccjsunit/index' -export default { - data: { - title: '' - }, - onInit() { - this.title = this.$t('strings.world'); - }, - onShow() { - console.info('onShow finish') - const core = Core.getInstance() - core.init() - const configService = core.getDefaultService('config') - configService.setConfig(this) - require('../../../test/List.test') - core.execute() - }, - onReady() { - }, -} \ No newline at end of file diff --git a/storage/storagefilestabilityjstest/signature/openharmony_sx.p7b b/storage/storagefilestabilityjstest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..9be1e98fa4c0c28ca997ed660112fa16b194f0f5 Binary files /dev/null and b/storage/storagefilestabilityjstest/signature/openharmony_sx.p7b differ diff --git a/storage/storagefilestabilityjstest/src/main/config.json b/storage/storagefilestabilityjstest/src/main/config.json new file mode 100644 index 0000000000000000000000000000000000000000..9b7cfe5d04d1f2f807e5c7dc8ceff403cde6a9df --- /dev/null +++ b/storage/storagefilestabilityjstest/src/main/config.json @@ -0,0 +1,61 @@ +{ + "app": { + "bundleName": "ohos.acts.stroage.fileio", + "vendor": "example", + "version": { + "code": 1000000, + "name": "1.0.0" + }, + "apiVersion": { + "compatible": 4, + "target": 5 + } + }, + "deviceConfig": {}, + "module": { + "package": "ohos.acts.stroage.fileio", + "name": ".MyApplication", + "deviceType": [ + "phone" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": true + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "name": "ohos.acts.stroage.fileio.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:app_name", + "type": "page", + "launchType": "standard", + "visible": true + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": false + } + } + ] + } +} \ No newline at end of file diff --git a/storage/storagefilestabilityjstest/src/main/js/default/app.js b/storage/storagefilestabilityjstest/src/main/js/default/app.js new file mode 100644 index 0000000000000000000000000000000000000000..5fefaead87d0899fd7e07a2f2241a40bfd298339 --- /dev/null +++ b/storage/storagefilestabilityjstest/src/main/js/default/app.js @@ -0,0 +1,8 @@ +export default { + onCreate() { + console.info('ohos.acts.distributeddatamgr.distributedfile onCreate'); + }, + onDestroy() { + console.info('ohos.acts.distributeddatamgr.distributedfile onCreate'); + } +}; diff --git a/storage/storagefilestabilityjstest/src/main/js/default/i18n/en-US.json b/storage/storagefilestabilityjstest/src/main/js/default/i18n/en-US.json new file mode 100644 index 0000000000000000000000000000000000000000..ead52ed2e09ec82aaf7aa9f4e714ed39ea88308e --- /dev/null +++ b/storage/storagefilestabilityjstest/src/main/js/default/i18n/en-US.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "Test" + } +} \ No newline at end of file diff --git a/storage/storagefilestabilityjstest/src/main/js/default/i18n/zh-CN.json b/storage/storagefilestabilityjstest/src/main/js/default/i18n/zh-CN.json new file mode 100644 index 0000000000000000000000000000000000000000..3f48f2585b24a8fe4a745e8ee2972a9e991a7803 --- /dev/null +++ b/storage/storagefilestabilityjstest/src/main/js/default/i18n/zh-CN.json @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "测试" + } +} \ No newline at end of file diff --git a/storage/storagefilestabilityjstest/src/main/js/default/pages/index/index.css b/storage/storagefilestabilityjstest/src/main/js/default/pages/index/index.css new file mode 100644 index 0000000000000000000000000000000000000000..6fda792753f2e15f22b529c7b90a82185b2770bf --- /dev/null +++ b/storage/storagefilestabilityjstest/src/main/js/default/pages/index/index.css @@ -0,0 +1,9 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; +} + +.title { + font-size: 100px; +} diff --git a/storage/storagefilestabilityjstest/src/main/js/default/pages/index/index.hml b/storage/storagefilestabilityjstest/src/main/js/default/pages/index/index.hml new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ b/storage/storagefilestabilityjstest/src/main/js/default/pages/index/index.hml @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git a/storage/storagefilestabilityjstest/src/main/js/default/pages/index/index.js b/storage/storagefilestabilityjstest/src/main/js/default/pages/index/index.js new file mode 100644 index 0000000000000000000000000000000000000000..b2b324c3b26d2c4bc38b429d5577e96d1c65edd9 --- /dev/null +++ b/storage/storagefilestabilityjstest/src/main/js/default/pages/index/index.js @@ -0,0 +1,36 @@ +/* + * 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 {Core} from 'deccjsunit/index' +export default { + data: { + title: '' + }, + onInit() { + this.title = this.$t('strings.world'); + }, + onShow() { + console.info('onShow finish') + const core = Core.getInstance() + core.init() + const configService = core.getDefaultService('config') + configService.setConfig(this) + require('../../test/List.test') + core.execute() + }, + onReady() { + }, +} \ No newline at end of file diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/test/Common.js b/storage/storagefilestabilityjstest/src/main/js/default/test/Common.js similarity index 100% rename from storage/storagefilestabilityjstest/project/entry/src/main/js/test/Common.js rename to storage/storagefilestabilityjstest/src/main/js/default/test/Common.js diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/test/FileReliability.js b/storage/storagefilestabilityjstest/src/main/js/default/test/FileReliability.js similarity index 100% rename from storage/storagefilestabilityjstest/project/entry/src/main/js/test/FileReliability.js rename to storage/storagefilestabilityjstest/src/main/js/default/test/FileReliability.js diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/test/FileStability.js b/storage/storagefilestabilityjstest/src/main/js/default/test/FileStability.js similarity index 100% rename from storage/storagefilestabilityjstest/project/entry/src/main/js/test/FileStability.js rename to storage/storagefilestabilityjstest/src/main/js/default/test/FileStability.js diff --git a/storage/storagefilestabilityjstest/project/entry/src/main/js/test/List.test.js b/storage/storagefilestabilityjstest/src/main/js/default/test/List.test.js similarity index 100% rename from storage/storagefilestabilityjstest/project/entry/src/main/js/test/List.test.js rename to storage/storagefilestabilityjstest/src/main/js/default/test/List.test.js diff --git a/storage/storagefilestabilityjstest/src/main/resources/base/element/string.json b/storage/storagefilestabilityjstest/src/main/resources/base/element/string.json new file mode 100644 index 0000000000000000000000000000000000000000..4b5a8bbc02d07ca41a3c0f63834395a33e02152a --- /dev/null +++ b/storage/storagefilestabilityjstest/src/main/resources/base/element/string.json @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "storagefilestabilityjstest" + }, + { + "name": "mainability_description", + "value": "JS_Phone_Empty Feature Ability" + } + ] +} \ No newline at end of file diff --git a/storage/storagefilestabilityjstest/src/main/resources/base/media/icon.png b/storage/storagefilestabilityjstest/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and b/storage/storagefilestabilityjstest/src/main/resources/base/media/icon.png differ