Browse Source

Merge pull request #1786 from TechEmpower/travis-fixes-work

Trying to fix Travis
Mike Smith 9 years ago
parent
commit
4d7dbc98e2
100 changed files with 273 additions and 249 deletions
  1. 18 11
      .travis.yml
  2. 31 31
      config/benchmark_profile
  3. 4 0
      config/travis_mysql_setup.sh
  4. 151 0
      config/travis_setup.sh
  5. 0 0
      frameworks/C++/ulib/README.md
  6. 0 0
      frameworks/C++/ulib/benchmark_config.json
  7. 0 0
      frameworks/C++/ulib/setup_json.sh
  8. 0 0
      frameworks/C++/ulib/setup_mysql.sh
  9. 0 0
      frameworks/C++/ulib/setup_plaintext.sh
  10. 0 0
      frameworks/C++/ulib/setup_postgres.sh
  11. 0 0
      frameworks/C++/ulib/setup_redis.sh
  12. 0 0
      frameworks/C++/ulib/setup_sqlite.sh
  13. 0 0
      frameworks/C++/ulib/source_code
  14. 0 0
      frameworks/C++/ulib/src/db.usp
  15. 0 0
      frameworks/C++/ulib/src/fortune.h
  16. 0 0
      frameworks/C++/ulib/src/fortune.usp
  17. 0 0
      frameworks/C++/ulib/src/json.usp
  18. 0 0
      frameworks/C++/ulib/src/plaintext.usp
  19. 0 0
      frameworks/C++/ulib/src/query.usp
  20. 0 0
      frameworks/C++/ulib/src/rdb.usp
  21. 0 0
      frameworks/C++/ulib/src/rfortune.usp
  22. 0 0
      frameworks/C++/ulib/src/rquery.usp
  23. 0 0
      frameworks/C++/ulib/src/rupdate.usp
  24. 0 0
      frameworks/C++/ulib/src/update.usp
  25. 0 0
      frameworks/C++/ulib/src/world.h
  26. 2 3
      frameworks/Java/gemini/start_postgres.sh
  27. 0 0
      frameworks/PHP/yii2/.gitignore
  28. 0 0
      frameworks/PHP/yii2/README.md
  29. 0 0
      frameworks/PHP/yii2/app/controllers/SiteController.php
  30. 0 0
      frameworks/PHP/yii2/app/index.php
  31. 0 0
      frameworks/PHP/yii2/app/runtime/keys.json
  32. 0 0
      frameworks/PHP/yii2/benchmark_config.json
  33. 0 0
      frameworks/PHP/yii2/composer.json
  34. 0 0
      frameworks/PHP/yii2/composer.lock
  35. 0 0
      frameworks/PHP/yii2/deploy/config.hdf
  36. 0 0
      frameworks/PHP/yii2/deploy/nginx.conf
  37. 0 0
      frameworks/PHP/yii2/hhvm.pid
  38. 0 0
      frameworks/PHP/yii2/setup.sh
  39. 0 0
      frameworks/PHP/yii2/setup_hhvm.sh
  40. 0 0
      frameworks/Python/asyncio/README.md
  41. 0 0
      frameworks/Python/asyncio/aiohttp.web/.gitignore
  42. 0 0
      frameworks/Python/asyncio/aiohttp.web/LICENSE
  43. 0 0
      frameworks/Python/asyncio/aiohttp.web/README.rst
  44. 0 0
      frameworks/Python/asyncio/aiohttp.web/etc/default/hello
  45. 0 0
      frameworks/Python/asyncio/aiohttp.web/etc/hello/api_hour/gunicorn_conf.py
  46. 0 0
      frameworks/Python/asyncio/aiohttp.web/etc/hello/api_hour/logging.ini
  47. 0 0
      frameworks/Python/asyncio/aiohttp.web/etc/hello/main/main.yaml
  48. 0 0
      frameworks/Python/asyncio/aiohttp.web/etc/init.d/hello
  49. 0 0
      frameworks/Python/asyncio/aiohttp.web/etc/logrotate.d/hello
  50. 0 0
      frameworks/Python/asyncio/aiohttp.web/etc/monit/conf.d/hello
  51. 0 0
      frameworks/Python/asyncio/aiohttp.web/etc/rsyslog.conf
  52. 0 0
      frameworks/Python/asyncio/aiohttp.web/hello/__init__.py
  53. 0 0
      frameworks/Python/asyncio/aiohttp.web/hello/endpoints/__init__.py
  54. 0 0
      frameworks/Python/asyncio/aiohttp.web/hello/endpoints/world.py
  55. 0 0
      frameworks/Python/asyncio/aiohttp.web/hello/services/__init__.py
  56. 0 0
      frameworks/Python/asyncio/aiohttp.web/hello/services/redis.py
  57. 0 0
      frameworks/Python/asyncio/aiohttp.web/hello/services/world.py
  58. 0 0
      frameworks/Python/asyncio/aiohttp.web/hello/templates/fortunes.html.j2
  59. 0 0
      frameworks/Python/asyncio/aiohttp.web/hello/utils/__init__.py
  60. 0 0
      frameworks/Python/asyncio/aiohttp.web/setup.sh
  61. 0 0
      frameworks/Python/asyncio/aiohttp.web/source_code
  62. 0 0
      frameworks/Python/asyncio/benchmark_config.json
  63. 0 0
      frameworks/Python/asyncio/requirements.txt
  64. 0 0
      frameworks/Python/asyncio/yocto_http/.gitignore
  65. 0 0
      frameworks/Python/asyncio/yocto_http/LICENSE
  66. 0 0
      frameworks/Python/asyncio/yocto_http/README.rst
  67. 0 0
      frameworks/Python/asyncio/yocto_http/etc/default/hello
  68. 0 0
      frameworks/Python/asyncio/yocto_http/etc/hello/api_hour/gunicorn_conf.py
  69. 0 0
      frameworks/Python/asyncio/yocto_http/etc/hello/api_hour/logging.ini
  70. 0 0
      frameworks/Python/asyncio/yocto_http/etc/hello/main/main.yaml
  71. 0 0
      frameworks/Python/asyncio/yocto_http/etc/init.d/hello
  72. 0 0
      frameworks/Python/asyncio/yocto_http/etc/logrotate.d/hello
  73. 0 0
      frameworks/Python/asyncio/yocto_http/etc/monit/conf.d/hello
  74. 0 0
      frameworks/Python/asyncio/yocto_http/etc/rsyslog.conf
  75. 0 0
      frameworks/Python/asyncio/yocto_http/hello/__init__.py
  76. 0 0
      frameworks/Python/asyncio/yocto_http/hello/endpoints/__init__.py
  77. 0 0
      frameworks/Python/asyncio/yocto_http/hello/endpoints/world.py
  78. 0 0
      frameworks/Python/asyncio/yocto_http/hello/servers/__init__.py
  79. 0 0
      frameworks/Python/asyncio/yocto_http/hello/servers/yocto_http.py
  80. 0 0
      frameworks/Python/asyncio/yocto_http/hello/services/__init__.py
  81. 0 0
      frameworks/Python/asyncio/yocto_http/hello/services/redis.py
  82. 0 0
      frameworks/Python/asyncio/yocto_http/hello/services/world.py
  83. 0 0
      frameworks/Python/asyncio/yocto_http/hello/templates/fortunes.html.j2
  84. 0 0
      frameworks/Python/asyncio/yocto_http/hello/utils/__init__.py
  85. 0 0
      frameworks/Python/asyncio/yocto_http/hello/utils/yocto_http/__init__.py
  86. 0 0
      frameworks/Python/asyncio/yocto_http/hello/utils/yocto_http/application.py
  87. 0 0
      frameworks/Python/asyncio/yocto_http/hello/utils/yocto_http/request.py
  88. 0 0
      frameworks/Python/asyncio/yocto_http/hello/utils/yocto_http/utils.py
  89. 0 0
      frameworks/Python/asyncio/yocto_http/setup.sh
  90. 0 0
      frameworks/Python/asyncio/yocto_http/source_code
  91. 4 0
      toolset/benchmark/framework_test.py
  92. 1 1
      toolset/benchmark/test_types/db_type.py
  93. 1 1
      toolset/benchmark/test_types/fortune_type.py
  94. 8 13
      toolset/benchmark/test_types/framework_test_type.py
  95. 1 1
      toolset/benchmark/test_types/json_type.py
  96. 1 1
      toolset/benchmark/test_types/plaintext_type.py
  97. 28 21
      toolset/benchmark/test_types/verifications.py
  98. 17 163
      toolset/run-ci.py
  99. 5 2
      toolset/setup/linux/languages/java7.sh
  100. 1 1
      toolset/setup/linux/languages/java8.sh

