[7/7] appveyor: Add python tests

Submitted by Dylan Baker on June 13, 2017, 8:59 p.m.

Details

Message ID 20170613205953.30280-8-dylan@pnwbakers.com
State New
Headers show
Series "Series without cover letter" ( rev: 1 ) in Piglit

Not browsing as part of any series.

Commit Message

Dylan Baker June 13, 2017, 8:59 p.m.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
---
 appveyor.yml | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 55 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/appveyor.yml b/appveyor.yml
index c83efc757..f4cfa8721 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -43,33 +43,75 @@  cache:
 os: Visual Studio 2015
 
 environment:
-  PYTHON_HOME: C:\Python36
   matrix:
     - MINGW_HOME: C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32
+      PYTHON_HOME: C:\Python36
       FREEGLUT_ARCHIVE: freeglut-MinGW-3.0.0-1.mp.zip
       FREEGLUT_LIB: lib\libfreeglut.a
       TEST_TYPE: native
+
     - MINGW_HOME: C:\mingw-w64\x86_64-6.3.0-posix-seh-rt_v5-rev1\mingw64
+      PYTHON_HOME: C:\Python36
       FREEGLUT_ARCHIVE: freeglut-MinGW-3.0.0-1.mp.zip
       FREEGLUT_LIB: lib\x64\libfreeglut.a
       TEST_TYPE: native
+
   # - MSVC_ARCH: x86
+  #   PYTHON_HOME: C:\Python36
   #   FREEGLUT_ARCHIVE: freeglut-MSVC-3.0.0-2.mp.zip
   #   FREEGLUT_LIB: lib\freeglut.lib
   #   TEST_TYPE: native
+
   # - MSVC_ARCH: x86_amd64
+  #   PYTHON_HOME: C:\Python36
   #   FREEGLUT_ARCHIVE: freeglut-MSVC-3.0.0-2.mp.zip
   #   FREEGLUT_LIB: lib\x64\freeglut.lib
   #   TEST_TYPE: native
 
+    - TOXENV: 'py27-{noaccel,accel-win,streams}'
+      TOXPYTHON: C:\Python27\python.exe
+      PYTHON_HOME: C:\Python27
+      PYTHON_VERSION: '2.7'
+      PYTHON_ARCH: '32'
+      TEST_TYPE: python
+
+    - TOXENV: 'py33-{noaccel,accel-win,streams}'
+      TOXPYTHON: C:\Python33\python.exe
+      PYTHON_HOME: C:\Python33
+      PYTHON_VERSION: '3.3'
+      PYTHON_ARCH: '32'
+      TEST_TYPE: python
+
+    - TOXENV: 'py34-{noaccel,accel-win,streams}'
+      TOXPYTHON: C:\Python34\python.exe
+      PYTHON_HOME: C:\Python34
+      PYTHON_VERSION: '3.4'
+      PYTHON_ARCH: '32'
+      TEST_TYPE: python
+
+    - TOXENV: 'py35-{noaccel,accel-win,streams}'
+      TOXPYTHON: C:\Python35\python.exe
+      PYTHON_HOME: C:\Python35
+      PYTHON_VERSION: '3.5'
+      PYTHON_ARCH: '32'
+      TEST_TYPE: python
+
+    - TOXENV: 'py36-{noaccel,accel-win,streams}'
+      TOXPYTHON: C:\Python36\python.exe
+      PYTHON_HOME: C:\Python36
+      PYTHON_VERSION: '3.6'
+      PYTHON_ARCH: '32'
+      TEST_TYPE: python
+
 matrix:
   fast_finish: true
 
 install:
   - ps: |
+      $ENV:Path="$ENV:PYTHON_HOME;$ENV:PYTHON_HOME\Scripts;$ENV:Path"
+
       if ("$ENV:TEST_TYPE" -eq "native") {
         # Setup Python 3
-        $ENV:Path="$ENV:PYTHON_HOME;$ENV:PYTHON_HOME\Scripts;$ENV:Path"
         Write-Host $(pip --version)
         pip install -r python-requirements/minimum.txt
         pip install -r python-requirements/python3-extra.txt
@@ -105,6 +147,11 @@  install:
         # Get glext.h
         mkdir "glext\GL"
         Invoke-WebRequest https://www.khronos.org/registry/OpenGL/api/GL/glext.h -OutFile glext\GL\glext.h
+      } elseif ("$ENV:TEST_TYPE" -eq "python") {
+        python --version
+        pip --version
+        pip install tox
+        tox --version
       }
 
 build_script:
@@ -114,6 +161,12 @@  build_script:
         ninja -C build
       }
 
+test_script:
+  - ps: |
+      if ("$ENV:TEST_TYPE" -eq "python") {
+        tox
+      }
+
 
 # It's possible to setup notification here, as described in
 # http://www.appveyor.com/docs/notifications#appveyor-yml-configuration , but