xref: /OK3568_Linux_fs/external/rockchip-test/cpu/cpu_test.sh (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/bash
2
3CURRENT_DIR=`dirname $0`
4
5info_view()
6{
7	echo $CURRENT_DIR
8	echo "*****************************************************"
9	echo "***                                               ***"
10	echo "***                 CPU TEST                      ***"
11	echo "***                                               ***"
12	echo "*****************************************************"
13}
14
15info_view
16echo "*****************************************************"
17echo "stressapptest test:                               1"
18echo "cpu auto scaling:                                 2"
19echo "stressapptest + cpu auto scaling:                 3"
20echo "*****************************************************"
21
22read -t 30 CPUFREQ_CHOICE
23
24cpu_stress_test()
25{
26	bash ${CURRENT_DIR}/../ddr/stressapptest_test.sh &
27}
28
29cpu_freq_scaling_test()
30{
31	bash ${CURRENT_DIR}/cpu_freq_scaling.sh &
32}
33
34case ${CPUFREQ_CHOICE} in
35	1)
36		cpu_stress_test
37		;;
38	2)
39		cpu_freq_scaling_test
40		;;
41	3)
42		cpu_stress_test
43		cpu_freq_scaling_test
44		;;
45	*)
46		echo "not found your input."
47		;;
48esac
49