Test.json 5.3 KB
Newer Older
C
caochuan 已提交
1 2 3 4 5 6 7 8
{
    "description": "Configuration for mediaLibrary Tests",
    "driver": {
        "type": "OHJSUnitTest",
        "test-timeout": "180000",
        "bundle-name": "ohos.acts.multimedia.mediaLibrary",
        "module-name": "phone",
        "shell-timeout": "600000",
Y
yangbo 已提交
9
        "testcase-timeout": 10000
C
caochuan 已提交
10 11 12 13 14 15
    },
    "kits": [
        {
            "type": "ShellKit",
            "pre-push": [],
            "run-command": [
Y
yangbo 已提交
16 17 18 19 20 21 22 23 24 25 26 27 28
                "rm -rf /storage/media/100/local/files/Audios/*",
                "rm -rf /storage/media/100/local/files/Audios/.*",
                "rm -rf /storage/media/100/local/files/Camera/*",
                "rm -rf /storage/media/100/local/files/Camera/.*",
                "rm -rf /storage/media/100/local/files/Documents/*",
                "rm -rf /storage/media/100/local/files/Documents/.*",
                "rm -rf /storage/media/100/local/files/Download/*",
                "rm -rf /storage/media/100/local/files/Download/.*",
                "rm -rf /storage/media/100/local/files/Pictures/*",
                "rm -rf /storage/media/100/local/files/Pictures/.*",
                "rm -rf /storage/media/100/local/files/Videos/*",
                "rm -rf /storage/media/100/local/files/Videos/.*",
                "sleep 5",
Y
yangbo 已提交
29 30
                "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*",
                "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`",
Y
yangbo 已提交
31
                "scanner",
Y
yangbo 已提交
32 33
                "sleep 5",
                "mkdir /storage/media/100/local/temp",
34
                "param set persist.ace.testmode.enabled 1",
C
caochuan 已提交
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
                "power-shell wakeup",
                "uinput  -T -d 300 600 -m 300 600 300 100 -u 300 100",
                "power-shell setmode 602"
            ]
        },
        {
            "type": "PushKit",
            "pre-push": [],
            "push": [
                "./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"
            ]
        },
        {
            "type": "ShellKit",
            "run-command": [
                "mkdir -pv /storage/media/100/local/files/Pictures/{Static,Dynamic}",
                "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",
                "scanner",
                "sleep 10"
            ],
            "teardown-command": [
Y
update  
yangbo 已提交
75 76
                "power-shell setmode 600",
                "rm -rf /storage/media/100/local/temp",
Y
yangbo 已提交
77 78 79 80 81 82 83 84 85 86 87 88
                "rm -rf /storage/media/100/local/files/Audios/*",
                "rm -rf /storage/media/100/local/files/Audios/.*",
                "rm -rf /storage/media/100/local/files/Camera/*",
                "rm -rf /storage/media/100/local/files/Camera/.*",
                "rm -rf /storage/media/100/local/files/Documents/*",
                "rm -rf /storage/media/100/local/files/Documents/.*",
                "rm -rf /storage/media/100/local/files/Download/*",
                "rm -rf /storage/media/100/local/files/Download/.*",
                "rm -rf /storage/media/100/local/files/Pictures/*",
                "rm -rf /storage/media/100/local/files/Pictures/.*",
                "rm -rf /storage/media/100/local/files/Videos/*",
                "rm -rf /storage/media/100/local/files/Videos/.*",
Y
update  
yangbo 已提交
89 90 91
                "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*",
                "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`",
                "sleep 5"
C
caochuan 已提交
92 93 94 95 96 97 98 99 100 101
            ]
        },
        {
            "test-file-name": [
                "ActsMediaLibraryFileTest.hap"
            ],
            "type": "AppInstallKit",
            "cleanup-apps": true
        }
    ]
C
caochuan 已提交
102
}