17329146 junit build leaves crud in /var/tmp
authorRich Burridge <rich.burridge@oracle.com>
Thu, 03 Dec 2015 06:23:05 -0800
changeset 5146 c60fe986692f
parent 5145 652f7016dfd9
child 5147 e5d56640ce24
17329146 junit build leaves crud in /var/tmp
components/junit/Makefile
components/junit/test/results-32.master
--- a/components/junit/Makefile	Wed Dec 02 20:44:59 2015 -0800
+++ b/components/junit/Makefile	Thu Dec 03 06:23:05 2015 -0800
@@ -45,14 +45,19 @@
 COMPONENT_BUILD_ARGS    += -Dadditionalparam="-Xdoclint:none"
 COMPONENT_BUILD_TARGETS  = populate-dist
 
+COMPONENT_PRE_BUILD_ACTION =	$(MKDIR) $(@D)/tmp
+COMPONENT_BUILD_ENV +=	"_JAVA_OPTIONS=-Djava.io.tmpdir=$(BUILD_DIR_32)/tmp"
+
 # We patched in test-build into build.xml which is a copy of
 # dist but without the depends=populate-dist
 # because userland infrasture will handle the build and we
 # need to build tests which are also part of the overall softare build.
 COMPONENT_TEST_ARGS	+= $(COMPONENT_BUILD_ARGS)
+COMPONENT_TEST_ENV	+= "_JAVA_OPTIONS=-Djava.io.tmpdir=$(BUILD_DIR_32)/tmp"
 COMPONENT_TEST_TARGETS	 = test-build
 
 COMPONENT_SYSTEM_TEST_ARGS	+= -Dsystem-binjar=/usr/share/lib/java/$(COMPONENT_NAME).jar
+COMPONENT_SYSTEM_TEST_ENV	+= "_JAVA_OPTIONS=-Djava.io.tmpdir=$(BUILD_DIR_32)/tmp"
 COMPONENT_SYSTEM_TEST_TARGETS	 = test
 
 # Test transforms
@@ -65,8 +70,8 @@
 ASLR_MODE = $(ASLR_NOT_APPLICABLE)
 
 build:		$(BUILD_32)
-	
-install:	build	
+
+install:	build
 
 # Another test is:
 # To test after you have installed the resulting package do:
@@ -80,5 +85,5 @@
 test:		$(TEST_32)
 
 system-test:    build $(SYSTEM_TEST_32)
-		
+
 REQUIRED_PACKAGES += runtime/java/jre-8
--- a/components/junit/test/results-32.master	Wed Dec 02 20:44:59 2015 -0800
+++ b/components/junit/test/results-32.master	Thu Dec 03 06:23:05 2015 -0800
@@ -1,3 +1,4 @@
+     [java] Picked up _JAVA_OPTIONS: -Djava.io.tmpdir=$(@D)/tmp
      [java] JUnit version 4.11
      [java] ..................................................................................................................................................................................................................................................................................................................................I.I.....................................................................................................................................................................................I....................................................................................................................