.travis.sh 935 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. # test aggressive optimizations
  3. export CFLAGS="-O3 -march=native"
  4. autoreconf -if
  5. # Build unit test
  6. build_test() {
  7. make clean
  8. echo ">>> Testing with \"$@\""
  9. # make sure we test paralled build as they tend to fail when single works
  10. ./configure $@ && make -j5 || {
  11. echo "!!! test with \"@\" configure options failed"
  12. exit 1
  13. }
  14. }
  15. # Test all possible package-specific configure options.
  16. # Do not test empty cases save as no options at all.
  17. build_test ${arg[@]}
  18. for a0 in "--enable-cluster" "--disable-cluster"; do
  19. arg[0]="$a0"
  20. for a1 in "--enable-debug" "--disable-debug"; do
  21. arg[1]="$a1"
  22. for a2 in "--enable-paranoid=0" "--enable-paranoid=1" "--enable-paranoid=2" ; do
  23. arg[2]="$a2"
  24. for a3 in "--with-capabilities" "--without-capabilities"; do
  25. arg[3]="$a3"
  26. for a4 in "--with-mhash" "--without-mhash"; do
  27. arg[4]="$a4"
  28. build_test ${arg[@]}
  29. done
  30. done
  31. done
  32. done
  33. done