+ 18 - 11
.travis.yml

@@ -6,14 +6,14 @@ python:
 
 env:
   matrix:
-    # Group tests by directory to logically break up travis-CI build. Otherwise
-    # we end up starting ~200+ different workers. Seems that ~100 is the limit
-    # before their website starts to lag heavily
+    #Group tests by directory to logically break up travis-CI build. Otherwise
+    #we end up starting ~200+ different workers. Seems that ~100 is the limit
+    #before their website starts to lag heavily
     #
-    # Here's the bash if you need to update this. Be sure to maintain the
-    # lines that are currently commented out (these cannot run in Travis)
-    #   cd frameworks
-    #   find . -type d -depth 2 | sed 's|./|    - "TESTDIR=|' | sed 's/$/"/g'
+    #Here's the bash if you need to update this. Be sure to maintain the
+    #lines that are currently commented out (these cannot run in Travis)
+    #  cd frameworks
+    #  find . -type d -depth 2 | sed 's|./|    - "TESTDIR=|' | sed 's/$/"/g'
     #
     #
     - "TESTDIR=C/lwan"
@@ -183,14 +183,21 @@ before_install:
   # but it requires —-allow-external and -—allow-unverified
   - pip install progressbar==2.2
   - pip install requests
+  - echo "127.0.0.1 " `hostname` | sudo tee /etc/hosts
+  - echo "127.0.0.1 localhost" | sudo tee /etc/hosts
 
-install:
-  # Configure Travis-CI build environment for TFB
-  #   e.g. setup databases, users, etc
-  - ./toolset/run-ci.py cisetup "$TESTDIR"
+services:
+  - postgresql
 
 addons:
   postgresql: "9.3"
+  apt:
+    packages:
+      - mysql-server
+
+before_script:
+  - sudo ./config/travis_mysql_setup.sh
+  - mysql -uroot < config/create.sql
 
 script:
   # Pick one test in this directory and verify

+ 31 - 31
config/benchmark_profile

@@ -17,34 +17,34 @@ export TFB_DISTRIB_RELEASE=$DISTRIB_RELEASE
 export TFB_DISTRIB_CODENAME=$DISTRIB_CODENAME
 export TFB_DISTRIB_DESCRIPTION=$DISTRIB_DESCRIPTION
 
