job-1-check.sh 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. #!/bin/sh
  2. # StarPU --- Runtime system for heterogeneous multicore architectures.
  3. #
  4. # Copyright (C) 2013-2018 CNRS
  5. #
  6. # StarPU is free software; you can redistribute it and/or modify
  7. # it under the terms of the GNU Lesser General Public License as published by
  8. # the Free Software Foundation; either version 2.1 of the License, or (at
  9. # your option) any later version.
  10. #
  11. # StarPU is distributed in the hope that it will be useful, but
  12. # WITHOUT ANY WARRANTY; without even the implied warranty of
  13. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  14. #
  15. # See the GNU Lesser General Public License in COPYING.LGPL for more details.
  16. #
  17. set -e
  18. set -x
  19. export PKG_CONFIG_PATH=/home/ci/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
  20. export LD_LIBRARY_PATH=/home/ci/usr/local/lib:$LD_LIBRARY_PATH
  21. tarball=$(ls -tr starpu-*.tar.gz | tail -1)
  22. if test -z "$tarball"
  23. then
  24. echo Error. No tar.gz file
  25. ls
  26. pwd
  27. exit 1
  28. fi
  29. basename=$(basename $tarball .tar.gz)
  30. export STARPU_HOME=$PWD/$basename/home
  31. mkdir -p $basename
  32. cd $basename
  33. env > $PWD/env
  34. test -d $basename && chmod -R u+rwX $basename && rm -rf $basename
  35. tar xfz ../$tarball
  36. cd $basename
  37. mkdir build
  38. cd build
  39. STARPU_CONFIGURE_OPTIONS=""
  40. suname=$(uname)
  41. if test "$suname" == "Darwin"
  42. then
  43. STARPU_CONFIGURE_OPTIONS="--without-hwloc"
  44. fi
  45. if test "$suname" == "OpenBSD"
  46. then
  47. STARPU_CONFIGURE_OPTIONS="--without-hwloc --disable-mlr"
  48. fi
  49. if test "$suname" == "FreeBSD"
  50. then
  51. STARPU_CONFIGURE_OPTIONS="--disable-fortran"
  52. fi
  53. export CC=gcc
  54. CONFIGURE_OPTIONS="--enable-debug --enable-verbose --enable-mpi-check --disable-build-doc"
  55. day=$(date +%u)
  56. if test $day -le 5
  57. then
  58. CONFIGURE_CHECK="--enable-quick-check"
  59. else
  60. CONFIGURE_CHECK="--enable-long-check"
  61. fi
  62. ../configure $CONFIGURE_OPTIONS $CONFIGURE_CHECK $STARPU_CONFIGURE_OPTIONS
  63. make
  64. #make check
  65. (make -k check || true) > ../check_$$ 2>&1
  66. cat ../check_$$
  67. make showcheck
  68. grep "^FAIL:" ../check_$$ || true
  69. make clean
  70. grep "^FAIL:" ../check_$$ || true
  71. echo "Running on $(uname -a)"
  72. exit $(grep "^FAIL:" ../check_$$ | wc -l)