From 4a75383a05e2d8f94534d537b48bf3be104bee6b Mon Sep 17 00:00:00 2001 From: Jonathan Maw Date: Mon, 21 Oct 2019 16:45:28 +0100 Subject: Add tests that the basic functionality of buildstream works in win32 i.e. `bst help` and `bst init` --- .gitlab-ci.yml | 27 +++++++++++++++++++++++++++ CONTRIBUTING.rst | 11 +++++++++++ tox.ini | 20 +++++++++++++++++++- 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index f669e1905..78472190b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -223,6 +223,33 @@ lint: except: - schedules +# Catch regressions in native windows support +tests-win32-master: + stage: test + variables: + LC_ALL: C.UTF-8 + LANG: C.UTF-8 + tags: + - win32 + script: + - tox -e win32 + only: + - master + +# Optional test to catch regressions in native windows support on non-master branches +tests-win32-non-master: + stage: test + variables: + LC_ALL: C.UTF-8 + LANG: C.UTF-8 + tags: + - win32 + script: + - tox -e win32 + except: + - master + when: manual + tests-wsl-master: stage: test variables: diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 048136ef7..70741bcc5 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -248,6 +248,17 @@ project needs a bunch of very trivial patches whose only purpose is to gain comm access; knowing what's worth a patch post and what's not is part of showing good judgement.) +Windows CI +---------- + +The infrastructure for running the CI against Windows is different from the usual +runners, due to a combination of licensing technicalities and differing +containerisation support. + +The scripts used to generate a CI runner can be found at +`https://gitlab.com/BuildStream/windows-startup-script`. +The `wsl` branch can be used to generate a runner for WSL, and the `win32` branch +can be used to generate a native-windows runner. Further information ------------------- diff --git a/tox.ini b/tox.ini index 789aa40bf..dffaf7265 100644 --- a/tox.ini +++ b/tox.ini @@ -50,7 +50,6 @@ passenv = REMOTE_EXECUTION_SERVICE SOURCE_CACHE_SERVICE SSL_CERT_FILE - # # These keys are not inherited by any other sections # @@ -68,6 +67,25 @@ whitelist_externals = mv mkdir +# +# Environment for native windows +# +[testenv:win32] +commands = + bst help + cmd /C md testdir + bst init testdir --project-name="test" +deps = + -rrequirements/requirements.txt + -rrequirements/dev-requirements.txt + colorama + windows-curses + cython + . +whitelist_externals = + bst + cmd + # # Coverage reporting # -- cgit v1.2.1