|
@@ -195,8 +195,9 @@ class CIRunnner:
|
|
|
validtests = [t for t in osvalidtests if t.database.lower() == "mysql"
|
|
|
or t.database.lower() == "postgres"
|
|
|
or t.database.lower() == "mongodb"
|
|
|
+ or t.database.lower() == "cassandra"
|
|
|
or t.database.lower() == "none"]
|
|
|
- log.info("Found %s usable tests (%s valid for linux, %s valid for linux and {mysql,postgres,mongodb,none}) in directory '%s'",
|
|
|
+ log.info("Found %s usable tests (%s valid for linux, %s valid for linux and {mysql,postgres,mongodb,cassandra,none}) in directory '%s'",
|
|
|
len(dirtests), len(osvalidtests), len(validtests), '$FWROOT/frameworks/' + testdir)
|
|
|
if len(validtests) == 0:
|
|
|
log.critical("Found no test that is possible to run in Travis-CI! Aborting!")
|
|
@@ -314,11 +315,17 @@ class CIRunnner:
|
|
|
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
|
|
|
|
|
|
+ # Add Apache Cassandra repository
|
|
|
+ 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'
|
|
|
+
|
|
|
sudo apt-get -q update
|
|
|
|
|
|
# MongoDB takes a good 30-45 seconds to turn on, so install it first
|
|
|
sudo apt-get -q install mongodb-org
|
|
|
|
|
|
+ sudo apt-get install -o Dpkg::Options::="--force-confnew" cassandra
|
|
|
+
|
|
|
sudo apt-get -q install openssh-server
|
|
|
|
|
|
# Run as travis user (who already has passwordless sudo)
|
|
@@ -332,14 +339,25 @@ class CIRunnner:
|
|
|
# =======================================================
|
|
|
|
|
|
# Add data to mysql
|
|
|
+ echo "Populating MySQL DB data"
|
|
|
mysql -uroot < config/create.sql
|
|
|
|
|
|
# Setup Postgres
|
|
|
+ echo "Setting up 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 "Setting up Apache Cassandra database"
|
|
|
+ until nc -z localhost 9160 ; do echo Waiting for Cassandra; sleep 1; done
|
|
|
+ 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
|
|
|
+
|
|
|
+ echo "Setting up MongDB database"
|
|
|
# Setup MongoDB (see install above)
|
|
|
mongod --version
|
|
|
until nc -z localhost 27017 ; do echo Waiting for MongoDB; sleep 1; done
|