1. Prometheus Research, LLC
  2. Prometheus
  3. htsql


Kirill Simonov  committed 9e6fda7

Buildbot: added py27 vm.

  • Participants
  • Parent commits 804969a
  • Branches default

Comments (0)

Files changed (3)

File Makefile

View file
 	@echo "  start-<bench>: to start the specified test bench"
 	@echo "  stop-<bench>: to stop the specified test bench"
 	@echo "    where <bench> is one of:"
-	@echo "      py25, py26, pgsql84, pgsql90, mysql51, oracle10g,"
+	@echo "      py25, py26, py27, pgsql84, pgsql90, mysql51, oracle10g,"
 	@echo "      mssql2005, mssql2008"
 	@echo "  *** Shell and Server ***"
 	./test/buildbot/bb.sh start py26
+# Start the test bench for Python 2.7
+	./test/buildbot/bb.sh start py27
 # Start the test bench for PostgreSQL 8.4
 	./test/buildbot/bb.sh start pgsql84
 	./test/buildbot/bb.sh stop py26
+# Stop the test bench for Python 2.7
+	./test/buildbot/bb.sh stop py27
 # Stop the test bench for PostgreSQL 8.4
 	./test/buildbot/bb.sh stop pgsql84

File test/buildbot/bb.sh

View file
     set -x
-LINUX_BENCHES="py25 py26 pgsql84 pgsql90 mysql51 oracle10g"
+LINUX_BENCHES="py25 py26 py27 pgsql84 pgsql90 mysql51 oracle10g"
 WINDOWS_BENCHES="mssql2005 mssql2008"
 do_check() {
     local LIST="$1"
-    for CLIENT in py25 py26; do
+    for CLIENT in py25 py26 py27; do
         if ! found $CLIENT "$LIST"; then
         echo For remote shell, type \'ssh -F $CTL/ssh_config linux-vm\'
+    if found py27 "$LIST"; then
+        start_linux_bench py27 :10022-:22
+        echo For remote shell, type \'ssh -F $CTL/ssh_config linux-vm\'
+    fi
     if found pgsql84 "$LIST"; then
         start_linux_bench pgsql84 :15432-:5432

File test/buildbot/data/py27-update.sh

View file
+# Post-installation script for the py27 VM.
+# Update the hostname.
+echo py27-vm >/etc/hostname
+# Register the testing repository.
+echo "deb http://ftp.us.debian.org/debian/ wheezy main" >/etc/apt/sources.list.d/testing.list
+cat <<END >>/etc/apt/preferences.d/pinning.pref
+Package: *
+Pin: release n=wheezy
+Pin-Priority: 90
+apt-get update
+# Register the Oracle repository.
+echo "deb http://oss.oracle.com/debian/ unstable main non-free" >/etc/apt/sources.list.d/oracle.list
+wget -q http://oss.oracle.com/el4/RPM-GPG-KEY-oracle -O- | apt-key add -
+apt-get update
+# Install Mercurial.
+apt-get -y install mercurial
+# Install Python 2.7 and required Python packages.
+apt-get -y install -t wheezy python2.7
+apt-get -y install -t wheezy python-setuptools
+apt-get -y install -t wheezy python-yaml
+apt-get -y install -t wheezy python-pip
+apt-get -y install -t wheezy python-virtualenv
+# Install development files for Python and database drivers.
+apt-get -y install -t wheezy python2.7-dev
+apt-get -y install libpq-dev
+apt-get -y install libmysqlclient-dev
+apt-get -y install freetds-dev
+apt-get -y install oracle-xe-client
+# Initialize Python virtual enviroment in `/root`.
+virtualenv -p python2.7 .
+# Download the source code of HTSQL.
+mkdir src
+hg -q clone https://bitbucket.org/prometheus/htsql src/htsql
+# Set the Oracle, FreeTDS and `virtualenv` environment variables on login.
+cat <<END >>/root/.bashrc
+export PATH=~/bin:\$PATH
+export LD_LIBRARY_PATH=~/lib
+export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/client
+export SQLPATH=\$ORACLE_HOME/sqlplus
+export PATH=\$PATH:\$ORACLE_HOME/bin
+export TDSVER=8.0