summaryrefslogtreecommitdiffstats
path: root/schedsim/shell/run_scenarios
diff options
context:
space:
mode:
Diffstat (limited to 'schedsim/shell/run_scenarios')
-rwxr-xr-xschedsim/shell/run_scenarios12
1 files changed, 12 insertions, 0 deletions
diff --git a/schedsim/shell/run_scenarios b/schedsim/shell/run_scenarios
index 09777f3..0212941 100755
--- a/schedsim/shell/run_scenarios
+++ b/schedsim/shell/run_scenarios
@@ -3,6 +3,12 @@
# $Id$
#
+fatal()
+{
+ echo "$*"
+ exit 1
+}
+
toggle()
{
case $1 in
@@ -50,8 +56,12 @@ done
if [ "X${schedsim_dir}" != "X" ] ; then
test -d ${schedsim_dir} || fatal ${schedsim_dir} is not readable
schedsim_dir=${schedsim_dir}/
+else
+ fatal "schedsim binary directory must be specified with -d option"
fi
+test -d scenarios || fatal scenarios directory is not present
+
if [ ${do_all} = "yes" ]; then
SCENARIOS="scenarios/*.scen"
else
@@ -66,6 +76,8 @@ if [ ${do_four} = "yes" ]; then
SCENARIOS="${SCENARIOS} scenarios/cpus4*.scen"
fi
+test "X${SCENARIOS}" = "X" && fatal "No scenarios specified"
+
for scenario in `ls -1 ${SCENARIOS}`
do
base=`echo ${scenario} | sed -s 's/\.scen$//'`