aboutsummaryrefslogtreecommitdiff
path: root/runme.sh
diff options
context:
space:
mode:
Diffstat (limited to 'runme.sh')
-rwxr-xr-xrunme.sh43
1 files changed, 37 insertions, 6 deletions
diff --git a/runme.sh b/runme.sh
index 0897392..7031052 100755
--- a/runme.sh
+++ b/runme.sh
@@ -11,7 +11,7 @@ OUTFILE=dump
FUNC=basic # do basic tests by default
# Check validity of arguments
-USAGE="Usage: $0 [-h] [-of args] [-h <help>] [-o <output-file-for-dump>] [-f <basic: cpufreq_basic_tests, sp1: governor_race, sp2: simple_lockdep, sp3: hotplug_with_updates>]"
+USAGE="Usage: $0 [-h] [-of args] [-h <help>] [-o <output-file-for-dump>] [-d <driver's module name: only with -f=modtest>] [-g <governor's module name: only with -f=modtest>] [-f <basic: cpufreq_basic_tests, sp1: governor_race, sp2: simple_lockdep, sp3: hotplug_with_updates>, mod_test: driver as module]"
# Parse arguments
parse_arguments()
@@ -32,6 +32,14 @@ parse_arguments()
OUTFILE=$OPTARG
;;
+ d) # --driver-mod-name (Name of the driver module)
+ DRIVER_MOD=$OPTARG
+ ;;
+
+ g) # --governor-mod-name (Name of the governor module)
+ GOVERNOR_MOD=$OPTARG
+ ;;
+
\?) # getopts issues an error message
echo "$USAGE "
exit 1
@@ -41,14 +49,27 @@ parse_arguments()
}
# Run isolation test for $FUNC
-run_func()
+__run_func()
{
- # clear dumps first, we will append it later
- clear_dumps
-
case "$FUNC" in
"basic")
- call_routine cpufreq_basic_tests $OUTFILE
+ cpufreq_basic_tests
+ ;;
+
+ "modtest")
+ # Do we have modules in place?
+ if [ ! $DRIVER_MOD -a ! $GOVERNOR_MOD ]; then
+ echo "No driver or governor module passed with -d or -g"
+ return;
+ fi
+
+ if [ $DRIVER_MOD -a $GOVERNOR_MOD ]; then
+ module_test $DRIVER_MOD $GOVERNOR_MOD
+ elif [ $DRIVER_MOD ]; then
+ module_driver_test $DRIVER_MOD
+ elif [ $GOVERNOR_MOD ]; then
+ module_governor_test $GOVERNOR_MOD
+ fi
;;
"sp1")
@@ -69,6 +90,16 @@ run_func()
esac
}
+# Takes dumps as well
+run_func()
+{
+ # clear dumps first, we will append it later
+ clear_dumps
+
+ __run_func >> $OUTFILE
+ dmesg_dumps $OUTFILE
+}
+
# Parse isol arguments
parse_arguments $@