checktheselitmus.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0+
  3. #
  4. # Invokes checklitmus.sh on its arguments to run the specified litmus
  5. # test and pass judgment on the results.
  6. #
  7. # Usage:
  8. # checktheselitmus.sh -- [ file1.litmus [ file2.litmus ... ] ]
  9. #
  10. # Run this in the directory containing the memory model, specifying the
  11. # pathname of the litmus test to check. The usual parseargs.sh arguments
  12. # can be specified prior to the "--".
  13. #
  14. # This script is intended for use with pathnames that start from the
  15. # tools/memory-model directory. If some of the pathnames instead start at
  16. # the root directory, they all must do so and the "--destdir /" parseargs.sh
  17. # argument must be specified prior to the "--". Alternatively, some other
  18. # "--destdir" argument can be supplied as long as the needed subdirectories
  19. # are populated.
  20. #
  21. # Copyright IBM Corporation, 2018
  22. #
  23. # Author: Paul E. McKenney <paulmck@linux.ibm.com>
  24. . scripts/parseargs.sh
  25. ret=0
  26. for i in "$@"
  27. do
  28. if scripts/checklitmus.sh $i
  29. then
  30. :
  31. else
  32. ret=1
  33. fi
  34. done
  35. if test "$ret" -ne 0
  36. then
  37. echo " ^^^ VERIFICATION MISMATCHES" 1>&2
  38. else
  39. echo All litmus tests verified as was expected. 1>&2
  40. fi
  41. exit $ret