summaryrefslogtreecommitdiffstats
path: root/lib/oeqa/runtime/cases/java.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/oeqa/runtime/cases/java.py')
-rw-r--r--lib/oeqa/runtime/cases/java.py22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/oeqa/runtime/cases/java.py b/lib/oeqa/runtime/cases/java.py
index feb572b..f2375a4 100644
--- a/lib/oeqa/runtime/cases/java.py
+++ b/lib/oeqa/runtime/cases/java.py
@@ -3,6 +3,7 @@ import os
3from oeqa.runtime.case import OERuntimeTestCase 3from oeqa.runtime.case import OERuntimeTestCase
4from oeqa.core.decorator.depends import OETestDepends 4from oeqa.core.decorator.depends import OETestDepends
5from oeqa.core.decorator.oeid import OETestID 5from oeqa.core.decorator.oeid import OETestID
6from oeqa.core.decorator.data import skipIfDataVar
6from oeqa.runtime.decorator.package import OEHasPackage 7from oeqa.runtime.decorator.package import OEHasPackage
7 8
8class JavaTest(OERuntimeTestCase): 9class JavaTest(OERuntimeTestCase):
@@ -50,8 +51,27 @@ class JavaTest(OERuntimeTestCase):
50 msg = 'Incorrect mode: %s' % output 51 msg = 'Incorrect mode: %s' % output
51 self.assertIn(', interpreted mode)', output, msg=msg) 52 self.assertIn(', interpreted mode)', output, msg=msg)
52 53
54 # As OpenJDK-7 doesn't support compiled mode (JIT) for all architectures yet
55 # we skip these tests for now.
56 @OEHasPackage(["openjdk-7-jre", "openjdk-7"])
53 @OETestDepends(['java.JavaTest.test_java_exists']) 57 @OETestDepends(['java.JavaTest.test_java_exists'])
54 def test_java_jar_comp_mode(self): 58 @skipIfDataVar('ARCH', 'arm64', 'OpenJDK 7 compiled mode not yet supported for aarch64')
59 @skipIfDataVar('ARCH', 'x86', 'OpenJDK 7 compiled mode not yet supported for x86')
60 @skipIfDataVar('ARCH', 'x86-64', 'OpenJDK 7 compiled mode not yet supported for x86-64')
61 def test_java7_jar_comp_mode(self):
62 status, output = self.target.run('java -showversion -Xcomp -jar /tmp/test.jar')
63 msg = 'Exit status was not 0. Output: %s' % output
64 self.assertEqual(status, 0, msg=msg)
65
66 msg = 'Incorrect mode: %s' % output
67 self.assertIn(', compiled mode)', output, msg=msg)
68
69 # As OpenJDK-8 doesn't support compiled mode (JIT) for arm yet we skip this
70 # test for now.
71 @OEHasPackage(["openjre-8", "openjdk-8"])
72 @OETestDepends(['java.JavaTest.test_java_exists'])
73 @skipIfDataVar('ARCH', 'arm', 'OpenJDK 8 compiled mode not yet supported for arm')
74 def test_java8_jar_comp_mode(self):
55 status, output = self.target.run('java -showversion -Xcomp -jar /tmp/test.jar') 75 status, output = self.target.run('java -showversion -Xcomp -jar /tmp/test.jar')
56 msg = 'Exit status was not 0. Output: %s' % output 76 msg = 'Exit status was not 0. Output: %s' % output
57 self.assertEqual(status, 0, msg=msg) 77 self.assertEqual(status, 0, msg=msg)