From: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <
jwkoz...@gmail.com>
Branch: master
java: add basic java test that does NOT use OSv wrapper
Signed-off-by: Waldemar Kozaczuk <
jwkoz...@gmail.com>
---
diff --git a/modules/java-tests/tests/src/main/java/io/osv/BasicTest.java
b/modules/java-tests/tests/src/main/java/io/osv/BasicTest.java
--- a/modules/java-tests/tests/src/main/java/io/osv/BasicTest.java
+++ b/modules/java-tests/tests/src/main/java/io/osv/BasicTest.java
@@ -0,0 +1,18 @@
+package io.osv;
+
+import org.junit.Test;
+
+import static org.junit.Assert.*;
+
+/*
+ * Copyright (C) 2019 Waldemar Kozaczuk.
+ *
+ * This work is open source software, licensed under the terms of the
+ * BSD license as described in the LICENSE file in the top-level directory.
+ */
+public class BasicTest {
+ @Test
+ public void testBasic() {
+ assertEquals(Boolean.TRUE,Boolean.TRUE);
+ }
+}
diff --git a/modules/java-tests/tests/src/main/java/io/osv/BasicTests.java
b/modules/java-tests/tests/src/main/java/io/osv/BasicTests.java
--- a/modules/java-tests/tests/src/main/java/io/osv/BasicTests.java
+++ b/modules/java-tests/tests/src/main/java/io/osv/BasicTests.java
@@ -0,0 +1,18 @@
+package io.osv;
+
+/*
+ * Copyright (C) 2019 Waldemar Kozaczuk
+ *
+ * This work is open source software, licensed under the terms of the
+ * BSD license as described in the LICENSE file in the top-level directory.
+ */
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+@RunWith(Suite.class)
+...@Suite.SuiteClasses({
+ BasicTest.class
+})
+public class BasicTests {
+}
diff --git a/modules/openjdk7/module.py b/modules/openjdk7/module.py
--- a/modules/openjdk7/module.py
+++ b/modules/openjdk7/module.py
@@ -12,6 +12,7 @@
usr_files.add('${jdkbase}').to('/usr/lib/jvm/java') \
.include('lib/**') \
.include('jre/**') \
+ .include('bin/java') \
.exclude('jre/lib/security/cacerts') \
.exclude('jre/lib/audio/**')
diff --git a/scripts/test.py b/scripts/test.py
--- a/scripts/test.py
+++ b/scripts/test.py
@@ -32,6 +32,8 @@
-Disolates.jar=/tests/java/isolates.jar org.junit.runner.JUnitCore
io.osv.AllTestsThatTestIsolatedApp'),
SingleCommandTest('java_non_isolated', '/java.so -cp
/tests/java/tests.jar:/tests/java/isolates.jar \
-Disolates.jar=/tests/java/isolates.jar org.junit.runner.JUnitCore
io.osv.AllTestsThatTestNonIsolatedApp'),
+ SingleCommandTest('java_no_wrapper', '/usr/lib/jvm/java/bin/java -cp
/tests/java/tests.jar \
+ org.junit.runner.JUnitCore io.osv.BasicTests !'),
SingleCommandTest('java-perms', '/java_isolated.so -cp
/tests/java/tests.jar io.osv.TestDomainPermissions'),
])