Changeset d36a128 in rtems-schedsim


Ignore:
Timestamp:
May 26, 2014, 10:24:17 PM (5 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
master
Children:
01cb6c9
Parents:
205f794
Message:

make check now works and reports pass/fail

Location:
schedsim/shell
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • schedsim/shell/run_scenarios

    r205f794 rd36a128  
    5757done
    5858
     59shiftcount=`expr $OPTIND - 1`
     60shift $shiftcount
     61
     62args=$*
     63
    5964if [ "X${schedsim}" != "X" ] ; then
    6065  type ${schedsim} >/dev/null 2>&1 || fatal ${schedsim} not found
     
    7075  SCENARIOS="${scen}/*.scen"
    7176else
    72   SCENARIOS=
     77  for i in $*
     78  do
     79    SCENARIOS="${SCENARIOS} ${scen}/${i}"
     80  done
    7381fi
    7482
     
    8391test "X${SCENARIOS}" = "X" && fatal "No scenarios specified"
    8492
    85 for scenario in `ls -1 ${SCENARIOS}`
     93for scenario in ${SCENARIOS}
     94do
     95  test -r ${scenario} || fatal "Scenario ${scenario} not found!"
     96done
     97
     98scenarios=0
     99passed=0
     100failed=0
     101for scenario in ${SCENARIOS}
    86102do
    87103  base=`echo ${scenario} | sed -s 's/\.scen$//'`
     
    89105  output=${base}.output
    90106  vecho Running ${scenario}
     107  run=`expr ${run} + 1`
    91108  ${schedsim} $scenario  >${output}
    92   if [ -r ${expected} ] ; then
     109  if [ $? -ne 0 ] ; then
     110    failed=`expr ${failed} + 1`
     111    echo "FAIL - ${scenario}"
     112  elif [ -r ${expected} ] ; then
    93113    diff ${output} ${expected} >/dev/null
    94114    if [ $? -ne 0 ] ; then
     115      failed=`expr ${failed} + 1`
    95116      echo "FAIL - ${scenario}"
    96117      echo "    diff ${output} ${expected} "
    97118    else
     119      passed=`expr ${passed} + 1`
    98120      echo "PASS - ${scenario}"
    99121    fi
    100122  else
    101       echo "UNKNOWN - ${scenario}"
    102       echo "    cp ${output} ${expected} "
     123    echo "UNKNOWN - ${scenario}"
    103124  fi
    104125done
    105126
     127echo "=== Test report for `basename ${schedsim}`"
     128echo "Run:    " ${run}
     129echo "Passed: " ${passed}
     130echo "Failed: " ${failed}
    106131
     132exit 0
  • schedsim/shell/schedsim_priority/Makefile.am

    r205f794 rd36a128  
    4141
    4242check-local:
    43         @echo Running tests
     43        @echo Running tests from Uniprocessor Deterministic Priority
    4444        $(srcdir)/../run_scenarios \
    4545            -s $(builddir)/schedsim_priority \
  • schedsim/shell/schedsim_smppriority/Makefile.am

    r205f794 rd36a128  
    4141## schedsim_smppriority_LDADD +=-Wl,--end-group
    4242
     43## Skip schedsim_priority/.../script0[13] since they requires task mode
    4344check-local:
    4445        @echo Running tests from SMP Simple
    4546        $(srcdir)/../run_scenarios \
    4647            -s $(builddir)/schedsim_smppriority \
    47             -S $(srcdir)../schedsim_smpsimple \
     48            -S $(srcdir)/../schedsim_smpsimple \
    4849            -A
    4950        @echo Running tests from Priority
    5051        $(srcdir)/../run_scenarios \
    5152            -s $(builddir)/schedsim_smppriority \
    52             -S $(srcdir)../schedsim_priority \
    53             -A
     53            -S $(srcdir)/../schedsim_priority \
     54            script02.scen script04.scen script05.scen script06.scen
    5455
    5556include $(top_srcdir)/../automake/host.am
  • schedsim/shell/schedsim_smppriority_affinity/Makefile.am

    r205f794 rd36a128  
    5252            -S $(srcdir)/../schedsim_smpsimple \
    5353            -A
    54         @echo Running select tests from Priority
     54        @echo Running tests from Uniprocessor Deterministic Priority
    5555        $(srcdir)/../run_scenarios \
    5656            -s $(builddir)/schedsim_smppriority_affinity \
    57             -S $(srcdir)/../schedsim_smpsimple \
    58             -A
     57            -S $(srcdir)/../schedsim_priority \
     58            script02.scen script04.scen script05.scen script06.scen
     59
    5960
    6061include $(top_srcdir)/../automake/host.am
  • schedsim/shell/schedsim_smpsimple/Makefile.am

    r205f794 rd36a128  
    4040## schedsim_smpsimple_LDADD +=-Wl,--end-group
    4141
     42## Skip schedsim_priority/.../script0[13] since they requires task mode
    4243check-local:
    4344        @echo Running tests from SMP Simple Priority
     
    4647            -S $(srcdir) \
    4748            -A
    48         @echo Running tests from Priority
     49        @echo Running tests from Uniprocessor Deterministic Priority
    4950        $(srcdir)/../run_scenarios \
    5051            -s $(builddir)/schedsim_smpsimple \
    51             -S $(srcdir)../schedsim_priority \
    52             -A
     52            -S $(srcdir)/../schedsim_priority \
     53            script02.scen script04.scen script05.scen script06.scen
    5354
    5455include $(top_srcdir)/../automake/host.am
Note: See TracChangeset for help on using the changeset viewer.