You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.6 KiB

  1. #!/usr/bin/env bash
  2. function usage() {
  3. echo "run nightly mysql and fractal tree regressions"
  4. echo "uses gearman to schedule jobs onto test machines"
  5. }
  6. # generate a script that makes a mysql release and run tests on it
  7. function make_and_test_mysql() {
  8. echo $(date) $* >>$nightlytrace 2>&1
  9. echo "bash -x \$HOME/github/tokudb-engine/scripts/tokutek.make.mysql.bash $* >>$mysqltrace 2>&1; \
  10. buildexitcode=\$?; \
  11. echo \$(date) \$HOME/github/tokudb-engine/scripts/tokutek.make.mysql.bash -$* \$buildexitcode >>$mysqltrace; \
  12. if [ \$buildexitcode -eq 0 ] ; then \$HOME/bin/test.mysql.bash $* >>/tmp/mysql.test.trace 2>&1; fi" \
  13. | $gearmandir/bin/gearman -b -f mysql-build-$system-$arch -h $gearmandhost -p 4730 >>$nightlytrace 2>&1
  14. }
  15. # make a mysql release
  16. function make_mysql() {
  17. echo $(date) $* >>$nightlytrace 2>&1
  18. echo "\$HOME/github/tokudb-engine/scripts/tokutek.make.mysql.bash $* >>$mysqltrace 2>&1" | $gearmandir/bin/gearman -b -f mysql-build-$system-$arch -h $gearmandhost -p 4730 >>$nightlytrace 2>&1
  19. }
  20. # setup the PATH since cron gives us a minimal PATH
  21. PATH=$HOME/bin:$HOME/usr/local/bin:/usr/local/bin:$PATH
  22. source /etc/profile
  23. github_token=
  24. gearmandhost=localhost
  25. gearmandir=/usr/local/gearmand-1.1.6
  26. system=$(uname -s | tr '[:upper:]' '[:lower:]')
  27. arch=$(uname -m | tr '[:upper:]' '[:lower:]')
  28. now_ts=$(date +%s)
  29. cc=gcc
  30. cxx=g++
  31. while [ $# -gt 0 ] ; do
  32. arg=$1; shift
  33. if [[ $arg =~ --(.*)=(.*) ]] ; then
  34. eval ${BASH_REMATCH[1]}=${BASH_REMATCH[2]}
  35. else
  36. usage; exit 1;
  37. fi
  38. done
  39. nightlytrace=/tmp/$(whoami).nightly.trace
  40. mysqltrace=/tmp/$(whoami).mysql.build.trace.$now_ts
  41. make_and_test_mysql --mysqlbuild=mysql-5.6.16-tokudb-${now_ts}-debug-e-${system}-${arch} --cc=$cc --cxx=$cxx --github_token=$github_token
  42. make_and_test_mysql --mysqlbuild=mysql-5.6.16-tokudb-${now_ts}-e-${system}-${arch} --cc=$cc --cxx=$cxx --github_token=$github_token --tests=run.mysql.tests.bash:run.sql.bench.bash
  43. make_and_test_mysql --mysqlbuild=mysql-5.5.36-tokudb-${now_ts}-debug-e-${system}-${arch} --cc=$cc --cxx=$cxx --github_token=$github_token
  44. make_and_test_mysql --mysqlbuild=mysql-5.5.36-tokudb-${now_ts}-e-${system}-${arch} --cc=$cc --cxx=$cxx --github_token=$github_token --tests=run.mysql.tests.bash:run.sql.bench.bash
  45. make_and_test_mysql --mysqlbuild=mariadb-5.5.35-tokudb-${now_ts}-debug-e-${system}-${arch} --cc=$cc --cxx=$cxx --github_token=$github_token
  46. make_and_test_mysql --mysqlbuild=mariadb-5.5.35-tokudb-${now_ts}-e-${system}-${arch} --cc=$cc --cxx=$cxx --github_token=$github_token --tests=run.mysql.tests.bash:run.sql.bench.bash
  47. exit 0