Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Uilian Ries <uilianries@gmail.com>
Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
  • Loading branch information
3 people authored Oct 27, 2022
1 parent 493461a commit 1ef96b8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 2 additions & 2 deletions recipes/openjdk/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ class OpenJDK(ConanFile):
homepage = "https://jdk.java.net"
license = "GPL-2.0-with-classpath-exception"
topics = ("java", "jdk", "openjdk")
settings = "os", "arch"
settings = "os", "arch", "compiler", "build_type"
no_copy_source = True

def configure(self):
def validate(self):
if self.settings.arch != "x86_64":
raise ConanInvalidConfiguration("Unsupported Architecture. This package currently only supports x86_64.")
if self.settings.os not in ["Windows", "Macos", "Linux"]:
Expand Down
5 changes: 1 addition & 4 deletions recipes/openjdk/all/test_v1_package/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from conans.errors import ConanException
from io import StringIO

required_conan_version = ">=1.36.0"


class TestPackage(ConanFile):
Expand All @@ -20,7 +19,5 @@ def test(self):
self.run("java --version", output=output, run_environment=True)
print(output.getvalue)
version_info = output.getvalue()
if "openjdk" in version_info:
pass
else:
if "openjdk" not in version_info:
raise ConanException("java call seems not use the openjdk bin")

0 comments on commit 1ef96b8

Please sign in to comment.