-
-export RESIN_HOME=${IROOT}/resin-4.0.41
-export GRAILS_HOME=${IROOT}/grails-2.4.4
-export VERTX_HOME=${IROOT}/vert.x-2.1.1
-export TOMCAT_HOME=${IROOT}/apache-tomcat-7.0.35
-export NODE_HOME=${IROOT}/node-v0.10.8-linux-x64
-export PLAY_HOME=${IROOT}/play-2.2.0
-export PLAY1_HOME=${IROOT}/play-1.2.5
-export MAVEN_HOME=${IROOT}/apache-maven-3.0.5
-export SBT_HOME=${IROOT}/sbt
-export PERL_HOME=${IROOT}/perl-5.18
-export DART_HOME=${IROOT}/dart-sdk
-export RACKET_HOME=${IROOT}/racket-5.3.6
-export NIMROD_HOME=${IROOT}/nimrod
-export NGINX_HOME=/usr/local/nginx
-export ELIXIR_HOME=${IROOT}/elixir-0.13.3
-
-export PATH="$JAVA_HOME/bin:$GRAILS_HOME/bin:$PLAY_HOME:$PLAY1_HOME:$VERTX_HOME/bin:$GOROOT/bin:$NODE_HOME/bin:$HOME/FrameworkBenchmarks/installs/bin:$MAVEN_HOME/bin:$SBT_HOME/bin:$PERL_HOME/bin:$DART_HOME/bin:$RACKET_HOME/bin:$NIMROD_HOME/bin:$NGINX_HOME/sbin:$ELIXIR_HOME/bin:$PATH"
-
-export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'
-
-export TFB_SERVER_HOST='127.0.0.1'
-export TFB_CLIENT_HOST='127.0.0.1'
-export TFB_CLIENT_USER='tfb'
-export TFB_CLIENT_IDENTITY_FILE='/home/tfb/.ssh/id_rsa'
-export TFB_DATABASE_HOST='127.0.0.1'
-
-[ -e ~/.rvm ] && . ~/.rvm/scripts/'rvm'
-export LC_ALL='en_US.UTF-8'
-export NUMCPUS=`grep -c '^processor' /proc/cpuinfo`
-export MAKEFLAGS="-j $NUMCPUS -l $NUMCPUS"
+#
+#export RESIN_HOME=${IROOT}/resin-4.0.41
+#export GRAILS_HOME=${IROOT}/grails-2.4.4
+#export VERTX_HOME=${IROOT}/vert.x-2.1.1
+#export TOMCAT_HOME=${IROOT}/apache-tomcat-7.0.35
+#export NODE_HOME=${IROOT}/node-v0.10.8-linux-x64
+#export PLAY_HOME=${IROOT}/play-2.2.0
+#export PLAY1_HOME=${IROOT}/play-1.2.5
+#export MAVEN_HOME=${IROOT}/apache-maven-3.0.5
+#export SBT_HOME=${IROOT}/sbt
+#export PERL_HOME=${IROOT}/perl-5.18
+#export DART_HOME=${IROOT}/dart-sdk
+#export RACKET_HOME=${IROOT}/racket-5.3.6
+#export NIMROD_HOME=${IROOT}/nimrod
+#export NGINX_HOME=/usr/local/nginx
+#export ELIXIR_HOME=${IROOT}/elixir-0.13.3
+#
+#export PATH="$JAVA_HOME/bin:$GRAILS_HOME/bin:$PLAY_HOME:$PLAY1_HOME:$VERTX_HOME/bin:$GOROOT/bin:$NODE_HOME/bin:$HOME/FrameworkBenchmarks/installs/bin:$MAVEN_HOME/bin:$SBT_HOME/bin:$PERL_HOME/bin:$DART_HOME/bin:$RACKET_HOME/bin:$NIMROD_HOME/bin:$NGINX_HOME/sbin:$ELIXIR_HOME/bin:$PATH"
+#
+#export LD_LIBRARY_PATH='$LD_LIBRARY_PATH:/usr/local/apr/lib'
+#
+#export TFB_SERVER_HOST='127.0.0.1'
+#export TFB_CLIENT_HOST='127.0.0.1'
+#export TFB_CLIENT_USER='tfb'
+#export TFB_CLIENT_IDENTITY_FILE='/home/tfb/.ssh/id_rsa'
+#export TFB_DATABASE_HOST='127.0.0.1'
+#
+#[ -e ~/.rvm ] && . ~/.rvm/scripts/'rvm'
+#export LC_ALL='en_US.UTF-8'
+#export NUMCPUS=`grep -c '^processor' /proc/cpuinfo`
+#export MAKEFLAGS="-j $NUMCPUS -l $NUMCPUS"

+ 4 - 0
config/travis_mysql_setup.sh

@@ -0,0 +1,4 @@
+sed -i 's|\[mysqld\]|\[mysqld\]\
+lower_case_table_names = 1\
+character-set-server=utf8\
+collation-server=utf8_general_ci|g' /etc/mysql/my.cnf

+ 151 - 0
config/travis_setup.sh

@@ -0,0 +1,151 @@
+export DEBIAN_FRONTEND=noninteractive
+
+# Turn on command tracing
+set -x 
+
+# Setup Apt For MongoDB
+#   Due to TechEmpower/FrameworkBenchmarks#989 and travis-ci/travis-ci#2655, 
+#   we put this into a loop
+until timeout 15s sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10; do echo 'Waiting for apt-key' ; done
+echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
+
+# Setup apt for Apache Cassandra
+until timeout 15s sudo apt-key adv --keyserver pgp.mit.edu --recv 4BD736A82B5C1B00; do echo 'Waiting for apt-key' ; done
+sudo apt-add-repository  'deb http://www.apache.org/dist/cassandra/debian 20x main'
+
+# Run installation 
+# DO NOT COPY --force-yes TO ANY NON-TRAVIS-CI SCRIPTS! Seriously, it can cause some 
+# major damage and should only be used inside a VM or Linux Container
+sudo apt-get -q update
+sudo apt-get -q -y --force-yes install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
+  mongodb-org \
+  cassandra \
+  openssh-server \
+  mysql-server
+
+# Run as travis user (who already has passwordless sudo)
+ssh-keygen -f /home/travis/.ssh/id_rsa -N '' -t rsa
+cat /home/travis/.ssh/id_rsa.pub > /home/travis/.ssh/authorized_keys
+chmod 600 /home/travis/.ssh/authorized_keys
+
+# Set up the benchmark.cfg for travis user
+# NOTE: Please don't just copy the example config - it causes unexpected
+#       issues when those example variables change
+echo "[Defaults]"                                       > benchmark.cfg
+echo "client_identity_file=/home/travis/.ssh/id_rsa"   >> benchmark.cfg
+echo "database_identity_file=/home/travis/.ssh/id_rsa" >> benchmark.cfg
+echo "client_host=127.0.0.1"                           >> benchmark.cfg
+echo "database_host=127.0.0.1"                         >> benchmark.cfg
+echo "server_host=127.0.0.1"                           >> benchmark.cfg
+echo "client_user=travis"                              >> benchmark.cfg
+echo "database_user=travis"                            >> benchmark.cfg
+echo "runner_user=testrunner"                          >> benchmark.cfg
+
+# Create the new testrunner user
+sudo useradd testrunner
+# Give him a home dir
+sudo mkdir /home/testrunner
+# Make testrunner the owner of his home dir
+sudo chown testrunner:testrunner /home/testrunner
+# Add the testrunner user to every group that the travis user is in
+sudo sed -i 's|:travis|:travis,testrunner,benchmarkdbuser|g' /etc/group
+# Maybe unneeded - add the travis user to the testrunner group
+sudo sed -i 's|testrunner:x:\(.*\):|testrunner:x:\1:travis|g' /etc/group
+# Need to add testrunner to the sudoers group AND default him to a sudoers
+# because the travis user isn't in the sudo group - he's a sudoer.
+echo "testrunner ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
+# Set the default shell for testrunner to /bin/bash
+sudo sed -i 's|/home/testrunner:/bin/sh|/home/testrunner:/bin/bash|g' /etc/passwd
+
+mkdir installs
+sudo chown testrunner:testrunner installs
+
+# =============Setup Databases===========================
+# NOTE: Do not run `--install database` in travis-ci! 
+#       It changes DB configuration files and will break everything
+# =======================================================
+
+# Setup MySQL
+echo "Populating MySQL database"
+#sudo mysqladmin -u root password secret
+#sudo mv /etc/mysql/my.cnf /etc/mysql/my.cnf.orig
+#sudo mv config/my.cnf /etc/mysql/my.cnf
+sudo sed -i 's|#max_connections        = 100|max_connections        = 500|g' /etc/mysql/my.cnf
+sudo restart mysql
+#mysql -uroot -psecret < config/create.sql
+
+# Setup Postgres
+echo "Removing Postgres 9.1 from Travis-CI"
+sudo apt-get remove -qy postgresql postgresql-9.1 postgresql-client-9.1
+sudo apt-get install -qy postgresql-9.3 postgresql-client-9.3
+
+echo "Populating Postgres database"
+psql --version
+sudo useradd benchmarkdbuser -p benchmarkdbpass
+sudo -u postgres psql template1 < config/create-postgres-database.sql
+sudo -u benchmarkdbuser psql hello_world < config/create-postgres.sql
+sudo sed -i "s|#listen_addresses = 'localhost'|listen_addresses = '*'|g" /etc/postgresql/9.3/main/postgresql.conf
+sudo sed -i 's|max_connections = 255|max_connections = 500|g' /etc/postgresql/9.3/main/postgresql.conf
+sudo service postgresql stop
+sudo service postgresql start 9.3
+
+# Setup Apache Cassandra
+echo "Populating Apache Cassandra database"
+for i in {1..15}; do
+nc -z localhost 9160 && break || sleep 1;
+echo "Waiting for Cassandra ($i/15}"
+done
+nc -z localhost 9160
+if [ $? -eq 0 ]; then
+cat config/cassandra/cleanup-keyspace.cql | sudo cqlsh
+python config/cassandra/db-data-gen.py > config/cassandra/tfb-data.cql
+sudo cqlsh -f config/cassandra/create-keyspace.cql
+sudo cqlsh -f config/cassandra/tfb-data.cql
+else
+>&2 echo "Cassandra did not start, skipping"
+fi
+
+# Setup Elasticsearch
+curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.0.deb
+sudo dpkg -i --force-confnew elasticsearch-1.5.0.deb
+sudo update-rc.d elasticsearch defaults 95 10
+sudo service elasticsearch restart
+
+echo "Populating Elasticsearch database"
+for i in {1..15}; do
+nc -z localhost 9200 && break || sleep 1;
+echo "Waiting for Elasticsearch ($i/15}"
+done
+nc -z localhost 9200
+if [ $? -eq 0 ]; then
+curl localhost:9200
+sh config/elasticsearch/es-create-index.sh
+python config/elasticsearch/es-db-data-gen.py > config/elasticsearch/tfb-data.json
+curl -sS -D - -o /dev/null -XPOST localhost:9200/tfb/world/_bulk --data-binary @config/elasticsearch/tfb-data.json
+echo "Elasticsearch DB populated"
+else
+>&2 echo "Elasticsearch did not start, skipping"
+fi
+
+# Setup MongoDB
+echo "Populating MongoDB database"
+for i in {1..15}; do
+nc -z localhost 27017 && break || sleep 1;
+echo "Waiting for MongoDB ($i/15}"
+done
+nc -z localhost 27017
+if [ $? -eq 0 ]; then
+mongo < config/create.js
+mongod --version
+else
+>&2 echo "MongoDB did not start, skipping"
+fi
+
+# =============Modify Configurations===========================
+# It can be useful to enable debug features for verification 
+# inside Travis-CI
+# =======================================================
+
+sed -i 's|display_errors\] = off|display_errors\] = on|' config/php-fpm.conf
+
+#exit $?

