Skip to contentSkip to conversation

oeqa: runtime: java: skip not supported version/arch combinations

PATCH In review Richard Leitner 1 participant 2 messages Aug 14, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 oeqa: runtime: java: skip not supported version/arch combinations

The following OpenJDK Version/Target architecture combinations are currently not supported with "compiled mode" aka JIT:

OpenJRE-8 on arm
OpenJDK-7 on aarch64
OpenJDK-7 on x86
OpenJDK-7 on x86-64

Therefore we skip the correspoding oeqa runtime tests for now.

---
 lib/oeqa/runtime/cases/java.py | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
lib/oeqa/runtime/cases/java.py +21 -1
index feb572b..f2375a4 100644
@@ -3,6 +3,7 @@ import os
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.oeid import OETestID
+from oeqa.core.decorator.data import skipIfDataVar
 from oeqa.runtime.decorator.package import OEHasPackage
 
 class JavaTest(OERuntimeTestCase):
@@ -50,8 +51,27 @@ class JavaTest(OERuntimeTestCase):
         msg = 'Incorrect mode: %s' % output
         self.assertIn(', interpreted mode)', output, msg=msg)
 
+    # As OpenJDK-7 doesn't support compiled mode (JIT) for all architectures yet
+    # we skip these tests for now.
+    @OEHasPackage(["openjdk-7-jre", "openjdk-7"])
     @OETestDepends(['java.JavaTest.test_java_exists'])
-    def test_java_jar_comp_mode(self):
+    @skipIfDataVar('ARCH', 'arm64', 'OpenJDK 7 compiled mode not yet supported for aarch64')
+    @skipIfDataVar('ARCH', 'x86', 'OpenJDK 7 compiled mode not yet supported for x86')
+    @skipIfDataVar('ARCH', 'x86-64', 'OpenJDK 7 compiled mode not yet supported for x86-64')
+    def test_java7_jar_comp_mode(self):
+        status, output = self.target.run('java -showversion -Xcomp -jar /tmp/test.jar')
+        msg = 'Exit status was not 0. Output: %s' % output
+        self.assertEqual(status, 0, msg=msg)
+
+        msg = 'Incorrect mode: %s' % output
+        self.assertIn(', compiled mode)', output, msg=msg)
+
+    # As OpenJDK-8 doesn't support compiled mode (JIT) for arm yet we skip this
+    # test for now.
+    @OEHasPackage(["openjre-8", "openjdk-8"])
+    @OETestDepends(['java.JavaTest.test_java_exists'])
+    @skipIfDataVar('ARCH', 'arm', 'OpenJDK 8 compiled mode not yet supported for arm')
+    def test_java8_jar_comp_mode(self):
         status, output = self.target.run('java -showversion -Xcomp -jar /tmp/test.jar')
         msg = 'Exit status was not 0. Output: %s' % output
         self.assertEqual(status, 0, msg=msg)
Signature · 1 line
2.11.0
#1 lore raw

Hi,
this is a note to let you know that I've just added this patch to the master-next branch of the meta-java repository at
git://git.yoctoproject.org/meta-java

As soon as it has gone through some more testing it will likely be merged to the master branch.

If you have any questions, please let me know.

regards;Richard.L

Quoted 57 lines · Richard Leitner

The following OpenJDK Version/Target architecture combinations are currently not supported with "compiled mode" aka JIT:

OpenJRE-8 on arm
OpenJDK-7 on aarch64
OpenJDK-7 on x86
OpenJDK-7 on x86-64

Therefore we skip the correspoding oeqa runtime tests for now.

---
 lib/oeqa/runtime/cases/java.py | 22 +++++++++++++++++++++-
 1 file changed, 21 insertions(+), 1 deletion(-)
lib/oeqa/runtime/cases/java.py +21 -1
index feb572b..f2375a4 100644
@@ -3,6 +3,7 @@ import os
 from oeqa.runtime.case import OERuntimeTestCase
 from oeqa.core.decorator.depends import OETestDepends
 from oeqa.core.decorator.oeid import OETestID
+from oeqa.core.decorator.data import skipIfDataVar
 from oeqa.runtime.decorator.package import OEHasPackage
 
 class JavaTest(OERuntimeTestCase):
@@ -50,8 +51,27 @@ class JavaTest(OERuntimeTestCase):
         msg = 'Incorrect mode: %s' % output
         self.assertIn(', interpreted mode)', output, msg=msg)
 
+    # As OpenJDK-7 doesn't support compiled mode (JIT) for all architectures yet
+    # we skip these tests for now.
+    @OEHasPackage(["openjdk-7-jre", "openjdk-7"])
     @OETestDepends(['java.JavaTest.test_java_exists'])
-    def test_java_jar_comp_mode(self):
+    @skipIfDataVar('ARCH', 'arm64', 'OpenJDK 7 compiled mode not yet supported for aarch64')
+    @skipIfDataVar('ARCH', 'x86', 'OpenJDK 7 compiled mode not yet supported for x86')
+    @skipIfDataVar('ARCH', 'x86-64', 'OpenJDK 7 compiled mode not yet supported for x86-64')
+    def test_java7_jar_comp_mode(self):
+        status, output = self.target.run('java -showversion -Xcomp -jar /tmp/test.jar')
+        msg = 'Exit status was not 0. Output: %s' % output
+        self.assertEqual(status, 0, msg=msg)
+
+        msg = 'Incorrect mode: %s' % output
+        self.assertIn(', compiled mode)', output, msg=msg)
+
+    # As OpenJDK-8 doesn't support compiled mode (JIT) for arm yet we skip this
+    # test for now.
+    @OEHasPackage(["openjre-8", "openjdk-8"])
+    @OETestDepends(['java.JavaTest.test_java_exists'])
+    @skipIfDataVar('ARCH', 'arm', 'OpenJDK 8 compiled mode not yet supported for arm')
+    def test_java8_jar_comp_mode(self):
         status, output = self.target.run('java -showversion -Xcomp -jar /tmp/test.jar')
         msg = 'Exit status was not 0. Output: %s' % output
         self.assertEqual(status, 0, msg=msg)