[rtems-schedsim commit] Add initial support for make check
Joel Sherrill
joel at rtems.org
Mon May 26 22:18:28 UTC 2014
Module: rtems-schedsim
Branch: master
Commit: 205f7947a6fb56c994d066462e73dbd7dd99a968
Changeset: http://git.rtems.org/rtems-schedsim/commit/?id=205f7947a6fb56c994d066462e73dbd7dd99a968
Author: Joel Sherrill <joel.sherrill at oarcorp.com>
Date: Mon May 26 14:08:12 2014 -0500
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.
---
schedsim/shell/run_scenarios | 15 ++++++++++-----
schedsim/shell/schedsim_priority/Makefile.am | 7 +++++++
schedsim/shell/schedsim_smppriority/Makefile.am | 12 ++++++++++++
.../schedsim_smppriority_affinity/Makefile.am | 17 +++++++++++++++++
schedsim/shell/schedsim_smpsimple/Makefile.am | 12 ++++++++++++
5 files changed, 58 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"
diff --git a/schedsim/shell/schedsim_priority/Makefile.am b/schedsim/shell/schedsim_priority/Makefile.am
index b33a076..7f2584c 100644
--- a/schedsim/shell/schedsim_priority/Makefile.am
+++ b/schedsim/shell/schedsim_priority/Makefile.am
@@ -39,4 +39,11 @@ schedsim_priority_LDADD += ../../rtems/librtems.a
schedsim_priority_LDADD += ../shared/libschedsim.a
## schedsim_priority_LDADD +=-Wl,--end-group
+check-local:
+ @echo Running tests
+ $(srcdir)/../run_scenarios \
+ -s $(builddir)/schedsim_priority \
+ -S $(srcdir) \
+ -A
+
include $(top_srcdir)/../automake/host.am
diff --git a/schedsim/shell/schedsim_smppriority/Makefile.am b/schedsim/shell/schedsim_smppriority/Makefile.am
index 1da1c98..ddc4648 100644
--- a/schedsim/shell/schedsim_smppriority/Makefile.am
+++ b/schedsim/shell/schedsim_smppriority/Makefile.am
@@ -40,4 +40,16 @@ schedsim_smppriority_LDADD += ../../rtems/librtems.a
schedsim_smppriority_LDADD += ../shared/libschedsim.a
## schedsim_smppriority_LDADD +=-Wl,--end-group
+check-local:
+ @echo Running tests from SMP Simple
+ $(srcdir)/../run_scenarios \
+ -s $(builddir)/schedsim_smppriority \
+ -S $(srcdir)../schedsim_smpsimple \
+ -A
+ @echo Running tests from Priority
+ $(srcdir)/../run_scenarios \
+ -s $(builddir)/schedsim_smppriority \
+ -S $(srcdir)../schedsim_priority \
+ -A
+
include $(top_srcdir)/../automake/host.am
diff --git a/schedsim/shell/schedsim_smppriority_affinity/Makefile.am b/schedsim/shell/schedsim_smppriority_affinity/Makefile.am
index 5e92a45..844a40a 100644
--- a/schedsim/shell/schedsim_smppriority_affinity/Makefile.am
+++ b/schedsim/shell/schedsim_smppriority_affinity/Makefile.am
@@ -40,4 +40,21 @@ schedsim_smppriority_affinity_LDADD += ../../rtems/librtems.a
schedsim_smppriority_affinity_LDADD += ../shared/libschedsim.a
## schedsim_smppriority_affinity_LDADD +=-Wl,--end-group
+check-local:
+ @echo Running tests from SMP Priority Affinity
+ $(srcdir)/../run_scenarios \
+ -s $(builddir)/schedsim_smppriority_affinity \
+ -S $(srcdir) \
+ -A
+ @echo Running tests from SMP Simple Priority
+ $(srcdir)/../run_scenarios \
+ -s $(builddir)/schedsim_smppriority_affinity \
+ -S $(srcdir)/../schedsim_smpsimple \
+ -A
+ @echo Running select tests from Priority
+ $(srcdir)/../run_scenarios \
+ -s $(builddir)/schedsim_smppriority_affinity \
+ -S $(srcdir)/../schedsim_smpsimple \
+ -A
+
include $(top_srcdir)/../automake/host.am
diff --git a/schedsim/shell/schedsim_smpsimple/Makefile.am b/schedsim/shell/schedsim_smpsimple/Makefile.am
index bd73a32..2d534df 100644
--- a/schedsim/shell/schedsim_smpsimple/Makefile.am
+++ b/schedsim/shell/schedsim_smpsimple/Makefile.am
@@ -39,4 +39,16 @@ schedsim_smpsimple_LDADD += ../../rtems/librtems.a
schedsim_smpsimple_LDADD += ../shared/libschedsim.a
## schedsim_smpsimple_LDADD +=-Wl,--end-group
+check-local:
+ @echo Running tests from SMP Simple Priority
+ $(srcdir)/../run_scenarios \
+ -s $(builddir)/schedsim_smpsimple \
+ -S $(srcdir) \
+ -A
+ @echo Running tests from Priority
+ $(srcdir)/../run_scenarios \
+ -s $(builddir)/schedsim_smpsimple \
+ -S $(srcdir)../schedsim_priority \
+ -A
+
include $(top_srcdir)/../automake/host.am
More information about the vc
mailing list