+ 0 - 0
frameworks/C++/ULib/README.md → frameworks/C++/ulib/README.md


+ 0 - 0
frameworks/C++/ULib/benchmark_config.json → frameworks/C++/ulib/benchmark_config.json


+ 0 - 0
frameworks/C++/ULib/setup_json.sh → frameworks/C++/ulib/setup_json.sh


+ 0 - 0
frameworks/C++/ULib/setup_mysql.sh → frameworks/C++/ulib/setup_mysql.sh


+ 0 - 0
frameworks/C++/ULib/setup_plaintext.sh → frameworks/C++/ulib/setup_plaintext.sh


+ 0 - 0
frameworks/C++/ULib/setup_postgres.sh → frameworks/C++/ulib/setup_postgres.sh


+ 0 - 0
frameworks/C++/ULib/setup_redis.sh → frameworks/C++/ulib/setup_redis.sh


+ 0 - 0
frameworks/C++/ULib/setup_sqlite.sh → frameworks/C++/ulib/setup_sqlite.sh


+ 0 - 0
frameworks/C++/ULib/source_code → frameworks/C++/ulib/source_code


+ 0 - 0
frameworks/C++/ULib/src/db.usp → frameworks/C++/ulib/src/db.usp


+ 0 - 0
frameworks/C++/ULib/src/fortune.h → frameworks/C++/ulib/src/fortune.h


+ 0 - 0
frameworks/C++/ULib/src/fortune.usp → frameworks/C++/ulib/src/fortune.usp


+ 0 - 0
frameworks/C++/ULib/src/json.usp → frameworks/C++/ulib/src/json.usp


+ 0 - 0
frameworks/C++/ULib/src/plaintext.usp → frameworks/C++/ulib/src/plaintext.usp


+ 0 - 0
frameworks/C++/ULib/src/query.usp → frameworks/C++/ulib/src/query.usp


+ 0 - 0
frameworks/C++/ULib/src/rdb.usp → frameworks/C++/ulib/src/rdb.usp


+ 0 - 0
frameworks/C++/ULib/src/rfortune.usp → frameworks/C++/ulib/src/rfortune.usp


+ 0 - 0
frameworks/C++/ULib/src/rquery.usp → frameworks/C++/ulib/src/rquery.usp


+ 0 - 0
frameworks/C++/ULib/src/rupdate.usp → frameworks/C++/ulib/src/rupdate.usp


+ 0 - 0
frameworks/C++/ULib/src/update.usp → frameworks/C++/ulib/src/update.usp


+ 0 - 0
frameworks/C++/ULib/src/world.h → frameworks/C++/ulib/src/world.h


+ 2 - 3
frameworks/Java/gemini/start_postgres.sh

@@ -1,7 +1,6 @@
 #!/bin/bash
 
-# load java environment variables
-source $IROOT/java7.installed
+fw_depends java7 resin maven
 
 sed -i 's|db.ConnectString = .*/|db.ConnectString = '"$DBHOST"':5432/|g' Docroot/WEB-INF/GeminiHello.conf
 sed -i 's|root-directory=".*/FrameworkBenchmarks/frameworks/Java/gemini|root-directory="'"$TROOT"'|g' Docroot/WEB-INF/resin.xml
