[DO-1345] fixed windows packages (!16)
Reviewed-on: https://git.avroid.tech/Conan/conan_build/pulls/16 Co-authored-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.team> Co-committed-by: aleksandr.vodyanov <aleksandr.vodyanov@avroid.team>
This commit is contained in:
committed by
Aleksandr Vodyanov
parent
3759e1163f
commit
a82e89a1bc
28
recipes/msys2/all/test_v1_package/conanfile.py
Normal file
28
recipes/msys2/all/test_v1_package/conanfile.py
Normal file
@@ -0,0 +1,28 @@
|
||||
from conans import ConanFile, tools
|
||||
from conans.errors import ConanException
|
||||
from io import StringIO
|
||||
|
||||
|
||||
class TestPackageConan(ConanFile):
|
||||
settings = "os", "arch", "compiler", "build_type"
|
||||
|
||||
def build(self):
|
||||
pass # nothing to do, skip hook warning
|
||||
|
||||
def test(self):
|
||||
bash = tools.which("bash.exe")
|
||||
|
||||
if bash:
|
||||
self.output.info("using bash.exe from: " + bash)
|
||||
else:
|
||||
raise ConanException("No instance of bash.exe could be found on %PATH%")
|
||||
|
||||
self.run('bash.exe -c ^"make --version^"')
|
||||
self.run('bash.exe -c ^"! test -f /bin/link^"')
|
||||
self.run('bash.exe -c ^"! test -f /usr/bin/link^"')
|
||||
|
||||
secret_value = "SECRET_CONAN_PKG_VARIABLE"
|
||||
with tools.environment_append({"PKG_CONFIG_PATH": secret_value}):
|
||||
output = StringIO()
|
||||
self.run('bash.exe -c "echo $PKG_CONFIG_PATH"', output=output)
|
||||
assert secret_value in output.getvalue()
|
||||
Reference in New Issue
Block a user