• 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": 10000
10    },
11    "kits": [
12        {
13            "type": "ShellKit",
14            "pre-push": [],
15            "run-command": [
16                "rm -rf /storage/media/100/local/files/Audios/*",
17                "rm -rf /storage/media/100/local/files/Audios/.*",
18                "rm -rf /storage/media/100/local/files/Camera/*",
19                "rm -rf /storage/media/100/local/files/Camera/.*",
20                "rm -rf /storage/media/100/local/files/Documents/*",
21                "rm -rf /storage/media/100/local/files/Documents/.*",
22                "rm -rf /storage/media/100/local/files/Download/*",
23                "rm -rf /storage/media/100/local/files/Download/.*",
24                "rm -rf /storage/media/100/local/files/Pictures/*",
25                "rm -rf /storage/media/100/local/files/Pictures/.*",
26                "rm -rf /storage/media/100/local/files/Videos/*",
27                "rm -rf /storage/media/100/local/files/Videos/.*",
28                "sleep 5",
29                "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*",
30                "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`",
31                "scanner",
32                "sleep 5",
33                "mkdir /storage/media/100/local/temp",
34                "param set persist.ace.testmode.enabled 1",
35                "power-shell wakeup",
36                "uinput  -T -d 300 600 -m 300 600 300 100 -u 300 100",
37                "power-shell setmode 602"
38            ]
39        },
40        {
41            "type": "PushKit",
42            "pre-push": [],
43            "push": [
44                "./resource/medialibrary/01.jpg ->/storage/media/100/local/temp",
45                "./resource/medialibrary/01.mp3 ->/storage/media/100/local/temp",
46                "./resource/medialibrary/01.mp4 ->/storage/media/100/local/temp",
47                "./resource/medialibrary/01.dat ->/storage/media/100/local/temp"
48            ]
49        },
50        {
51            "type": "ShellKit",
52            "run-command": [
53                "mkdir -pv /storage/media/100/local/files/Pictures/{Static,On,Off,OnAlbum,OffAlbum}",
54                "mkdir -pv /storage/media/100/local/files/Videos//{Static,On,Off}",
55                "mkdir -pv /storage/media/100/local/files/Audios/{Static,On,Off}",
56                "mkdir -pv /storage/media/100/local/files/Documents/{Static,On,Off,deviceOn,remoteOn,deviceOff,remoteOff}",
57                "mkdir -pv /storage/media/100/local/files/Pictures/Screenshots",
58                "cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/Screenshots/01.jpg",
59                "for d in Static On Off OnAlbum OffAlbum; do for i in $$(seq 1); do cp /storage/media/100/local/temp/01.jpg /storage/media/100/local/files/Pictures/$$d/0$$i.jpg; done;done;",
60                "for d in Static On Off; do for i in $$(seq 1); do cp /storage/media/100/local/temp/01.mp3 /storage/media/100/local/files/Audios/$$d/0$$i.mp3; done;done;",
61                "for d in Static On Off; do for i in $$(seq 1); do cp /storage/media/100/local/temp/01.mp4 /storage/media/100/local/files/Videos/$$d/0$$i.mp4; done;done;",
62                "for d in Static On Off deviceOn remoteOn deviceOff remoteOff; do for i in $$(seq 1); do cp /storage/media/100/local/temp/01.dat /storage/media/100/local/files/Documents/$$d/0$$i.dat; done;done;",
63                "chmod -R 777 /storage/media/100/local/files/*",
64                "chmod -R 777 /data/service/el2/100/hmdfs/account/files/*",
65                "hilog -Q pidoff",
66                "hilog -p off",
67                "hilog -b I",
68                "hilog -b D -D 0xD002B70",
69                "scanner",
70                "sleep 10"
71            ],
72            "teardown-command": [
73                "power-shell setmode 600",
74                "rm -rf /storage/media/100/local/temp",
75                "rm -rf /storage/media/100/local/files/Audios/*",
76                "rm -rf /storage/media/100/local/files/Audios/.*",
77                "rm -rf /storage/media/100/local/files/Camera/*",
78                "rm -rf /storage/media/100/local/files/Camera/.*",
79                "rm -rf /storage/media/100/local/files/Documents/*",
80                "rm -rf /storage/media/100/local/files/Documents/.*",
81                "rm -rf /storage/media/100/local/files/Download/*",
82                "rm -rf /storage/media/100/local/files/Download/.*",
83                "rm -rf /storage/media/100/local/files/Pictures/*",
84                "rm -rf /storage/media/100/local/files/Pictures/.*",
85                "rm -rf /storage/media/100/local/files/Videos/*",
86                "rm -rf /storage/media/100/local/files/Videos/.*",
87                "rm -rf /data/app/el2/100/database/com.ohos.medialibrary.medialibrarydata/*",
88                "kill -9 `pidof com.ohos.medialibrary.medialibrarydata`",
89                "sleep 5"
90            ]
91        },
92        {
93            "test-file-name": [
94                "ActsMediaLibraryBaseTest.hap"
95            ],
96            "type": "AppInstallKit",
97            "cleanup-apps": true
98        }
99    ]
100}