@@ -9,4 +8,4 @@ sed -i 's|db.Driver.Class = .*|db.Driver.Class = org.postgresql.Driver|g' Docroo
 sed -i 's|db.Driver.UrlPrefix = .*|db.Driver.UrlPrefix = jdbc:postgresql://|g' Docroot/WEB-INF/GeminiHello.conf
 mkdir -p Docroot/WEB-INF/classes
 ant compile
-$RESIN_HOME/bin/resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml start
+resinctl -conf $TROOT/Docroot/WEB-INF/resin.xml start

+ 0 - 0
frameworks/PHP/Yii2/.gitignore → frameworks/PHP/yii2/.gitignore


+ 0 - 0
frameworks/PHP/Yii2/README.md → frameworks/PHP/yii2/README.md


+ 0 - 0
frameworks/PHP/Yii2/app/controllers/SiteController.php → frameworks/PHP/yii2/app/controllers/SiteController.php


+ 0 - 0
frameworks/PHP/Yii2/app/index.php → frameworks/PHP/yii2/app/index.php


+ 0 - 0
frameworks/PHP/Yii2/app/runtime/keys.json → frameworks/PHP/yii2/app/runtime/keys.json


+ 0 - 0
frameworks/PHP/Yii2/benchmark_config.json → frameworks/PHP/yii2/benchmark_config.json


+ 0 - 0
frameworks/PHP/Yii2/composer.json → frameworks/PHP/yii2/composer.json


+ 0 - 0
frameworks/PHP/Yii2/composer.lock → frameworks/PHP/yii2/composer.lock


+ 0 - 0
frameworks/PHP/Yii2/deploy/config.hdf → frameworks/PHP/yii2/deploy/config.hdf


+ 0 - 0
frameworks/PHP/Yii2/deploy/nginx.conf → frameworks/PHP/yii2/deploy/nginx.conf


+ 0 - 0
frameworks/PHP/Yii2/hhvm.pid → frameworks/PHP/yii2/hhvm.pid


+ 0 - 0
frameworks/PHP/Yii2/setup.sh → frameworks/PHP/yii2/setup.sh


+ 0 - 0
frameworks/PHP/Yii2/setup_hhvm.sh → frameworks/PHP/yii2/setup_hhvm.sh


+ 0 - 0
frameworks/Python/AsyncIO/README.md → frameworks/Python/asyncio/README.md


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/.gitignore → frameworks/Python/asyncio/aiohttp.web/.gitignore


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/LICENSE → frameworks/Python/asyncio/aiohttp.web/LICENSE


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/README.rst → frameworks/Python/asyncio/aiohttp.web/README.rst


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/etc/default/hello → frameworks/Python/asyncio/aiohttp.web/etc/default/hello


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/etc/hello/api_hour/gunicorn_conf.py → frameworks/Python/asyncio/aiohttp.web/etc/hello/api_hour/gunicorn_conf.py


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/etc/hello/api_hour/logging.ini → frameworks/Python/asyncio/aiohttp.web/etc/hello/api_hour/logging.ini


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/etc/hello/main/main.yaml → frameworks/Python/asyncio/aiohttp.web/etc/hello/main/main.yaml


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/etc/init.d/hello → frameworks/Python/asyncio/aiohttp.web/etc/init.d/hello


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/etc/logrotate.d/hello → frameworks/Python/asyncio/aiohttp.web/etc/logrotate.d/hello


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/etc/monit/conf.d/hello → frameworks/Python/asyncio/aiohttp.web/etc/monit/conf.d/hello


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/etc/rsyslog.conf → frameworks/Python/asyncio/aiohttp.web/etc/rsyslog.conf


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/hello/__init__.py → frameworks/Python/asyncio/aiohttp.web/hello/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/hello/endpoints/__init__.py → frameworks/Python/asyncio/aiohttp.web/hello/endpoints/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/hello/endpoints/world.py → frameworks/Python/asyncio/aiohttp.web/hello/endpoints/world.py


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/hello/services/__init__.py → frameworks/Python/asyncio/aiohttp.web/hello/services/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/hello/services/redis.py → frameworks/Python/asyncio/aiohttp.web/hello/services/redis.py


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/hello/services/world.py → frameworks/Python/asyncio/aiohttp.web/hello/services/world.py


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/hello/templates/fortunes.html.j2 → frameworks/Python/asyncio/aiohttp.web/hello/templates/fortunes.html.j2


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/hello/utils/__init__.py → frameworks/Python/asyncio/aiohttp.web/hello/utils/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/setup.sh → frameworks/Python/asyncio/aiohttp.web/setup.sh


+ 0 - 0
frameworks/Python/AsyncIO/aiohttp.web/source_code → frameworks/Python/asyncio/aiohttp.web/source_code


+ 0 - 0
frameworks/Python/AsyncIO/benchmark_config.json → frameworks/Python/asyncio/benchmark_config.json


+ 0 - 0
frameworks/Python/AsyncIO/requirements.txt → frameworks/Python/asyncio/requirements.txt


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/.gitignore → frameworks/Python/asyncio/yocto_http/.gitignore


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/LICENSE → frameworks/Python/asyncio/yocto_http/LICENSE


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/README.rst → frameworks/Python/asyncio/yocto_http/README.rst


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/etc/default/hello → frameworks/Python/asyncio/yocto_http/etc/default/hello


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/etc/hello/api_hour/gunicorn_conf.py → frameworks/Python/asyncio/yocto_http/etc/hello/api_hour/gunicorn_conf.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/etc/hello/api_hour/logging.ini → frameworks/Python/asyncio/yocto_http/etc/hello/api_hour/logging.ini


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/etc/hello/main/main.yaml → frameworks/Python/asyncio/yocto_http/etc/hello/main/main.yaml


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/etc/init.d/hello → frameworks/Python/asyncio/yocto_http/etc/init.d/hello


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/etc/logrotate.d/hello → frameworks/Python/asyncio/yocto_http/etc/logrotate.d/hello


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/etc/monit/conf.d/hello → frameworks/Python/asyncio/yocto_http/etc/monit/conf.d/hello


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/etc/rsyslog.conf → frameworks/Python/asyncio/yocto_http/etc/rsyslog.conf


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/__init__.py → frameworks/Python/asyncio/yocto_http/hello/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/endpoints/__init__.py → frameworks/Python/asyncio/yocto_http/hello/endpoints/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/endpoints/world.py → frameworks/Python/asyncio/yocto_http/hello/endpoints/world.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/servers/__init__.py → frameworks/Python/asyncio/yocto_http/hello/servers/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/servers/yocto_http.py → frameworks/Python/asyncio/yocto_http/hello/servers/yocto_http.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/services/__init__.py → frameworks/Python/asyncio/yocto_http/hello/services/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/services/redis.py → frameworks/Python/asyncio/yocto_http/hello/services/redis.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/services/world.py → frameworks/Python/asyncio/yocto_http/hello/services/world.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/templates/fortunes.html.j2 → frameworks/Python/asyncio/yocto_http/hello/templates/fortunes.html.j2


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/utils/__init__.py → frameworks/Python/asyncio/yocto_http/hello/utils/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/utils/yocto_http/__init__.py → frameworks/Python/asyncio/yocto_http/hello/utils/yocto_http/__init__.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/utils/yocto_http/application.py → frameworks/Python/asyncio/yocto_http/hello/utils/yocto_http/application.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/utils/yocto_http/request.py → frameworks/Python/asyncio/yocto_http/hello/utils/yocto_http/request.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/hello/utils/yocto_http/utils.py → frameworks/Python/asyncio/yocto_http/hello/utils/yocto_http/utils.py


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/setup.sh → frameworks/Python/asyncio/yocto_http/setup.sh


