Test.json 4.8 KB
Newer Older
W
weiyufeng 已提交
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
W
weiyufeng 已提交
10 11 12 13
    },
    "kits": [
        {
            "type": "ShellKit",
C
caochuan 已提交
14
            "pre-push": [],
W
weiyufeng 已提交
15
            "run-command": [
Y
yangbo 已提交
16 17 18 19 20 21
                "rm -rf /storage/media/100/local/files/Audios/*",
                "rm -rf /storage/media/100/local/files/Camera/*",
                "rm -rf /storage/media/100/local/files/Documents/*",
                "rm -rf /storage/media/100/local/files/Download/*",
                "rm -rf /storage/media/100/local/files/Pictures/*",
                "rm -rf /storage/media/100/local/files/Videos/*",
C
caochuan 已提交
22
                "mkdir -p /storage/media/100/local/temp",
23 24
                "param set persist.sys.suspend_manager_enabled 0",
                "reboot",
25
                "param set persist.ace.testmode.enabled 1",
C
caochuan 已提交
26 27 28
                "power-shell wakeup",
                "uinput  -T -d 300 600 -m 300 600 300 100 -u 300 100",
                "power-shell setmode 602"
W
weiyufeng 已提交
29 30 31 32
            ]
        },
        {
            "type": "PushKit",
C
caochuan 已提交
33
            "pre-push": [],
W
weiyufeng 已提交
34
            "push": [
C
caochuan 已提交
35 36 37 38
                "./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"
W
weiyufeng 已提交
39 40 41 42 43
            ]
        },
        {
            "type": "ShellKit",
            "run-command": [
C
caochuan 已提交
44 45 46 47
                "mkdir -pv /storage/media/100/local/files/Pictures/{ModifyCb,ModifyPro,RW,R,W,RW_cb,R_cb,W_cb,openClose}",
                "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}",
C
caochuan 已提交
48 49 50 51
                "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;",
52
                "for d in ModifyCb ModifyPro; do for i in $$(seq 15); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;",
C
caochuan 已提交
53 54 55
                "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;",
W
weiyufeng 已提交
56 57 58 59
                "chmod -R 777 /storage/media/100/local/files/*",
                "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
                "hilog -Q pidoff",
                "hilog -p off",
C
caochuan 已提交
60
                "hilog -b I",
C
caochuan 已提交
61
                "hilog -b D -D 0xD002B70",
Y
yangbo 已提交
62
                "scanner",
W
weiyufeng 已提交
63
                "sleep 10"
1
modify  
18742514821 已提交
64
            ],
C
caochuan 已提交
65
            "teardown-command": [
Y
yangbo 已提交
66 67 68 69 70 71 72
                "rm -rf /storage/media/100/local/files/Audios/*",
                "rm -rf /storage/media/100/local/files/Camera/*",
                "rm -rf /storage/media/100/local/files/Documents/*",
                "rm -rf /storage/media/100/local/files/Download/*",
                "rm -rf /storage/media/100/local/files/Pictures/*",
                "rm -rf /storage/media/100/local/files/Videos/*",
                "rm -rf /storage/media/100/local/temp",
C
chenshuteng 已提交
73 74
                "param set persist.sys.suspend_manager_enabled 1",
                "reboot",
C
caochuan 已提交
75 76
                "hilog -b X -D 0xD002B70",
                "power-shell setmode 600"
W
weiyufeng 已提交
77 78 79 80
            ]
        },
        {
            "test-file-name": [
C
caochuan 已提交
81
                "ActsMediaLibraryFileAssetTest.hap"
W
weiyufeng 已提交
82 83 84 85 86 87
            ],
            "type": "AppInstallKit",
            "cleanup-apps": true
        }
    ]
}