Commits

Kirill Simonov committed 9e6fda7

Buildbot: added py27 vm.

  • Participants
  • Parent commits 804969a

Comments (0)

Files changed (3)

 	@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
 	@echo "  *** Shell and Server ***"
 start-py26:
 	./test/buildbot/bb.sh start py26
 
+# Start the test bench for Python 2.7
+start-py27:
+	./test/buildbot/bb.sh start py27
+
 # Start the test bench for PostgreSQL 8.4
 start-pgsql84:
 	./test/buildbot/bb.sh start pgsql84
 stop-py26:
 	./test/buildbot/bb.sh stop py26
 
+# Stop the test bench for Python 2.7
+stop-py27:
+	./test/buildbot/bb.sh stop py27
+
 # Stop the test bench for PostgreSQL 8.4
 stop-pgsql84:
 	./test/buildbot/bb.sh stop pgsql84

File test/buildbot/bb.sh

     set -x
 fi
 
-LINUX_BENCHES="py25 py26 pgsql84 pgsql90 mysql51 oracle10g"
+LINUX_BENCHES="py25 py26 py27 pgsql84 pgsql90 mysql51 oracle10g"
 WINDOWS_BENCHES="mssql2005 mssql2008"
 BENCHES="$LINUX_BENCHES $WINDOWS_BENCHES"
 
 do_check() {
     local LIST="$1"
 
-    for CLIENT in py25 py26; do
+    for CLIENT in py25 py26 py27; do
 
         if ! found $CLIENT "$LIST"; then
             continue
         echo For remote shell, type \'ssh -F $CTL/ssh_config linux-vm\'
     fi
 
+    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
     fi

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

+#/bin/sh
+
+# 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
+END
+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 NLS_LANG=AMERICAN_AMERICA.AL32UTF8
+export SQLPATH=\$ORACLE_HOME/sqlplus
+export PATH=\$PATH:\$ORACLE_HOME/bin
+export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:\$ORACLE_HOME/lib
+
+export TDSVER=8.0
+
+END
+