reg_test_template 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. #! /bin/sh
  2. # Template for the test script specified for REG_TEST.
  3. # Run the test case for a regression search. The argument is the date
  4. # of the sources. The return value is 1 if the binary search should
  5. # continue with later dates, 0 if it should continue with earlier
  6. # dates.
  7. DATE="${1}"
  8. # Specify the PR number and the directory where the test should be run.
  9. PR=xxxx
  10. DIR=xxxx
  11. LOG_DATE="`echo ${DATE} | sed 's/[-: ]/_/g'`"
  12. LOG="${PR}.${LOG_DATE}.out"
  13. echo "`date` running test for PR ${PR}"
  14. cd ${DIR}
  15. # Compile the test case with whatever options are needed to trigger the
  16. # error.
  17. <compiler_to_run> <options> ${PR}.<x> > ${LOG} 2>&1
  18. # Some tests will require additional commands to determine whether the
  19. # test passed or failed, such as grepping compiler output for a
  20. # particular message, or running the test and possibly comparing its
  21. # output with the expected output.
  22. xxxxx
  23. # The return value depends on whether the last command is expected to be
  24. # zero or nonzero for a passing test, and whether we're looking for a
  25. # regression or for the patch that fixed the bug.
  26. # Return 1 to continue the search with later dates, 0 for earlier dates.
  27. test $? -eq 0 && exit 1
  28. exit 0