• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2    "description": "Configuration for mediaLibrary Tests",
3    "driver": {
4        "type": "OHJSUnitTest",
5        "test-timeout": "180000",
6        "bundle-name": "ohos.acts.multimedia.mediaLibrary",
7        "module-name": "phone",
8        "shell-timeout": "600000",
9        "testcase-timeout": 20000
10    },
11    "kits": [
12        {
13            "type": "ShellKit",
14            "pre-push": [],
15            "run-command": [
16                "rm -rf /storage/media/100/local/files/Pictures",
17                "rm -rf /storage/media/100/local/files/Videos",
18                "rm -rf /storage/media/100/local/files/Camera",
19                "rm -rf /storage/media/100/local/files/Audios",
20                "rm -rf /storage/media/100/local/files/Docs/Documents/*",
21                "rm -rf /storage/media/100/local/files/Docs/Documents/.*",
22                "rm -rf /storage/media/100/local/files/Photo/*",
23                "sleep 5",
24                "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*",
25                "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`"
26            ]
27        },
28        {
29            "test-file-name": [
30                "ActsMediaLibraryTrashJsTest.hap"
31            ],
32            "type": "AppInstallKit",
33            "cleanup-apps": true
34        },
35        {
36            "type": "ShellKit",
37            "pre-push": [],
38            "run-command": [
39                "param set persist.ace.testmode.enabled 1",
40                "power-shell wakeup",
41                "uinput  -T -d 300 2700 -m 300 2700 300 100 -u 300 100",
42                "power-shell setmode 602",
43                "mkdir -p /storage/media/100/local/files/Pictures",
44                "mkdir -p /storage/media/100/local/files/Videos",
45                "mkdir -p /storage/media/100/local/files/Camera",
46                "mkdir -p /storage/media/100/local/files/Audios",
47                "mkdir -pv /storage/media/100/local/files/Videos/ScreenRecordings",
48                "mkdir -pv /storage/media/100/local/files/Audios/{trash,trashCb}",
49                "mkdir -pv /storage/media/100/local/files/Docs/Documents/{trash,trashCb}",
50                "mkdir -p /data/app/el2/100/base/ohos.acts.multimedia.mediaLibrary/haps/phone/files",
51                "chmod 777 -R /data/app/el2/100/base/ohos.acts.multimedia.mediaLibrary/haps/phone",
52                "chmod -R 777 /storage/media/100/local/files/*",
53                "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*"
54            ]
55        },
56        {
57            "type": "PushKit",
58            "pre-push": [],
59            "push": [
60                "./resource/medialibrary/01.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.mediaLibrary/haps/phone/files/",
61                "./resource/medialibrary/01.mp3 ->/data/app/el2/100/base/ohos.acts.multimedia.mediaLibrary/haps/phone/files/",
62                "./resource/medialibrary/01.mp4 ->/data/app/el2/100/base/ohos.acts.multimedia.mediaLibrary/haps/phone/files/",
63                "./resource/medialibrary/01.dat ->/data/app/el2/100/base/ohos.acts.multimedia.mediaLibrary/haps/phone/files/"
64            ]
65        },
66        {
67            "type": "ShellKit",
68            "run-command": [
69                "hilog -Q pidoff",
70                "hilog -Q domainoff",
71                "hilog -b D -D 0xD002B70"
72            ],
73            "teardown-command": [
74                "power-shell setmode 600",
75                "hilog -Q pidon",
76                "hilog -Q domainon",
77                "rm -rf /storage/media/100/local/files/Pictures",
78                "rm -rf /storage/media/100/local/files/Videos",
79                "rm -rf /storage/media/100/local/files/Camera",
80                "rm -rf /storage/media/100/local/files/Audios",
81                "rm -rf /storage/media/100/local/files/Docs/Documents/*",
82                "rm -rf /storage/media/100/local/files/Docs/Documents/.*",
83                "rm -rf /storage/media/100/local/files/Photo/*",
84                "sleep 5",
85                "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*",
86                "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`"
87            ]
88        }
89    ]
90}