Skip to contentSkip to conversation

oeqa: runtime: java: Add package check for java

PATCH New Wes Lindauer 1 participant 1 message Feb 17, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oeqa: runtime: java: Add package check for java

From: Wes Lindauer <[email protected]>

Before testing whether java exists, check to see if one of the java packages is installed on the target. Otherwise, the test will fail.

---
 lib/oeqa/runtime/cases/java.py | 1 +
 1 file changed, 1 insertion(+)
lib/oeqa/runtime/cases/java.py +1 -0
index c1e1498..d366d61 100644
@@ -20,6 +20,7 @@ class JavaTest(OERuntimeTestCase):
         cls.tc.target.run('rm %s' % dst)
 
     @OETestDepends(['ssh.SSHTest.test_ssh'])
+    @OEHasPackage(["openjdk-7-jre", "openjdk-7", "openjre-8", "openjdk-8"])
     def test_java_exists(self):
         status, output = self.target.run('which java')
         msg = 'java binary not in PATH or not on target.'
Signature · 1 line
2.21.3