From c21ddf2c585f9954a8fda9b1159d5ae47a51b671 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.dos.anjos@gmail.com> Date: Wed, 11 May 2016 09:21:57 +0200 Subject: [PATCH] [ci] Use local directory for tests to avoid NFS resource issues --- .gitlab-ci.yml | 2 ++ beat/web/settings/test.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c46158416..319f3711f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,6 +9,7 @@ py27-linux: - cd src/cpulimit && make && cd - - cd bin && ln -s ../src/cpulimit/src/cpulimit . && cd - - export COVERAGE_FILE=.coverage.django + - export BEAT_TEST_PREFIX=/var/tmp/test_prefix - ./bin/coverage run --source='./beat/web' ./bin/django test --settings=beat.web.settings.test -v 2 - export BEAT_CMDLINE_TEST_PLATFORM=django://beat.web.settings.test - export COVERAGE_FILE=.coverage.cmdline @@ -16,6 +17,7 @@ py27-linux: - export NOSE_COVER_PACKAGE=beat.web - ./bin/nosetests -sv beat.cmdline - unset COVERAGE_FILE + - unset BEAT_TEST_PREFIX - ./bin/coverage combine .coverage.django .coverage.cmdline - ./bin/coverage report - ./bin/sphinx-apidoc --separate -d 2 --output=doc/api/api beat beat/web/*/migrations beat/web/*/tests diff --git a/beat/web/settings/test.py b/beat/web/settings/test.py index 6f71db45e..9bb7d4dc1 100644 --- a/beat/web/settings/test.py +++ b/beat/web/settings/test.py @@ -47,7 +47,7 @@ if 'beat.cmdline' in sys.argv: LOGGING['handlers']['console']['level'] = 'DEBUG' LOGGING['loggers']['beat.core']['handlers'] = ['discard'] -PREFIX = os.path.realpath('./test_prefix') +PREFIX = os.environ.get('BEAT_TEST_PREFIX', os.path.realpath('./test_prefix')) ALGORITHMS_ROOT = os.path.join(PREFIX, 'algorithms') PLOTTERS_ROOT = os.path.join(PREFIX, 'plotters') LIBRARIES_ROOT = os.path.join(PREFIX, 'libraries') -- GitLab