hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
#!/bin/bash
### file: rockchip-test.sh
### function: ddr cpu gpio flash bt audio recovery s2r sdio/pcie(wifi)
###           ethernet reboot ddrfreq npu camera video and so on.
 
CURRENT_DIR=`dirname $0`
 
moudle_env()
{
   export MODULE_CHOICE
}
 
module_choice()
{
    echo "******************************************************"
    echo "***                                                ***"
    echo "***          *****************************         ***"
    echo "***          *    ROCKCHIPS TEST TOOLS   *         ***"
    echo "***          *  V2.0 updated on 20220928 *         ***"
    echo "***          *****************************         ***"
    echo "***                                                ***"
    echo "*****************************************************"
 
 
    echo "*****************************************************"
    echo "ddr test:              1 (ddr stress test)"
    echo "cpu test:              2 (cpu stress test)"
    echo "gpu test:              3 (gpu stress test)"
    echo "npu test:              4 (npu stress test)"
    echo "suspend_resume test:   5 (suspend resume)"
    echo "reboot test:           6 (auto reboot test)"
    echo "power lost test:       7 (power lost test)"
    echo "flash stress test:     8 (flash stress test)"
    echo "recovery test:         9 (recovery wipe all test)"
    echo "audio test:           10 (audio test)"
    echo "camera test:          11 (camera test)"
    echo "video test:           12 (video test)"
    echo "bluetooth test:       13 (bluetooth on off test)"
    echo "wifi test:            14 (wifi on off test)"
    echo "chromium test:        15 (chromium with video test)"
    echo "*****************************************************"
 
    read -t 30 -p "please input test moudle: " MODULE_CHOICE
}
 
npu_stress_test()
{
    bash ${CURRENT_DIR}/npu/npu_test.sh
}
 
npu2_stress_test()
{
    bash ${CURRENT_DIR}/npu2/npu_test.sh
}
 
ddr_test()
{
    bash ${CURRENT_DIR}/ddr/ddr_test.sh
}
 
cpu_test()
{
    bash ${CURRENT_DIR}/cpu/cpu_test.sh
}
 
flash_stress_test()
{
    bash ${CURRENT_DIR}/flash_test/flash_stress_test.sh 5 20000 &
}
 
recovery_test()
{
    bash ${CURRENT_DIR}/recovery/recovery_test.sh
}
 
suspend_resume_test()
{
    bash ${CURRENT_DIR}/suspend_resume/suspend_resume.sh
}
 
wifi_test()
{
    bash ${CURRENT_DIR}/wifibt/wifi_onoff.sh &
}
 
bluetooth_test()
{
    bash ${CURRENT_DIR}/wifibt/bt_onoff.sh &
}
 
audio_test()
{
    bash ${CURRENT_DIR}/audio/audio_functions_test.sh
}
 
auto_reboot_test()
{
    fcnt=/userdata/rockchip/reboot_cnt;
    if [ -e "$fcnt" ]; then
   rm -f $fcnt;
    fi
    bash ${CURRENT_DIR}/auto_reboot/auto_reboot.sh
}
 
camera_test()
{
    bash ${CURRENT_DIR}/camera/camera_test.sh
}
 
video_test()
{
    bash ${CURRENT_DIR}/video/video_test.sh
}
 
gpu_test()
{
    bash ${CURRENT_DIR}/gpu/gpu_test.sh
}
 
chromium_test()
{
    bash ${CURRENT_DIR}/chromium/chromium_test.sh
}
 
power_lost_test()
{
    fcnt=/userdata${CURRENT_DIR}/power_lost/reboot_cnt;
    if [ -e "$fcnt" ]; then
        rm -f $fcnt;
    fi
    bash ${CURRENT_DIR}/flash_test/power_lost_test.sh  &
}
 
module_test()
{
   case ${MODULE_CHOICE} in
       1)
           ddr_test
           ;;
       2)
           cpu_test
           ;;
       3)
           gpu_test
           ;;
       4)
           npu2_stress_test
           ;;
       5)
           suspend_resume_test
           ;;
       6)
           auto_reboot_test
           ;;
       7)
           power_lost_test
           ;;
       8)
           flash_stress_test
           ;;
       9)
           recovery_test
           ;;
       10)
           audio_test
           ;;
       11)
           camera_test
           ;;
       12)
           video_test
           ;;
       13)
           bluetooth_test
           ;;
       14)
           wifi_test
           ;;
       15)
           chromium_test
           ;;
   esac
}
 
module_choice
module_test