testme.sh 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/bin/bash
  2. if [ $# -lt 3 ]
  3. then
  4. echo "usage is: ${0##*/} <which makefile and other make options> <additional defines> <path to math provider>"
  5. echo "e.g. \"${0##*/} \"makefile -j3\" \"-DUSE_LTM -DLTM_DESC -I/path/to/libtommath\" /path/to/libtommath/libtommath.a\""
  6. exit -1
  7. fi
  8. # date
  9. echo "date="`date`
  10. # output version
  11. version=$(git describe --tags --always --dirty 2>/dev/null)
  12. if [ ! -e ".git" ] || [ -z $version ]
  13. then
  14. version=$(grep "^VERSION=" makefile | sed "s/.*=//")
  15. fi
  16. echo "Testing version:" $version
  17. #grep "VERSION=" makefile | perl -e "@a = split('=', <>); print @a[1];"`
  18. # get uname
  19. echo "uname="`uname -a`
  20. # get gcc name
  21. echo "gcc="`gcc -dumpversion`
  22. echo
  23. # stock build
  24. bash run.sh "STOCK" " " "$1" "$2" "$3" || exit 1
  25. # SMALL code
  26. bash run.sh "SMALL" "-DLTC_SMALL_CODE" "$1" "$2" "$3" || exit 1
  27. # NOTABLES
  28. bash run.sh "NOTABLES" "-DLTC_NO_TABLES" "$1" "$2" "$3" || exit 1
  29. # SMALL+NOTABLES
  30. bash run.sh "SMALL+NOTABLES" "-DLTC_SMALL_CODE -DLTC_NO_TABLES" "$1" "$2" "$3" || exit 1
  31. # CLEANSTACK
  32. bash run.sh "CLEANSTACK" "-DLTC_CLEAN_STACK" "$1" "$2" "$3" || exit 1
  33. # CLEANSTACK + SMALL
  34. bash run.sh "CLEANSTACK+SMALL" "-DLTC_SMALL_CODE -DLTC_CLEAN_STACK" "$1" "$2" "$3" || exit 1
  35. # CLEANSTACK + NOTABLES
  36. bash run.sh "CLEANSTACK+NOTABLES" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK" "$1" "$2" "$3" || exit 1
  37. # CLEANSTACK + NOTABLES + SMALL
  38. bash run.sh "CLEANSTACK+NOTABLES+SMALL" "-DLTC_NO_TABLES -DLTC_CLEAN_STACK -DLTC_SMALL_CODE" "$1" "$2" "$3" || exit 1
  39. # NO_FAST
  40. bash run.sh "NO_FAST" "-DLTC_NO_FAST" "$1" "$2" "$3" || exit 1
  41. # NO_FAST + NOTABLES
  42. bash run.sh "NO_FAST+NOTABLES" "-DLTC_NO_FAST -DLTC_NO_TABLES" "$1" "$2" "$3" || exit 1
  43. # NO_ASM
  44. bash run.sh "NO_ASM" "-DLTC_NO_ASM" "$1" "$2" "$3" || exit 1
  45. # test build with no testing
  46. bash testbuild.sh "NOTEST" "-DLTC_NO_TEST" "$1" "$2" "$3" || exit 1
  47. # test build with no file routines
  48. bash testbuild.sh "NOFILE" "-DLTC_NO_FILE" "$1" "$2" "$3" || exit 1
  49. # $Source$
  50. # $Revision$
  51. # $Date$