Test.json 3.4 KB
Newer Older
C
caochuan 已提交
1 2 3
{
    "description": "Configuration for mediaLibrary Tests",
    "driver": {
C
caochuan 已提交
4 5 6 7 8 9
        "type": "OHJSUnitTest",
        "test-timeout": "180000",
        "bundle-name": "ohos.acts.multimedia.mediaLibrary",
        "module-name": "phone",
        "shell-timeout": "600000",
        "testcase-timeout": 70000
C
caochuan 已提交
10 11 12 13
    },
    "kits": [
        {
            "type": "ShellKit",
C
caochuan 已提交
14
            "pre-push": [],
C
caochuan 已提交
15
            "run-command": [
Y
yangbo 已提交
16 17 18
                "rm -rf /storage/media/100/local/files/*",
                "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*",
                "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`",
Y
yangbo 已提交
19
                "scanner",
Y
yangbo 已提交
20 21
                "sleep 5",
                "mkdir /storage/media/100/local/temp",
22
                "param set persist.ace.testmode.enabled 1",
C
caochuan 已提交
23 24 25
                "power-shell wakeup",
                "uinput  -T -d 300 600 -m 300 600 300 100 -u 300 100",
                "power-shell setmode 602"
C
caochuan 已提交
26 27 28 29
            ]
        },
        {
            "type": "PushKit",
C
caochuan 已提交
30
            "pre-push": [],
C
caochuan 已提交
31
            "push": [
C
caochuan 已提交
32 33 34 35
                "./resource/medialibrary/01.jpg ->/storage/media/100/local/temp",
                "./resource/medialibrary/01.mp3 ->/storage/media/100/local/temp",
                "./resource/medialibrary/01.mp4 ->/storage/media/100/local/temp",
                "./resource/medialibrary/01.dat ->/storage/media/100/local/temp"
C
caochuan 已提交
36 37 38 39 40
            ]
        },
        {
            "type": "ShellKit",
            "run-command": [
Y
yangbo 已提交
41
                "mkdir -pv /storage/media/100/local/files/Videos/ScreenRecordings",
C
caochuan 已提交
42 43
                "mkdir -pv /storage/media/100/local/files/Audios/{trash,trashCb}",
                "mkdir -pv /storage/media/100/local/files/Documents/{trash,trashCb}",
Y
yangbo 已提交
44
                "for i in $$(seq 3); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Camera/0$$i.jpg; done;",
Y
yangbo 已提交
45
                "for i in $$(seq 3); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Videos/ScreenRecordings/0$$i.mp4; done;",
C
caochuan 已提交
46 47
                "for d in trash trashCb; do for i in $$(seq 3); do cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;",
                "for d in trash trashCb; do for i in $$(seq 3); do cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;",
C
caochuan 已提交
48 49 50 51 52
                "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",
53
                "hilog -b D -D 0xD002B70",
Y
yangbo 已提交
54
                "scanner",
C
caochuan 已提交
55
                "sleep 10"
L
lwx1121892 已提交
56
            ],
C
caochuan 已提交
57
            "teardown-command": [
Y
update  
yangbo 已提交
58 59 60 61 62 63 64 65
                "power-shell setmode 600",
                "rm -rf /storage/media/100/local/temp",
                "rm -rf /storage/media/100/local/files/*",
                "rm -rf /storage/media/100/local/files/.*",
                "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*",
                "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`",
                "scanner",
                "sleep 5"
C
caochuan 已提交
66 67 68 69 70 71 72 73 74 75
            ]
        },
        {
            "test-file-name": [
                "ActsMediaLibraryTrashJsTest.hap"
            ],
            "type": "AppInstallKit",
            "cleanup-apps": true
        }
    ]
C
caochuan 已提交
76
}