Hi, I committed this patch, but I also have a question below:
-- Nadav Har'El [email protected] On Thu, Dec 22, 2016 at 7:20 AM, Waldemar Kozaczuk <[email protected]> wrote: > This patch addresses a build issue where this build command would fail due > to both jdk 7 and 8 included: > scripts/build -j4 image=java-tests,openjdk8-fedora && scripts/test.py > --name java.* > > Following build commands should work now: > scripts/build -j4 image=java-tests && scripts/test.py --name java.* > scripts/build -j4 image=openjdk8-fedora,java-tests && scripts/test.py > --name java.* > > Signed-off-by: Waldemar Kozaczuk <[email protected]> > > --- > modules/java-tests/Makefile | 5 +---- > modules/java-tests/module.py | 17 ++--------------- > modules/java-tests/usr.manifest | 2 -- > 3 files changed, 3 insertions(+), 21 deletions(-) > > diff --git a/modules/java-tests/Makefile b/modules/java-tests/Makefile > index 7ec7028..55ca28d 100644 > --- a/modules/java-tests/Makefile > +++ b/modules/java-tests/Makefile > @@ -4,12 +4,9 @@ include $(SRC)/modules/java-base/common.gmk > ifeq ($(arch),aarch64) > java-targets := > else > -java-targets := obj/java.so obj/java_non_isolated.so > +java-targets := obj/java_non_isolated.so > endif > > -obj/java.o: $(SRC)/modules/java-base/java.cc | init > - $(call quiet, $(CXX) $(CXXFLAGS) -o $@ -c > $(SRC)/modules/java-base/java.cc -MMD, CXX $@) > - > obj/java_non_isolated.o: $(SRC)/modules/java-base/java.cc | init > $(call quiet, $(CXX) $(CXXFLAGS) -DRUN_JAVA_NON_ISOLATED -o $@ -c > $(SRC)/modules/java-base/java.cc -MMD, CXX $@) > I don't understand what this does, or what the change changes... If I understand correctly, you want to have two versions of java.so: "isolated" and "non-isolated", to test both? So now you're assuming that by default, because you are requiring "java" and that defaults to "isolated", you only need to build the non-isolated version specially? So I guess if someone now explicitly lists java-non-isolated on the build line with java-tests, it will fail? This is not a big loss (why would anybody want to do that in the first place...) but I am just wondering if that is what you expect to happen. There's another thing I don't understand - is compiling java_non_isolated.so enough to add a non-isolated Java? Don't you need to also add another jar to the image? > > diff --git a/modules/java-tests/module.py b/modules/java-tests/module.py > index 18d64ab..1e872f6 100644 > --- a/modules/java-tests/module.py > +++ b/modules/java-tests/module.py > @@ -1,25 +1,12 @@ > from osv.modules import api > from osv.modules.filemap import FileMap > -import os, os.path > > -api.require('java-base') > - > -usr_files = FileMap() > -jdkdir = os.path.basename(os.path.expandvars('${jdkbase}')) > - > -usr_files.add('${jdkbase}').to('/usr/lib/jvm/java') \ > - .include('lib/**') \ > - .include('jre/**') \ > - .exclude('jre/lib/security/cacerts') \ > - .exclude('jre/lib/audio/**') > - > -usr_files.link('/usr/lib/jvm/' + jdkdir).to('java') > -usr_files.link('/usr/lib/jvm/jre').to('java/jre') > -usr_files.link('/usr/lib/jvm/java/jre/lib/security/cacerts' > ).to('/etc/pki/java/cacerts') > +api.require('java') > > _jar = '/tests/java/tests.jar' > _isolates_jar = '/tests/java/isolates.jar' > > +usr_files = FileMap() > usr_files.add('${OSV_BASE}/modules/java-tests/tests/ > target/runjava-tests.jar').to(_jar) > usr_files.add('${OSV_BASE}/modules/java-tests/tests- > isolates/target/tests-isolates-jar-with-dependencies.jar').to(_ > isolates_jar) > > diff --git a/modules/java-tests/usr.manifest b/modules/java-tests/usr. > manifest > index 8145b19..52dd94d 100644 > --- a/modules/java-tests/usr.manifest > +++ b/modules/java-tests/usr.manifest > @@ -6,8 +6,6 @@ > # > > [manifest] > -/java.so: ${OSV_BASE}/modules/java-tests/obj/java.so > -/java/runjava-isolated.jar: ${OSV_BASE}/modules/java-base/ > runjava-isolated/target/runjava-isolated.jar > /java_non_isolated.so: ${OSV_BASE}/modules/java- > tests/obj/java_non_isolated.so > /java/runjava-non-isolated.jar: ${OSV_BASE}/modules/java-base/ > runjava-non-isolated/target/runjava-non-isolated.jar > /.java.policy: ${OSV_BASE}/modules/java-tests/.java.policy > -- > 2.7.4 > > -- > You received this message because you are subscribed to the Google Groups > "OSv Development" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
