summaryrefslogtreecommitdiffstats
path: root/schedsim/shell/run_scenarios
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2014-05-26 14:08:12 -0500
committerJoel Sherrill <joel.sherrill@oarcorp.com>2014-05-26 14:08:12 -0500
commit205f7947a6fb56c994d066462e73dbd7dd99a968 (patch)
tree7071678c43afc1efdd3fd4ca6b9b2849d8c1bc32 /schedsim/shell/run_scenarios
parentMisc so more scenarios run (diff)
downloadrtems-schedsim-205f7947a6fb56c994d066462e73dbd7dd99a968.tar.bz2
Add initial support for make check
+ Enhance run_scenario to run from build tree. Required specification of both executable and scenario directory + check-local stanzas have first cut at which scenarios to run for each scheduler. TODO: + Verify behavior of each scheduler versus expected output. + Ensure list of scenarios executed is complete and appropriate. For example, SMP schedulers should avoid disable preemption scenarios.
Diffstat (limited to 'schedsim/shell/run_scenarios')
-rwxr-xr-xschedsim/shell/run_scenarios15
1 files changed, 10 insertions, 5 deletions
diff --git a/schedsim/shell/run_scenarios b/schedsim/shell/run_scenarios
index 76f9e69..86f0f8d 100755
--- a/schedsim/shell/run_scenarios
+++ b/schedsim/shell/run_scenarios
@@ -21,6 +21,7 @@ usage()
cat <<EOF
run_scenarios [options]
-s - specify scheduler simulator executable (REQUIRED)
+ -S - specify scenario base direcroty (./scenarios assumed)
-1 - toggle running single CPU scenarios (default=no)
-4 - toggle running four CPU scenarios (default=no)
-A - toggle all scenario flags
@@ -40,13 +41,15 @@ do_all=no
do_one=no
do_four=no
schedsim=
+scenarios_dir=.
-while getopts vs:A14 OPT
+while getopts vs:AS:14 OPT
do
case "$OPT" in
v) verbose=`toggle ${verbose}` ;;
s) schedsim=${OPTARG} ;;
A) do_all=`toggle ${do_all}` ;;
+ S) scenarios_dir=${OPTARG} ;;
1) do_one=`toggle ${do_one}` ;;
4) do_four=`toggle ${do_four}` ;;
*) usage; exit 1;
@@ -59,20 +62,22 @@ else
fatal "schedsim binary must be specified with -s option"
fi
-test -d scenarios || fatal scenarios directory is not present
+scen=${scenarios_dir}/scenarios
+test -d ${scen}|| \
+ fatal ${scen} directory is not present
if [ ${do_all} = "yes" ]; then
- SCENARIOS="scenarios/*.scen"
+ SCENARIOS="${scen}/*.scen"
else
SCENARIOS=
fi
if [ ${do_one} = "yes" ]; then
- SCENARIOS="${SCENARIOS} scenarios/cpus1*.scen"
+ SCENARIOS="${SCENARIOS} ${scen}/cpus1*.scen"
fi
if [ ${do_four} = "yes" ]; then
- SCENARIOS="${SCENARIOS} scenarios/cpus4*.scen"
+ SCENARIOS="${SCENARIOS} ${scen}/cpus4*.scen"
fi
test "X${SCENARIOS}" = "X" && fatal "No scenarios specified"