[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:
aleksandr.vodyanov
2025-02-25 13:53:43 +03:00
committed by Aleksandr Vodyanov
parent 3759e1163f
commit a82e89a1bc
46 changed files with 679 additions and 197 deletions

View 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()