diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-01-09 15:34:47 +0530 |
---|---|---|
committer | Viresh Kumar <viresh.kumar@linaro.org> | 2015-01-09 15:38:45 +0530 |
commit | 0d525fc060e9ff3b053d48ae970df2fc01d12325 (patch) | |
tree | 88a8aef5d28900bf8e389f0854a1a82c15a2b8d1 | |
parent | 0ffa7e0aade150bb9911b13f7fccda172da24498 (diff) |
protect against multiple inclusion of scripts
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-rwxr-xr-x | cpu.sh | 7 | ||||
-rwxr-xr-x | cpufreq.sh | 7 | ||||
-rwxr-xr-x | governor.sh | 7 | ||||
-rwxr-xr-x | runme.sh | 7 | ||||
-rwxr-xr-x | special-tests.sh | 7 |
5 files changed, 35 insertions, 0 deletions
@@ -2,6 +2,13 @@ # # CPU helpers +# protect against multiple inclusion +if [ $FILE_CPU ]; then + return 0 +else + FILE_CPU=DONE +fi + source cpufreq.sh offline_cpu() @@ -1,5 +1,12 @@ #!/bin/bash +# protect against multiple inclusion +if [ $FILE_CPUFREQ ]; then + return 0 +else + FILE_CPUFREQ=DONE +fi + source cpu.sh # GLOBALS diff --git a/governor.sh b/governor.sh index 1c56426..a82a6d5 100755 --- a/governor.sh +++ b/governor.sh @@ -2,6 +2,13 @@ # # Test governors +# protect against multiple inclusion +if [ $FILE_GOVERNOR ]; then + return 0 +else + FILE_GOVERNOR=DONE +fi + source cpu.sh source cpufreq.sh @@ -3,6 +3,13 @@ # parameters: # - $1: Name of the output file with all the logs, dump.txt by default. +# protect against multiple inclusion +if [ $FILE_RUNME ]; then + return 0 +else + FILE_RUNME=DONE +fi + source cpu.sh source governor.sh source special-tests.sh diff --git a/special-tests.sh b/special-tests.sh index b29f644..292e3d8 100755 --- a/special-tests.sh +++ b/special-tests.sh @@ -4,6 +4,13 @@ # Testcase 1: Reported here: http://marc.info/?l=linux-pm&m=140618592709858&w=2 +# protect against multiple inclusion +if [ $FILE_SPECIAL ]; then + return 0 +else + FILE_SPECIAL=DONE +fi + source cpu.sh source cpufreq.sh source governor.sh |