run-ptest 746 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/sh
  2. # ptest script for glibc - to run time related tests to
  3. # facilitate Y2038 validation
  4. # Run with 'ptest-runner glibc-tests'
  5. output() {
  6. retcode=$?
  7. if [ $retcode -eq 0 ]
  8. then echo "PASS: $i"
  9. elif [ $retcode -eq 77 ]
  10. then echo "SKIP: $i"
  11. else echo "FAIL: $i"
  12. fi
  13. }
  14. # Allow altering time on the target
  15. export GLIBC_TEST_ALLOW_TIME_SETTING="1"
  16. tst_time64=$(ls -r ${PWD}/tests/glibc-ptest/*-time64)
  17. # Remove '-time64' suffix - those tests are also time
  18. # related
  19. tst_time_tmp=$(sed -e "s/-time64$//" <<< ${tst_time64})
  20. # Run tests supporting only 32 bit time
  21. for i in ${tst_time_tmp}
  22. do
  23. $i >/dev/null 2>&1
  24. output
  25. done
  26. # Run tests supporting only 64 bit time
  27. for i in ${tst_time64}
  28. do
  29. $i >/dev/null 2>&1
  30. output
  31. done