+ 0 - 0
frameworks/Python/AsyncIO/yocto_http/source_code → frameworks/Python/asyncio/yocto_http/source_code


+ 4 - 0
toolset/benchmark/framework_test.py

@@ -16,6 +16,7 @@ import csv
 import shlex
 import math
 from collections import OrderedDict
+from requests import ConnectionError
 from threading import Thread
 from threading import Event
 
@@ -387,6 +388,9 @@ class FrameworkTest:
       
       try:
         results = test.verify(base_url)
+      except ConnectionError as e:
+        results = [('fail',"Server did not respond to request")]
+        logging.warning("Verifying test %s for %s caused an exception: %s", test_type, self.name, e)
       except Exception as e:
         results = [('fail',"""Caused Exception in TFB
           This almost certainly means your return value is incorrect, 

+ 1 - 1
toolset/benchmark/test_types/db_type.py

@@ -26,7 +26,7 @@ class DBTestType(FrameworkTestType):
         url = base_url + self.db_url
         headers, body = self.request_headers_and_body(url)
 
-        response, problems = basic_body_verification(body)
+        response, problems = basic_body_verification(body, url)
 
         if len(problems) > 0:
             return problems 

+ 1 - 1
toolset/benchmark/test_types/fortune_type.py

@@ -26,7 +26,7 @@ class FortuneTestType(FrameworkTestType):
         url = base_url + self.fortune_url
         headers, body = self.request_headers_and_body(url)
 
-        _, problems = basic_body_verification(body, is_json_check=False)
+        _, problems = basic_body_verification(body, url, is_json_check=False)
 
         if len(problems) > 0:
             return problems

+ 8 - 13
toolset/benchmark/test_types/framework_test_type.py

@@ -86,18 +86,13 @@ class FrameworkTestType:
         headers = {'Accept': self.accept_header}
         r = requests.get(url, timeout=15, headers=headers)
 
-        try:
-            r.raise_for_status()  # Throws on non-200
-            headers = r.headers
-            body = r.content
-            self.out.write(str(headers))
-            self.out.write(body)
-            b = 40
-            print "  Response (trimmed to %d bytes): \"%s\"" % (b, body.strip()[:b])
-            return headers, body
-        except requests.HTTPError as err:
-            self.err.write(err + '\n')
-            return None, None
+        headers = r.headers
+        body = r.content
+        self.out.write(str(headers))
+        self.out.write(body)
+        b = 40
+        print "  Response (trimmed to %d bytes): \"%s\"" % (b, body.strip()[:b])
+        return headers, body
 
     def verify(self, base_url):
         '''
@@ -124,7 +119,7 @@ class FrameworkTestType:
         '''Returns the URL for this test, like '/json'''
         # This is a method because each test type uses a different key
         # for their URL so the base class can't know which arg is the URL
-        raise NotImplementedError("Subclasses must provide verify")
+        raise NotImplementedError("Subclasses must provide get_url")
 
     def copy(self):
         '''

+ 1 - 1
toolset/benchmark/test_types/json_type.py

@@ -31,7 +31,7 @@ class JsonTestType(FrameworkTestType):
         url = base_url + self.json_url
         headers, body = self.request_headers_and_body(url)
 
-        response, problems = basic_body_verification(body)
+        response, problems = basic_body_verification(body, url)
 
         if len(problems) > 0:
             return problems

+ 1 - 1
toolset/benchmark/test_types/plaintext_type.py

@@ -17,7 +17,7 @@ class PlaintextTestType(FrameworkTestType):
         url = base_url + self.plaintext_url
         headers, body = self.request_headers_and_body(url)
 
-        _, problems = basic_body_verification(body, is_json_check=False)
+        _, problems = basic_body_verification(body, url, is_json_check=False)
 
         if len(problems) > 0:
             return problems

+ 28 - 21
toolset/benchmark/test_types/verifications.py

@@ -1,7 +1,7 @@
 import json
 
 
-def basic_body_verification(body, is_json_check=True):
+def basic_body_verification(body, url, is_json_check=True):
     '''
     Takes in a raw (stringy) response body, checks that it is non-empty,
     and that it is valid JSON (i.e. can be deserialized into a dict/list of dicts)
@@ -48,30 +48,37 @@ def verify_headers(headers, url, should_be='json'):
 
     problems = []
 
-    if any(v.lower() not in headers for v in ('Server', 'Date', 'Content-Type')):
+    for v in (v for v in ('Server', 'Date', 'Content-Type') if v.lower() not in headers):
         problems.append(
             ('warn', 'Required response header missing: %s' % v, url))
-    elif all(v.lower() not in headers for v in ('Content-Length', 'Transfer-Encoding')):
+
+    if all(v.lower() not in headers for v in ('Content-Length', 'Transfer-Encoding')):
         problems.append(
             ('warn',
              'Required response size header missing, please include either "Content-Length" or "Transfer-Encoding"',
              url))
-    else:
-        content_type = headers.get('Content-Type', None)
 
-        if content_type.lower() == includes_charset:
-            problems.append(
-                ('warn',
-                 ("Content encoding found \"%s\" where \"%s\" is acceptable.\n"
-                  "Additional response bytes may negatively affect benchmark performance."
-                  % (includes_charset, expected_type)),
-                 url))
-        elif content_type != expected_type:
-            problems.append(
-                ('warn',
-                 'Unexpected content encoding, found \"%s\", expected \"%s\"' % (
-                     content_type, expected_type),
-                 url))
+    content_type = headers.get('Content-Type', None)
+
+    if content_type is None:
+        problems.append(
+            ('warn',
+             'No content encoding found, expected \"%s\"' % (
+                 expected_type),
+             url))
+    elif content_type.lower() == includes_charset:
+        problems.append(
+            ('warn',
+             ("Content encoding found \"%s\" where \"%s\" is acceptable.\n"
+              "Additional response bytes may negatively affect benchmark performance."
+              % (includes_charset, expected_type)),
+             url))
+    elif content_type != expected_type:
+        problems.append(
+            ('warn',
+             'Unexpected content encoding, found \"%s\", expected \"%s\"' % (
+                 content_type, expected_type),
+             url))
     return problems
 
 
@@ -125,12 +132,12 @@ def verify_randomnumber_object(db_object, url, max_infraction='fail'):
     db_object = {k.lower(): v for k, v in db_object.iteritems()}
     required_keys = set(['id', 'randomnumber'])
 
-    if any(v not in db_object for v in required_keys):
+    for v in (v for v in required_keys if v not in db_object):
         problems.append(
             (max_infraction, 'Response object was missing required key: %s' % v, url))
 
     if len(db_object) > len(required_keys):
-        extras = db_object.keys() - required_keys
+        extras = set(db_object.keys()) - required_keys
         problems.append(
             ('warn',
              'An extra key(s) is being included with the db object: %s' % ', '.join(
@@ -177,7 +184,7 @@ def verify_randomnumber_list(expected_len, headers, body, url, max_infraction='f
     [{ "id": 2354, "randomNumber": 8952 }, { "id": 4421, "randomNumber": 32 }, ... ]
     '''
     
-    response, problems = basic_body_verification(body)
+    response, problems = basic_body_verification(body, url)
 
     if len(problems) > 0:
         return problems

+ 17 - 163
toolset/run-ci.py

@@ -38,16 +38,13 @@ class CIRunnner:
   
   def __init__(self, mode, testdir=None):
     '''
-    mode = [cisetup|verify] for what we want to do
+    mode = [verify] for what we want to do
     testdir  = framework directory we are running
     '''
 
     self.directory = testdir
     self.mode = mode
-    if mode == "cisetup":
-      logging.basicConfig(level=logging.DEBUG)
-    else:
-      logging.basicConfig(level=logging.INFO)
+    logging.basicConfig(level=logging.INFO)
 
     try:
       # NOTE: THIS IS VERY TRICKY TO GET RIGHT!
@@ -298,9 +295,18 @@ class CIRunnner:
       log.info("I found no changes to `%s` or `toolset/`, aborting verification", self.directory)
       return 0
 
-    if self.mode == 'cisetup':
-      self.run_travis_setup()
-      return 0
+    # Do full setup now that we've verified that there's work to do
+    try:
+      p = subprocess.Popen("config/travis_setup.sh", shell=True)
+      p.wait()
+    except subprocess.CalledProcessError:
+      log.critical("Subprocess Error")
+      print trackback.format_exc()
+      return 1
+    except Exception as err:
+      log.critical("Exception from running and waiting on subprocess to set up Travis environment")
+      log.error(err.child_traceback)
+      return 1
 
     names = ' '.join(self.names)
     # Assume mode is verify
@@ -321,161 +327,10 @@ class CIRunnner:
       log.error(err.child_traceback)
       return 1
 
-  def run_travis_setup(self):
-    log.info("Setting up Travis-CI")
-    
-    script = '''
-    export DEBIAN_FRONTEND=noninteractive
-
-    # Turn on command tracing
-    set -x 
-
-    # Setup Apt For MongoDB
-    #   Due to TechEmpower/FrameworkBenchmarks#989 and travis-ci/travis-ci#2655, 
-    #   we put this into a loop
-    until timeout 15s sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10; do echo 'Waiting for apt-key' ; done
-    echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
-
-    # Setup apt for Apache Cassandra
-    until timeout 15s sudo apt-key adv --keyserver pgp.mit.edu --recv 4BD736A82B5C1B00; do echo 'Waiting for apt-key' ; done
-    sudo apt-add-repository  'deb http://www.apache.org/dist/cassandra/debian 20x main'
-
-    # Run installation 
-    # DO NOT COPY --force-yes TO ANY NON-TRAVIS-CI SCRIPTS! Seriously, it can cause some 
-    # major damage and should only be used inside a VM or Linux Container
-    sudo apt-get -q update
-    sudo apt-get -q -y --force-yes install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
-      mongodb-org \
-      cassandra \
-      openssh-server
-
-    # Run as travis user (who already has passwordless sudo)
-    ssh-keygen -f /home/travis/.ssh/id_rsa -N '' -t rsa
-    cat /home/travis/.ssh/id_rsa.pub > /home/travis/.ssh/authorized_keys
-    chmod 600 /home/travis/.ssh/authorized_keys
-
-    # Set up the benchmark.cfg for travis user
-    # NOTE: Please don't just copy the example config - it causes unexpected
-    #       issues when those example variables change
-    echo "[Defaults]"                                       > benchmark.cfg
-    echo "client_identity_file=/home/travis/.ssh/id_rsa"   >> benchmark.cfg
-    echo "database_identity_file=/home/travis/.ssh/id_rsa" >> benchmark.cfg
-    echo "client_host=127.0.0.1"                           >> benchmark.cfg
-    echo "database_host=127.0.0.1"                         >> benchmark.cfg
-    echo "server_host=127.0.0.1"                           >> benchmark.cfg
-    echo "client_user=travis"                              >> benchmark.cfg
-    echo "database_user=travis"                            >> benchmark.cfg
-    echo "runner_user=testrunner"                          >> benchmark.cfg
-
-    # Create the new testrunner user
-    sudo useradd testrunner
-    # Give him a home dir
-    sudo mkdir /home/testrunner
-    # Make testrunner the owner of his home dir
-    sudo chown testrunner:testrunner /home/testrunner
-    # Add the testrunner user to every group that the travis user is in
-    sudo sed -i 's|:travis|:travis,testrunner|g' /etc/group
-    # Add the testrunner user to the travis group specifically
-    sudo sed -i 's|travis:x:\(.*\):|travis:x:\\1:testrunner|g' /etc/group
-    # Maybe unneeded - add the travis user to the testrunner group
-    sudo sed -i 's|testrunner:x:\(.*\):|testrunner:x:\\1:travis|g' /etc/group
-    # Need to add testrunner to the sudoers group AND default him to a sudoers
-    # because the travis user isn't in the sudo group - he's a sudoer.
-    echo "testrunner ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
-    # Set the default shell for testrunner to /bin/bash
-    sudo sed -i 's|/home/testrunner:/bin/sh|/home/testrunner:/bin/bash|g' /etc/passwd
-
-    # =============Setup Databases===========================
-    # NOTE: Do not run `--install database` in travis-ci! 
-    #       It changes DB configuration files and will break everything
-    # =======================================================
-
-    # Setup MySQL
-    echo "Populating MySQL database"
-    mysql -uroot < config/create.sql
-
-    # Setup Postgres
-    echo "Removing Postgres 9.1 from Travis-CI"
-    sudo apt-get remove -qy postgresql postgresql-9.1 postgresql-client-9.1
-    sudo apt-get install -qy postgresql-9.3 postgresql-client-9.3
-
-    echo "Populating Postgres database"
-    psql --version
-    sudo useradd benchmarkdbuser -p benchmarkdbpass
-    sudo -u postgres psql template1 < config/create-postgres-database.sql
-    sudo -u benchmarkdbuser psql hello_world < config/create-postgres.sql
-
-    # Setup Apache Cassandra
-    echo "Populating Apache Cassandra database"
-    for i in {1..15}; do
-      nc -z localhost 9160 && break || sleep 1;
-      echo "Waiting for Cassandra ($i/15}"
-    done
-    nc -z localhost 9160
-    if [ $? -eq 0 ]; then
-      cat config/cassandra/cleanup-keyspace.cql | sudo cqlsh
-      python config/cassandra/db-data-gen.py > config/cassandra/tfb-data.cql
-      sudo cqlsh -f config/cassandra/create-keyspace.cql
-      sudo cqlsh -f config/cassandra/tfb-data.cql
-    else
-      >&2 echo "Cassandra did not start, skipping"
-    fi
-
-    # Setup Elasticsearch
-    curl -O https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.5.0.deb
-    sudo dpkg -i --force-confnew elasticsearch-1.5.0.deb
-    sudo update-rc.d elasticsearch defaults 95 10
-    sudo service elasticsearch restart
-
-    echo "Populating Elasticsearch database"
-    for i in {1..15}; do
-      nc -z localhost 9200 && break || sleep 1;
-      echo "Waiting for Elasticsearch ($i/15}"
-    done
-    nc -z localhost 9200
-    if [ $? -eq 0 ]; then
-      curl localhost:9200
-      sh config/elasticsearch/es-create-index.sh
-      python config/elasticsearch/es-db-data-gen.py > config/elasticsearch/tfb-data.json
-      curl -sS -D - -o /dev/null -XPOST localhost:9200/tfb/world/_bulk --data-binary @config/elasticsearch/tfb-data.json
-      echo "Elasticsearch DB populated"
-    else
-      >&2 echo "Elasticsearch did not start, skipping"
-    fi
-
-    # Setup MongoDB
-    echo "Populating MongoDB database"
-    for i in {1..15}; do
-      nc -z localhost 27017 && break || sleep 1;
-      echo "Waiting for MongoDB ($i/15}"
-    done
-    nc -z localhost 27017
-    if [ $? -eq 0 ]; then
-      mongo < config/create.js
-      mongod --version
-    else
-      >&2 echo "MongoDB did not start, skipping"
-    fi
-    
-    # =============Modify Configurations===========================
-    # It can be useful to enable debug features for verification 
-    # inside Travis-CI
-    # =======================================================
-
-    sed -i 's|display_errors\] = off|display_errors\] = on|' config/php-fpm.conf
-    
-    exit $?
-    '''
-
-    p = subprocess.Popen(["bash"], stdin=subprocess.PIPE)
-    p.communicate(script)
-    if p.wait() != 0:
-      log.critical("Non-zero exit  from running+wait on subprocess")
-
 if __name__ == "__main__":
   args = sys.argv[1:]
 
-  usage = '''Usage: toolset/run-ci.py [cisetup|verify] <framework-directory>
+  usage = '''Usage: toolset/run-ci.py [verify] <framework-directory>
     
     run-ci.py selects one test from <framework-directory>/benchark_config, and 
     automates a number of calls into run-tests.py specific to the selected test. 
@@ -484,7 +339,6 @@ if __name__ == "__main__":
     multiple runs with the same <framework-directory> reference the same test. 
     The name of the selected test will be printed to standard output. 
 
-    cisetup - configure the Travis-CI environment for our test suite
     verify  - run a verification on the selected test using `--mode verify`
 
     run-ci.py expects to be run inside the Travis-CI build environment, and 
@@ -496,8 +350,7 @@ if __name__ == "__main__":
 
   mode = args[0]
   testdir = args[1]
-  if len(args) == 2 and (mode == 'verify'
-    or mode == 'cisetup'):
+  if len(args) == 2 and (mode == 'verify'):
     runner = CIRunnner(mode, testdir)
   else:
     print usage
@@ -517,4 +370,5 @@ if __name__ == "__main__":
   finally:
     sys.exit(retcode)
 
+
 # vim: set sw=2 ts=2 expandtab

+ 5 - 2
toolset/setup/linux/languages/java7.sh

@@ -9,13 +9,16 @@ RETCODE=$(fw_exists ${IROOT}/java7.installed)
 JAVA=$IROOT/java7
 
 # TODO: Someday move away from apt-get
+sudo add-apt-repository -y ppa:webupd8team/java
+sudo apt-get update
 # First remove java6
 sudo apt-get remove -y --purge openjdk-6-jre openjdk-6-jre-headless
 # Then install java7
-sudo apt-get install -y openjdk-7-jdk
+echo oracle-java7-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
+sudo apt-get install -y oracle-java7-installer
 
 # Setup environment variables
-echo "export JAVA_HOME=/usr/lib/jvm/java-1.7.0-openjdk-`dpkg --print-architecture`" > $IROOT/java7.installed
+echo "export JAVA_HOME=/usr/lib/jvm/java-7-oracle" > $IROOT/java7.installed
 echo -e "export PATH=\$JAVA_HOME/bin:\$PATH" >> $IROOT/java7.installed
 
 source $IROOT/java7.installed

+ 1 - 1
toolset/setup/linux/languages/java8.sh

@@ -13,7 +13,7 @@ echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | su
 sudo apt-get install -y oracle-java8-installer
 
 # set Java 7 (OpenJDK) as the default, as before.
-J7_HOME=/usr/lib/jvm/java-7-openjdk-`dpkg --print-architecture`
+J7_HOME=/usr/lib/jvm/java-7-oracle
 sudo update-alternatives --set java $J7_HOME/jre/bin/java
 sudo update-alternatives --set javac $J7_HOME/bin/javac