Test.json 4.4 KB
Newer Older
G
gudehe 已提交
1 2 3 4
{
    "description": "Configuration for mediaLibrary Tests",
    "driver": {
        "type": "JSUnitTest",
P
panqiangbiao 已提交
5
        "test-timeout": "600000",
G
gudehe 已提交
6
        "package": "ohos.acts.multimedia.mediaLibrary",
P
panqiangbiao 已提交
7
        "shell-timeout": "600000"
G
gudehe 已提交
8 9
    },
    "kits": [
Z
zhangxingxia 已提交
10 11 12 13 14 15 16 17 18 19 20
        {
            "type": "ShellKit",
            "pre-push": [
            ],
            "run-command": [
                "rm -rf /storage/media/100/local/files/*",
                "rm -rf /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA/*",
                "mkdir -pv /storage/media/100/local/files/{Pictures,Videos,Audios,Documents}",
                "mkdir -p /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA"
            ]
        },
G
gudehe 已提交
21 22 23 24 25
        {
            "type": "PushKit",
            "pre-push": [
            ],
            "push": [
Z
zhangxingxia 已提交
26 27 28 29
                "./resource/medialibrary/01.jpg ->/data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA",
                "./resource/medialibrary/01.mp3 ->/data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA",
                "./resource/medialibrary/01.mp4 ->/data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA",
                "./resource/medialibrary/01.dat ->/data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA"
G
gudehe 已提交
30 31 32 33 34
            ]
        },
        {
            "type": "ShellKit",
            "run-command": [
Z
zhangxingxia 已提交
35 36 37 38 39 40 41 42 43 44 45
                "mkdir -pv /storage/media/100/local/files/{Pictures/{Static,Static01,Album/Static,SR001PRO,SR001CB,Dynamic,Dynamic01,Dynamic02,Dynamic022,DeleteCb01,AblumInfo,DeletePro01,Delete01,Temp},Videos/{Static,Static01,Album/Static,SR001PRO,SR001CB,Dynamic,Dynamic01,Dynamic02,DeleteCb01,AblumInfo,DeletePro01,Delete01},Audios/{Static,Static01,Album/Static,SR001PRO,SR001CB,Dynamic,Dynamic01,Dynamic02,DeleteCb01,AblumInfo,DeletePro01,Delete01},Documents/{Static,Static01,Album/Static,SR001PRO,SR001CB,Dynamic,Dynamic01,Dynamic02,DeleteCb01,AblumInfo,DeletePro01,Delete01}}",
                "for d in Static Album/Static Dynamic Dynamic01 Dynamic022 AblumInfo; do for i in $$(seq 3); do cp /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;",
                "for d in Static Album/Static Dynamic Dynamic01 Dynamic02 AblumInfo; do for i in $$(seq 3); do cp /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;",
                "for d in Static Album/Static Dynamic Dynamic01 Dynamic02 AblumInfo; do for i in $$(seq 3); do cp /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA/01.mp4 /storage/media/100/local/files/Videos/$$d/0$$i.mp4; done;done;",
                "for d in Static Album/Static Dynamic Dynamic01 Dynamic02 AblumInfo; do for i in $$(seq 3); do cp /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;",
               
                "for d in SR001PRO SR001CB DeleteCb01 DeletePro01 Static01;  do cp /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA/01.jpg /storage/media/100/local/files/Pictures/$$d ;done;",
                "for d in SR001PRO SR001CB DeleteCb01 DeletePro01 Static01;  do cp /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA/01.mp3 /storage/media/100/local/files/Audios/$$d ;done;",
                "for d in SR001PRO SR001CB DeleteCb01 DeletePro01 Static01;  do cp /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA/01.mp4 /storage/media/100/local/files/Videos/$$d ;done;",
                "for d in SR001PRO SR001CB DeleteCb01 DeletePro01 Static01;  do cp /data/accounts/account_0/appdata/com.ohos.medialibrary.MediaLibraryDataA/01.dat /storage/media/100/local/files/Documents/$$d ;done;",

G
gudehe 已提交
46
                "chmod -R 777 /storage/media/100/local/files/*",
P
panqiangbiao 已提交
47 48
                "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
                "killall com.ohos.medialibrary.MediaScannerAbilityA",
Z
zhangxingxia 已提交
49 50
                "aa start  -a MediaScannerAbility -b com.ohos.medialibrary.MediaScannerAbilityA",
                "sleep 20"
G
gudehe 已提交
51 52 53 54
            ]
        },
        {
            "test-file-name": [
T
tongtongdad 已提交
55
                "ActsMediaLibraryJsTest.hap"
G
gudehe 已提交
56 57 58 59 60
            ],
            "type": "AppInstallKit",
            "cleanup-apps": true
        }
    ]
G
gudehe 已提交
61
}