From 52178d10db47d0ef621c8df8f3180d0926890fdf Mon Sep 17 00:00:00 2001 From: caochuan Date: Mon, 19 Sep 2022 14:20:45 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=84=E8=8C=83=E5=8C=85=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: caochuan --- multimedia/medialibrary/common.js | 14 +++++++------- .../medialibrary/mediaLibrary_album/BUILD.gn | 2 +- .../medialibrary/mediaLibrary_album/Test.json | 2 +- .../ets/test/albumGetFileAssetsCallback.test.ets | 2 +- .../ets/test/albumGetFileAssetsPromise.test.ets | 2 +- .../src/main/ets/test/albumTestCallBack.test.ets | 2 +- .../src/main/ets/test/albumTestPromise.test.ets | 2 +- multimedia/medialibrary/mediaLibrary_base/BUILD.gn | 2 +- .../medialibrary/mediaLibrary_base/Test.json | 12 ++++-------- .../ets/test/mediaLibraryTestCallback.test.ets | 2 +- .../main/ets/test/mediaLibraryTestPromise.test.ets | 2 +- .../ets/test/mediaLibraryTestPromiseOnOff.test.ets | 2 +- .../medialibrary/mediaLibrary_favorite/BUILD.gn | 2 +- .../medialibrary/mediaLibrary_favorite/Test.json | 12 ++++-------- .../main/ets/test/favoriteTestCallback.test.ets | 2 +- .../src/main/ets/test/favoriteTestPromise.test.ets | 2 +- multimedia/medialibrary/mediaLibrary_file/BUILD.gn | 2 +- .../medialibrary/mediaLibrary_file/Test.json | 13 ++++--------- .../src/main/ets/test/fileTestCallback.test.ets | 2 +- .../src/main/ets/test/fileTestPromise.test.ets | 2 +- .../medialibrary/mediaLibrary_fileAsset/BUILD.gn | 2 +- .../medialibrary/mediaLibrary_fileAsset/Test.json | 13 ++++--------- .../src/main/ets/test/fileAssetCallback2.test.ets | 2 +- .../src/main/ets/test/fileAssetPromise2.test.ets | 2 +- .../main/ets/test/fileAssetTestCallback.test.ets | 2 +- .../main/ets/test/fileAssetTestPromise.test.ets | 2 +- .../medialibrary/mediaLibrary_fileKey/BUILD.gn | 2 +- .../medialibrary/mediaLibrary_fileKey/Test.json | 12 ++++-------- .../src/main/ets/test/filekeyTestCallback.test.ets | 2 +- .../src/main/ets/test/filekeyTestPromise.test.ets | 2 +- .../medialibrary/mediaLibrary_fileResult/BUILD.gn | 2 +- .../medialibrary/mediaLibrary_fileResult/Test.json | 12 ++++-------- .../main/ets/test/fetchFileResultCallback.test.ets | 2 +- .../main/ets/test/fetchFileResultPromise.test.ets | 2 +- .../mediaLibrary_mediafetchoptions/BUILD.gn | 2 +- .../mediaLibrary_mediafetchoptions/Test.json | 12 ++++-------- 36 files changed, 63 insertions(+), 93 deletions(-) diff --git a/multimedia/medialibrary/common.js b/multimedia/medialibrary/common.js index b4c77ac2e..a90838a95 100755 --- a/multimedia/medialibrary/common.js +++ b/multimedia/medialibrary/common.js @@ -17,16 +17,16 @@ import abilityAccessCtrl from '@ohos.abilityAccessCtrl'; import bundle from '@ohos.bundle'; const presetsCount = { - ActsMediaLibraryAlbum: { albumsCount: 7, assetsCount: 19 }, - ActsMediaLibraryFavorite: { albumsCount: 6, assetsCount: 32 }, + ActsMediaLibraryAlbumTest: { albumsCount: 7, assetsCount: 19 }, + ActsMediaLibraryFavoriteTest: { albumsCount: 6, assetsCount: 32 }, ActsMediaLibraryAlbumFileResultCb: { albumsCount: 5, assetsCount: 118 }, - ActsMediaLibraryFile: { albumsCount: 6, assetsCount: 21 }, - ActsMediaLibraryFileAsset: { albumsCount: 27, assetsCount: 72 }, + ActsMediaLibraryFileTest: { albumsCount: 6, assetsCount: 21 }, + ActsMediaLibraryFileAssetTest: { albumsCount: 27, assetsCount: 72 }, ActsMediaLibraryFileAssetUri: { albumsCount: 3, assetsCount: 6 }, - ActsMediaLibraryFileKey: { albumsCount: 2, assetsCount: 2 }, - ActsMediaLibraryFileResult: { albumsCount: 4, assetsCount: 13 }, + ActsMediaLibraryFileKeyTest: { albumsCount: 2, assetsCount: 2 }, + ActsMediaLibraryFileResultTest: { albumsCount: 4, assetsCount: 13 }, ActsMediaLibraryGetThumbnail: { albumsCount: 3, assetsCount: 3 }, - ActsMediaLibraryBase: { albumsCount: 11, assetsCount: 11 }, + ActsMediaLibraryBaseTest: { albumsCount: 11, assetsCount: 11 }, } const IMAGE_TYPE = mediaLibrary.MediaType.IMAGE; diff --git a/multimedia/medialibrary/mediaLibrary_album/BUILD.gn b/multimedia/medialibrary/mediaLibrary_album/BUILD.gn index f36f1ff84..e82fb7aaf 100755 --- a/multimedia/medialibrary/mediaLibrary_album/BUILD.gn +++ b/multimedia/medialibrary/mediaLibrary_album/BUILD.gn @@ -21,7 +21,7 @@ ohos_js_hap_suite("mediaLibrary_album_hap") { ] ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsMediaLibraryAlbum" + hap_name = "ActsMediaLibraryAlbumTest" } ohos_app_scope("medialibrary_app_profile") { diff --git a/multimedia/medialibrary/mediaLibrary_album/Test.json b/multimedia/medialibrary/mediaLibrary_album/Test.json index 25cb919e6..e60df6a53 100755 --- a/multimedia/medialibrary/mediaLibrary_album/Test.json +++ b/multimedia/medialibrary/mediaLibrary_album/Test.json @@ -53,7 +53,7 @@ }, { "test-file-name": [ - "ActsMediaLibraryAlbum.hap" + "ActsMediaLibraryAlbumTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumGetFileAssetsCallback.test.ets b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumGetFileAssetsCallback.test.ets index dc85d97a1..a1ed61c33 100755 --- a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumGetFileAssetsCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumGetFileAssetsCallback.test.ets @@ -36,7 +36,7 @@ export default function albumGetFileAssetsCallbackTest(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); await getPermission(); - await checkPresetsAssets(media, 'ActsMediaLibraryAlbum'); + await checkPresetsAssets(media, 'ActsMediaLibraryAlbumTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumGetFileAssetsPromise.test.ets b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumGetFileAssetsPromise.test.ets index 1cca67c70..fe638761a 100755 --- a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumGetFileAssetsPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumGetFileAssetsPromise.test.ets @@ -33,7 +33,7 @@ export default function albumGetFileAssetsPromiseTest(abilityContext) { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryAlbum'); + await checkPresetsAssets(media, 'ActsMediaLibraryAlbumTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestCallBack.test.ets b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestCallBack.test.ets index ca040d6f9..6de2d33f9 100755 --- a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestCallBack.test.ets +++ b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestCallBack.test.ets @@ -37,7 +37,7 @@ export default function albumTestCallbackTest(abilityContext) { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryAlbum'); + await checkPresetsAssets(media, 'ActsMediaLibraryAlbumTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestPromise.test.ets index 00b61fc00..1895d9d9f 100755 --- a/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_album/entry/src/main/ets/test/albumTestPromise.test.ets @@ -36,7 +36,7 @@ export default function albumTestPromiseTest(abilityContext) { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryAlbum'); + await checkPresetsAssets(media, 'ActsMediaLibraryAlbumTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_base/BUILD.gn b/multimedia/medialibrary/mediaLibrary_base/BUILD.gn index 4bf9e8f54..92707371d 100755 --- a/multimedia/medialibrary/mediaLibrary_base/BUILD.gn +++ b/multimedia/medialibrary/mediaLibrary_base/BUILD.gn @@ -21,7 +21,7 @@ ohos_js_hap_suite("mediaLibrary_base_hap") { ] ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsMediaLibraryBase" + hap_name = "ActsMediaLibraryBaseTest" } ohos_app_scope("medialibrary_app_profile") { diff --git a/multimedia/medialibrary/mediaLibrary_base/Test.json b/multimedia/medialibrary/mediaLibrary_base/Test.json index 21d0b432b..80023611f 100755 --- a/multimedia/medialibrary/mediaLibrary_base/Test.json +++ b/multimedia/medialibrary/mediaLibrary_base/Test.json @@ -9,8 +9,7 @@ "kits": [ { "type": "ShellKit", - "pre-push": [ - ], + "pre-push": [], "run-command": [ "rm -rf /storage/media/100/local/files/*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", @@ -20,8 +19,7 @@ }, { "type": "PushKit", - "pre-push": [ - ], + "pre-push": [], "push": [ "./resource/medialibrary/01.jpg ->/storage/media/100/local/temp", "./resource/medialibrary/01.mp3 ->/storage/media/100/local/temp", @@ -36,25 +34,23 @@ "mkdir -pv /storage/media/100/local/files/Videos//{Static,On,Off}", "mkdir -pv /storage/media/100/local/files/Audios/{Static,On,Off}", "mkdir -pv /storage/media/100/local/files/Documents/{Static,On,Off}", - "for d in Static On Off OnAlbum OffAlbum; do for i in $$(seq 1); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;", "for d in Static On Off; do for i in $$(seq 1); do cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;", "for d in Static On Off; do for i in $$(seq 1); do cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/$$d/0$$i.mp4; done;done;", "for d in Static On Off; do for i in $$(seq 1); do cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;", - "chmod -R 777 /storage/media/100/local/files/*", "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*", "hilog -Q pidoff", "hilog -p off", "hilog -b I", - "hilog -b D -D 0xD002B70", + "hilog -b D -D 0xD002B70", "scanner_demo", "sleep 10" ] }, { "test-file-name": [ - "ActsMediaLibraryBase.hap" + "ActsMediaLibraryBaseTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets index 0cae02e91..420c0d4a5 100755 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestCallback.test.ets @@ -36,7 +36,7 @@ export default function mediaLibraryTestCallback(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); await getPermission(); - await checkPresetsAssets(media, 'ActsMediaLibraryBase'); + await checkPresetsAssets(media, 'ActsMediaLibraryBaseTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets index 4a6d627fa..722ba4bf1 100755 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromise.test.ets @@ -36,7 +36,7 @@ export default function mediaLibraryTestPromiseTest(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); await getPermission(); - await checkPresetsAssets(media, 'ActsMediaLibraryBase'); + await checkPresetsAssets(media, 'ActsMediaLibraryBaseTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets index 0b39215a6..e74f4c6cd 100755 --- a/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets +++ b/multimedia/medialibrary/mediaLibrary_base/entry/src/main/ets/test/mediaLibraryTestPromiseOnOff.test.ets @@ -35,7 +35,7 @@ export default function mediaLibraryTestPromiseOnOffTest(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); await getPermission(); - await checkPresetsAssets(media, 'ActsMediaLibraryBase'); + await checkPresetsAssets(media, 'ActsMediaLibraryBaseTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_favorite/BUILD.gn b/multimedia/medialibrary/mediaLibrary_favorite/BUILD.gn index 2944426bd..8a066fc6a 100755 --- a/multimedia/medialibrary/mediaLibrary_favorite/BUILD.gn +++ b/multimedia/medialibrary/mediaLibrary_favorite/BUILD.gn @@ -21,7 +21,7 @@ ohos_js_hap_suite("mediaLibrary_favorite_hap") { ] ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsMediaLibraryFavorite" + hap_name = "ActsMediaLibraryFavoriteTest" } ohos_app_scope("medialibrary_app_profile") { diff --git a/multimedia/medialibrary/mediaLibrary_favorite/Test.json b/multimedia/medialibrary/mediaLibrary_favorite/Test.json index a1f2825e5..a1f754036 100755 --- a/multimedia/medialibrary/mediaLibrary_favorite/Test.json +++ b/multimedia/medialibrary/mediaLibrary_favorite/Test.json @@ -9,8 +9,7 @@ "kits": [ { "type": "ShellKit", - "pre-push": [ - ], + "pre-push": [], "run-command": [ "rm -rf /storage/media/100/local/files/*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", @@ -20,8 +19,7 @@ }, { "type": "PushKit", - "pre-push": [ - ], + "pre-push": [], "push": [ "./resource/medialibrary/01.jpg ->/storage/media/100/local/temp", "./resource/medialibrary/01.mp3 ->/storage/media/100/local/temp", @@ -36,25 +34,23 @@ "mkdir -pv /storage/media/100/local/files/Videos/{StaticPro,StaticCb}", "mkdir -pv /storage/media/100/local/files/Audios/{StaticPro,StaticCb}", "mkdir -pv /storage/media/100/local/files/Documents/{StaticPro,StaticCb}", - "for d in {StaticPro,StaticCb}; do for i in $$(seq 4); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;", "for d in {StaticPro,StaticCb}; do for i in $$(seq 4); do cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;", "for d in {StaticPro,StaticCb}; do for i in $$(seq 4); do cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/$$d/0$$i.mp4; done;done;", "for d in {StaticPro,StaticCb}; do for i in $$(seq 4); do cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;", - "chmod -R 777 /storage/media/100/local/files/*", "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*", "hilog -Q pidoff", "hilog -p off", "hilog -b I", - "hilog -b D -D 0xD002B70", + "hilog -b D -D 0xD002B70", "scanner_demo", "sleep 10" ] }, { "test-file-name": [ - "ActsMediaLibraryFavorite.hap" + "ActsMediaLibraryFavoriteTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestCallback.test.ets b/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestCallback.test.ets index 31c2056bc..5b46d7d49 100755 --- a/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestCallback.test.ets @@ -33,7 +33,7 @@ export default function favoriteTestCallbackTest(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); await getPermission(); - await checkPresetsAssets(media, 'ActsMediaLibraryFavorite'); + await checkPresetsAssets(media, 'ActsMediaLibraryFavoriteTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestPromise.test.ets index 984e4ef22..ce3d8fe9a 100755 --- a/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_favorite/entry/src/main/ets/test/favoriteTestPromise.test.ets @@ -31,7 +31,7 @@ export default function favoriteTestPromiseTest(abilityContext) { var media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryFavorite'); + await checkPresetsAssets(media, 'ActsMediaLibraryFavoriteTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_file/BUILD.gn b/multimedia/medialibrary/mediaLibrary_file/BUILD.gn index 673c4d86c..1cb78d930 100755 --- a/multimedia/medialibrary/mediaLibrary_file/BUILD.gn +++ b/multimedia/medialibrary/mediaLibrary_file/BUILD.gn @@ -21,7 +21,7 @@ ohos_js_hap_suite("mediaLibrary_file_hap") { ] ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsMediaLibraryFile" + hap_name = "ActsMediaLibraryFileTest" } ohos_app_scope("medialibrary_app_profile") { diff --git a/multimedia/medialibrary/mediaLibrary_file/Test.json b/multimedia/medialibrary/mediaLibrary_file/Test.json index 1045c5e22..e1b43eb18 100755 --- a/multimedia/medialibrary/mediaLibrary_file/Test.json +++ b/multimedia/medialibrary/mediaLibrary_file/Test.json @@ -9,8 +9,7 @@ "kits": [ { "type": "ShellKit", - "pre-push": [ - ], + "pre-push": [], "run-command": [ "rm -rf /storage/media/100/local/files/*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", @@ -20,8 +19,7 @@ }, { "type": "PushKit", - "pre-push": [ - ], + "pre-push": [], "push": [ "./resource/medialibrary/01.jpg ->/storage/media/100/local/temp", "./resource/medialibrary/01.mp3 ->/storage/media/100/local/temp", @@ -36,30 +34,27 @@ "mkdir -pv /storage/media/100/local/files/Videos/{Static,Dynamic}", "mkdir -pv /storage/media/100/local/files/Audios/{Static,Dynamic}", "mkdir -pv /storage/media/100/local/files/Documents/{Static,Dynamic}", - "for d in Static; do for i in $$(seq 6); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;", "for d in Static; do for i in $$(seq 6); do cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;", "for d in Static; do for i in $$(seq 6); do cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/$$d/0$$i.mp4; done;done;", "for d in Static; do for i in $$(seq 6); do cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;", - "cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/Dynamic/01.jpg", "cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/Dynamic/01.mp4", "cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/Dynamic/01.mp3", "cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/Dynamic/01.dat", - "chmod -R 777 /storage/media/100/local/files/*", "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*", "hilog -Q pidoff", "hilog -p off", "hilog -b I", - "hilog -b D -D 0xD002B70", + "hilog -b D -D 0xD002B70", "scanner_demo", "sleep 10" ] }, { "test-file-name": [ - "ActsMediaLibraryFile.hap" + "ActsMediaLibraryFileTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestCallback.test.ets b/multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestCallback.test.ets index 9a17f9b4a..ef2805faa 100755 --- a/multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestCallback.test.ets @@ -39,7 +39,7 @@ export default function fileTestCallbackTest(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); await getPermission(); - await checkPresetsAssets(media, 'ActsMediaLibraryFile') + await checkPresetsAssets(media, 'ActsMediaLibraryFileTest') }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestPromise.test.ets index 3ff693149..14db2dd61 100755 --- a/multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_file/entry/src/main/ets/test/fileTestPromise.test.ets @@ -37,7 +37,7 @@ export default function fileTestPromiseTest(abilityContext) { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryFile') + await checkPresetsAssets(media, 'ActsMediaLibraryFileTest') }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/BUILD.gn b/multimedia/medialibrary/mediaLibrary_fileAsset/BUILD.gn index f6dc879da..908b75b8f 100755 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/BUILD.gn +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/BUILD.gn @@ -21,7 +21,7 @@ ohos_js_hap_suite("mediaLibrary_fileAsset_hap") { ] ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsMediaLibraryFileAsset" + hap_name = "ActsMediaLibraryFileAssetTest" } ohos_app_scope("medialibrary_app_profile") { diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/Test.json b/multimedia/medialibrary/mediaLibrary_fileAsset/Test.json index e0c6b77ef..f722038a3 100755 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/Test.json +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/Test.json @@ -9,8 +9,7 @@ "kits": [ { "type": "ShellKit", - "pre-push": [ - ], + "pre-push": [], "run-command": [ "rm -rf /storage/media/100/local/files/*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", @@ -20,8 +19,7 @@ }, { "type": "PushKit", - "pre-push": [ - ], + "pre-push": [], "push": [ "./resource/medialibrary/01.jpg ->/storage/media/100/local/temp", "./resource/medialibrary/01.mp3 ->/storage/media/100/local/temp", @@ -36,30 +34,27 @@ "mkdir -pv /storage/media/100/local/files/Videos/{ModifyCb,ModifyPro,RW,R,W,RW_cb,R_cb,W_cb,openClose}", "mkdir -pv /storage/media/100/local/files/Audios/{ModifyCb,ModifyPro,RW,R,W,RW_cb,R_cb,W_cb,openClose}", "mkdir -pv /storage/media/100/local/files/Documents/{ModifyCb,ModifyPro,RW,R,W,RW_cb,R_cb,W_cb,openClose}", - "for d in RW_cb R_cb W_cb RW R W openClose; do for i in $$(seq 2); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;", "for d in RW_cb R_cb W_cb RW R W openClose; do for i in $$(seq 2); do cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;", "for d in RW_cb R_cb W_cb RW R W openClose; do for i in $$(seq 2); do cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/$$d/0$$i.mp4; done;done;", "for d in RW_cb R_cb W_cb RW R W openClose; do for i in $$(seq 2); do cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;", - "for d in ModifyCb ModifyPro; do for i in $$(seq 7); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;", "for d in ModifyCb ModifyPro; do for i in $$(seq 5); do cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;", "for d in ModifyCb ModifyPro; do for i in $$(seq 5); do cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/$$d/0$$i.mp4; done;done;", "for d in ModifyCb ModifyPro; do for i in $$(seq 5); do cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;", - "chmod -R 777 /storage/media/100/local/files/*", "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*", "hilog -Q pidoff", "hilog -p off", "hilog -b I", - "hilog -b D -D 0xD002B70", + "hilog -b D -D 0xD002B70", "scanner_demo", "sleep 10" ] }, { "test-file-name": [ - "ActsMediaLibraryFileAsset.hap" + "ActsMediaLibraryFileAssetTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetCallback2.test.ets b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetCallback2.test.ets index ce64d8226..da9737740 100755 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetCallback2.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetCallback2.test.ets @@ -33,7 +33,7 @@ export default function fileAssetCallback2Test(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); await getPermission(); - await checkPresetsAssets(media, 'ActsMediaLibraryFileAsset') + await checkPresetsAssets(media, 'ActsMediaLibraryFileAssetTest') }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets index 641a32c0e..2be8986ff 100755 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetPromise2.test.ets @@ -31,7 +31,7 @@ export default function fileAssetPromise2Test(abilityContext) { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryFileAsset') + await checkPresetsAssets(media, 'ActsMediaLibraryFileAssetTest') }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets index 1f1e7f089..21f0275e1 100755 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestCallback.test.ets @@ -33,7 +33,7 @@ export default function fileAssetTestCallbackTest(abilityContext) { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryFileAsset') + await checkPresetsAssets(media, 'ActsMediaLibraryFileAssetTest') }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets index 0cfdc1ab9..6871c1612 100755 --- a/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileAsset/entry/src/main/ets/test/fileAssetTestPromise.test.ets @@ -33,7 +33,7 @@ export default function fileAssetTestPromiseTest(abilityContext) { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryFileAsset') + await checkPresetsAssets(media, 'ActsMediaLibraryFileAssetTest') }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_fileKey/BUILD.gn b/multimedia/medialibrary/mediaLibrary_fileKey/BUILD.gn index 562786427..c4d65b026 100755 --- a/multimedia/medialibrary/mediaLibrary_fileKey/BUILD.gn +++ b/multimedia/medialibrary/mediaLibrary_fileKey/BUILD.gn @@ -21,7 +21,7 @@ ohos_js_hap_suite("mediaLibrary_fileKey_hap") { ] ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsMediaLibraryFileKey" + hap_name = "ActsMediaLibraryFileKeyTest" } ohos_app_scope("medialibrary_app_profile") { diff --git a/multimedia/medialibrary/mediaLibrary_fileKey/Test.json b/multimedia/medialibrary/mediaLibrary_fileKey/Test.json index 735609d55..f795ed465 100755 --- a/multimedia/medialibrary/mediaLibrary_fileKey/Test.json +++ b/multimedia/medialibrary/mediaLibrary_fileKey/Test.json @@ -9,8 +9,7 @@ "kits": [ { "type": "ShellKit", - "pre-push": [ - ], + "pre-push": [], "run-command": [ "rm -rf /storage/media/100/local/files/*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", @@ -20,8 +19,7 @@ }, { "type": "PushKit", - "pre-push": [ - ], + "pre-push": [], "push": [ "./resource/medialibrary/01.jpg ->/storage/media/100/local/temp", "./resource/medialibrary/01.mp3 ->/storage/media/100/local/temp", @@ -34,23 +32,21 @@ "run-command": [ "mkdir -pv /storage/media/100/local/files/Pictures/ImageInfo", "mkdir -pv /storage/media/100/local/files/Audios/Static", - "cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/ImageInfo/01.jpg", "cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/Static/01.mp3", - "chmod -R 777 /storage/media/100/local/files/*", "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*", "hilog -Q pidoff", "hilog -p off", "hilog -b I", - "hilog -b D -D 0xD002B70", + "hilog -b D -D 0xD002B70", "scanner_demo", "sleep 10" ] }, { "test-file-name": [ - "ActsMediaLibraryFileKey.hap" + "ActsMediaLibraryFileKeyTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestCallback.test.ets b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestCallback.test.ets index 47bc52614..1749cbea6 100755 --- a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestCallback.test.ets @@ -35,7 +35,7 @@ export default function filekeyTestCallbackTest(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); await getPermission(); - await checkPresetsAssets(media, 'ActsMediaLibraryFileKey') + await checkPresetsAssets(media, 'ActsMediaLibraryFileKeyTest') }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestPromise.test.ets b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestPromise.test.ets index c8548b7bf..e64a2e5cf 100755 --- a/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileKey/entry/src/main/ets/test/filekeyTestPromise.test.ets @@ -35,7 +35,7 @@ export default function filekeyTestPromiseTest(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryFileKey') + await checkPresetsAssets(media, 'ActsMediaLibraryFileKeyTest') }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_fileResult/BUILD.gn b/multimedia/medialibrary/mediaLibrary_fileResult/BUILD.gn index d423dfe52..ac7151e2f 100755 --- a/multimedia/medialibrary/mediaLibrary_fileResult/BUILD.gn +++ b/multimedia/medialibrary/mediaLibrary_fileResult/BUILD.gn @@ -21,7 +21,7 @@ ohos_js_hap_suite("mediaLibrary_fileResult_hap") { ] ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsMediaLibraryFileResult" + hap_name = "ActsMediaLibraryFileResultTest" } ohos_app_scope("medialibrary_app_profile") { diff --git a/multimedia/medialibrary/mediaLibrary_fileResult/Test.json b/multimedia/medialibrary/mediaLibrary_fileResult/Test.json index 0f71e7df5..5501672b4 100755 --- a/multimedia/medialibrary/mediaLibrary_fileResult/Test.json +++ b/multimedia/medialibrary/mediaLibrary_fileResult/Test.json @@ -9,8 +9,7 @@ "kits": [ { "type": "ShellKit", - "pre-push": [ - ], + "pre-push": [], "run-command": [ "rm -rf /storage/media/100/local/files/*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", @@ -20,8 +19,7 @@ }, { "type": "PushKit", - "pre-push": [ - ], + "pre-push": [], "push": [ "./resource/medialibrary/01.jpg ->/storage/media/100/local/temp", "./resource/medialibrary/01.mp3 ->/storage/media/100/local/temp", @@ -36,25 +34,23 @@ "mkdir -pv /storage/media/100/local/files/Videos/Static", "mkdir -pv /storage/media/100/local/files/Audios/Static", "mkdir -pv /storage/media/100/local/files/Documents/Static", - "for d in Static; do for i in $$(seq 4); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;", "for d in Static; do for i in $$(seq 4); do cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;", "for d in Static; do for i in $$(seq 4); do cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/$$d/0$$i.mp4; done;done;", "for d in Static; do for i in $$(seq 100); do cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;", - "chmod -R 777 /storage/media/100/local/files/*", "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*", "hilog -Q pidoff", "hilog -p off", "hilog -b I", - "hilog -b D -D 0xD002B70", + "hilog -b D -D 0xD002B70", "scanner_demo", "sleep 10" ] }, { "test-file-name": [ - "ActsMediaLibraryFileResult.hap" + "ActsMediaLibraryFileResultTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true diff --git a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultCallback.test.ets b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultCallback.test.ets index 5c8a96454..57f6244a6 100755 --- a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultCallback.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultCallback.test.ets @@ -33,7 +33,7 @@ export default function fetchFileResultCallbackTest(abilityContext) { beforeAll(async function () { console.info('beforeAll case'); await getPermission(); - await checkPresetsAssets(media, 'ActsMediaLibraryFileResult'); + await checkPresetsAssets(media, 'ActsMediaLibraryFileResultTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultPromise.test.ets b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultPromise.test.ets index 993945076..ab3280ba5 100755 --- a/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultPromise.test.ets +++ b/multimedia/medialibrary/mediaLibrary_fileResult/entry/src/main/ets/test/fetchFileResultPromise.test.ets @@ -34,7 +34,7 @@ export default function fetchFileResultPromiseTest(abilityContext) { const media = mediaLibrary.getMediaLibrary(abilityContext); beforeAll(async function () { console.info('beforeAll case'); - await checkPresetsAssets(media, 'ActsMediaLibraryFileResult'); + await checkPresetsAssets(media, 'ActsMediaLibraryFileResultTest'); }); beforeEach(function () { console.info('beforeEach case'); diff --git a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/BUILD.gn b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/BUILD.gn index 6664cc18d..45fae924f 100644 --- a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/BUILD.gn +++ b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/BUILD.gn @@ -21,7 +21,7 @@ ohos_js_hap_suite("mediaLibrary_mediafetchoptions_hap") { ] ets2abc = true certificate_profile = "signature/openharmony_sx.p7b" - hap_name = "ActsMediaLibraryMediafetchoptions" + hap_name = "ActsMediaLibraryMediafetchoptionsTest" } ohos_app_scope("medialibrary_app_profile") { diff --git a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/Test.json b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/Test.json index 05a70e69a..a03db5d2c 100644 --- a/multimedia/medialibrary/mediaLibrary_mediafetchoptions/Test.json +++ b/multimedia/medialibrary/mediaLibrary_mediafetchoptions/Test.json @@ -9,8 +9,7 @@ "kits": [ { "type": "ShellKit", - "pre-push": [ - ], + "pre-push": [], "run-command": [ "rm -rf /storage/media/100/local/files/*", "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*", @@ -20,8 +19,7 @@ }, { "type": "PushKit", - "pre-push": [ - ], + "pre-push": [], "push": [ "./resource/medialibrary/01.jpg ->/storage/media/100/local/temp", "./resource/medialibrary/01.mp3 ->/storage/media/100/local/temp", @@ -36,25 +34,23 @@ "mkdir -pv /storage/media/100/local/files/Videos/Static", "mkdir -pv /storage/media/100/local/files/Audios/Static", "mkdir -pv /storage/media/100/local/files/Documents/Static", - "for d in Static; do for i in $$(seq 2); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;", "for d in Static; do for i in $$(seq 2); do cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;", "for d in Static; do for i in $$(seq 2); do cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/$$d/0$$i.mp4; done;done;", "for d in Static; do for i in $$(seq 2); do cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;", - "chmod -R 777 /storage/media/100/local/files/*", "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*", "hilog -Q pidoff", "hilog -p off", "hilog -b I", - "hilog -b D -D 0xD002B70", + "hilog -b D -D 0xD002B70", "scanner_demo", "sleep 10" ] }, { "test-file-name": [ - "ActsMediaLibraryMediafetchoptions.hap" + "ActsMediaLibraryMediafetchoptionsTest.hap" ], "type": "AppInstallKit", "cleanup-apps": true -- GitLab