Skip to content

Commit

Permalink
Update recipes/openjdk/all/test_package/conanfile.py
Browse files Browse the repository at this point in the history
Co-authored-by: Javier G. Sogo <jgsogo@gmail.com>
  • Loading branch information
boussaffawalid and jgsogo authored Sep 27, 2021
1 parent 74d890d commit 8c87412
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions recipes/openjdk/all/test_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,12 @@ def build(self):
pass # nothing to build, but tests should not warn

def test(self):
output = StringIO()
self.run("java --version", output=output, run_environment=True)
print(output.getvalue)
version_info = output.getvalue()
if "openjdk" in version_info:
pass
else:
raise ConanException("java call seems not use the openjdk bin")
if not tools.cross_building(self):
output = StringIO()
self.run("java --version", output=output, run_environment=True)
print(output.getvalue)
version_info = output.getvalue()
if "openjdk" in version_info:
pass
else:
raise ConanException("java call seems not use the openjdk bin")

0 comments on commit 8c87412

Please sign in to comment.