diff options
| author | Tim Orling <tim.orling@konsulko.com> | 2024-03-23 08:47:38 -0700 |
|---|---|---|
| committer | Tim Orling <tim.orling@konsulko.com> | 2024-03-23 14:10:04 -0700 |
| commit | 760e86c69cfc92a1650ad98bd6ee2b89260d7393 (patch) | |
| tree | 65e1da5f3a547e8401322c559b36be396c6dcc0a | |
| parent | 9087fb4564ce47fedda9f4cc5d271f7b29c2bf41 (diff) | |
| download | meta-java-760e86c69cfc92a1650ad98bd6ee2b89260d7393.tar.gz | |
oeqa/runtime/javac: Add package check for javac
Before testing whether javac exists, check to see if one of the jdk
packages is installed on the target. Otherwise, the test will fail.
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
| -rw-r--r-- | lib/oeqa/runtime/cases/javac.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/oeqa/runtime/cases/javac.py b/lib/oeqa/runtime/cases/javac.py index 39ae298..3f11511 100644 --- a/lib/oeqa/runtime/cases/javac.py +++ b/lib/oeqa/runtime/cases/javac.py | |||
| @@ -18,12 +18,16 @@ class JavacTest(OERuntimeTestCase): | |||
| 18 | dst = '/tmp/test.java /tmp/test.class' | 18 | dst = '/tmp/test.java /tmp/test.class' |
| 19 | cls.tc.target.run('rm %s' % dst) | 19 | cls.tc.target.run('rm %s' % dst) |
| 20 | 20 | ||
| 21 | @OETestDepends(['ssh.SSHTest.test_ssh']) | ||
| 22 | @OEHasPackage(["openjdk-7", "openjdk-8"]) | ||
| 21 | @OETestDepends(['java.JavaTest.test_java_exists']) | 23 | @OETestDepends(['java.JavaTest.test_java_exists']) |
| 22 | def test_javac_exists(self): | 24 | def test_javac_exists(self): |
| 23 | status, output = self.target.run('which javac') | 25 | status, output = self.target.run('which javac') |
| 24 | msg = 'javac binary not in PATH or not on target.' | 26 | msg = 'javac binary not in PATH or not on target.' |
| 25 | self.assertEqual(status, 0, msg=msg) | 27 | self.assertEqual(status, 0, msg=msg) |
| 26 | 28 | ||
| 29 | @OETestDepends(['ssh.SSHTest.test_ssh']) | ||
| 30 | @OEHasPackage(["openjdk-7", "openjdk-8"]) | ||
| 27 | @OETestDepends(['javac.JavacTest.test_javac_exists']) | 31 | @OETestDepends(['javac.JavacTest.test_javac_exists']) |
| 28 | def test_javac_works(self): | 32 | def test_javac_works(self): |
| 29 | status, output = self.target.run('javac /tmp/test.java') | 33 | status, output = self.target.run('javac /tmp/test.java') |
