msbuild /p:Configuration=$env:configuration
}
# Package
- - $GV_VERSION=$( cat VERSION )
+ - $Env:GV_VERSION=$( cat VERSION )
- >-
if($env:platform -eq "x64") {
$API = "win64";
stage: test
script:
- ci/install-packages.sh
+ - export GV_VERSION=$( cat VERSION )
- python3 -m pytest --junitxml=report.xml tests rtest
artifacts:
reports:
+import pytest
import subprocess
import os
def test_installation():
- os.chdir(os.path.dirname(os.path.realpath(__file__)))
- result = subprocess.Popen(['bash', './check_installation.sh'])
- text = result.communicate()[0]
- print(text)
- assert result.returncode == 0
+ expected_version = os.environ['GV_VERSION']
+ actual_version_string = subprocess.check_output(
+ [
+ 'dot',
+ '-V',
+ ],
+ universal_newlines=True,
+ stderr=subprocess.STDOUT,
+ )
+ try:
+ actual_version = actual_version_string.split()[4]
+ except IndexError:
+ pytest.fail('Malformed version string: {0}'.format(actual_version_string))
+ assert actual_version == expected_version