From ca171f5b37ff416fb34d3dddbd14fbfe72fba6eb Mon Sep 17 00:00:00 2001
From: Stephan Seitz <stephan.seitz@fau.de>
Date: Wed, 7 Aug 2019 14:15:16 +0200
Subject: [PATCH] Skip GPU execution test on Travis

---
 .travis.yml                                     | 1 +
 tests/backends/test_torch_native_compilation.py | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/.travis.yml b/.travis.yml
index 57e9ca4..fce0db5 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,6 +23,7 @@ before_script:
   - git config --global user.email "you@example.com"
   - git config --global user.name "Your Name"
 script:
+  - export NO_GPU_EXECUTION
   - pip install -e .
   - python setup.py test
 after_success:
diff --git a/tests/backends/test_torch_native_compilation.py b/tests/backends/test_torch_native_compilation.py
index 0b3166c..b0c0dc6 100644
--- a/tests/backends/test_torch_native_compilation.py
+++ b/tests/backends/test_torch_native_compilation.py
@@ -10,6 +10,7 @@ from os.path import dirname, isfile, join
 import appdirs
 import jinja2
 import numpy as np
+import pytest
 import torch
 
 import pystencils
@@ -163,6 +164,7 @@ def test_execute_torch():
     assert op_cpp is not None
 
 
+@pytest.skip('NO_GPU_EXECUTION' in os.environ, reason='Skip GPU execution tests')
 def test_execute_torch_gpu():
     x, y = pystencils.fields('x, y: float64[32,32]')
 
-- 
GitLab