components/junit/Makefile
author Rich Burridge <rich.burridge@oracle.com>
Thu, 03 Dec 2015 06:23:05 -0800
changeset 5146 c60fe986692f
parent 4700 3e0131debf7c
child 5682 94c0ca64c022
permissions -rw-r--r--
17329146 junit build leaves crud in /var/tmp
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
318
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     1
#
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     3
#
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     7
#
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    12
#
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    18
#
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    20
#
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2036
diff changeset
    21
# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
318
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    22
#
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    23
include ../../make-rules/shared-macros.mk
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    24
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    25
COMPONENT_NAME=		junit
1178
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    26
COMPONENT_VERSION=	4.11
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    27
COMPONENT_PROJECT_URL=	https://github.com/junit-team/junit/archive
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    28
COMPONENT_SRC=		$(COMPONENT_NAME)-r$(COMPONENT_VERSION)
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    29
COMPONENT_ARCHIVE=	r$(COMPONENT_VERSION).zip
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 772
diff changeset
    30
COMPONENT_ARCHIVE_HASH=	\
1178
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    31
    sha256:3048cb3f2b07fada9d85b2c042bbedb93892ef70c1dcfe0594124850418f9ffb
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    32
COMPONENT_ARCHIVE_URL=  $(COMPONENT_PROJECT_URL)/$(COMPONENT_ARCHIVE)
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    33
COMPONENT_BUGDB=	utility/junit
318
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    34
2036
3bb5e6819aea 19078514 junit version 4.11 needs a TPNO in the fullness of time
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1434
diff changeset
    35
TPNO=                   9070
3bb5e6819aea 19078514 junit version 4.11 needs a TPNO in the fullness of time
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1434
diff changeset
    36
3817
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2036
diff changeset
    37
include $(WS_MAKE_RULES)/prep.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2036
diff changeset
    38
include $(WS_MAKE_RULES)/ant.mk
30b42c38bbc4 15786608 SUNBT7162754 create new meta package developer/opensolaris/userland
Norm Jacobs <Norm.Jacobs@Sun.COM>
parents: 2036
diff changeset
    39
include $(WS_MAKE_RULES)/ips.mk
318
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    40
1178
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    41
# These ARGS override what is set in build.xml
318
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    42
COMPONENT_BUILD_ARGS 	+= -Ddist=${PROTO_DIR}
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    43
COMPONENT_BUILD_ARGS    += -Djavadocdir=${PROTO_DIR}
1178
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    44
COMPONENT_BUILD_ARGS    += -Dversion-status=""
4197
67d7270f6817 19789496 junit does not build with java 8
Craig Mohrman <craig.mohrman@oracle.com>
parents: 3959
diff changeset
    45
COMPONENT_BUILD_ARGS    += -Dadditionalparam="-Xdoclint:none"
4700
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    46
COMPONENT_BUILD_TARGETS  = populate-dist
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    47
5146
c60fe986692f 17329146 junit build leaves crud in /var/tmp
Rich Burridge <rich.burridge@oracle.com>
parents: 4700
diff changeset
    48
COMPONENT_PRE_BUILD_ACTION =	$(MKDIR) $(@D)/tmp
c60fe986692f 17329146 junit build leaves crud in /var/tmp
Rich Burridge <rich.burridge@oracle.com>
parents: 4700
diff changeset
    49
COMPONENT_BUILD_ENV +=	"_JAVA_OPTIONS=-Djava.io.tmpdir=$(BUILD_DIR_32)/tmp"
c60fe986692f 17329146 junit build leaves crud in /var/tmp
Rich Burridge <rich.burridge@oracle.com>
parents: 4700
diff changeset
    50
4700
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    51
# We patched in test-build into build.xml which is a copy of
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    52
# dist but without the depends=populate-dist
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    53
# because userland infrasture will handle the build and we
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    54
# need to build tests which are also part of the overall softare build.
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    55
COMPONENT_TEST_ARGS	+= $(COMPONENT_BUILD_ARGS)
5146
c60fe986692f 17329146 junit build leaves crud in /var/tmp
Rich Burridge <rich.burridge@oracle.com>
parents: 4700
diff changeset
    56
COMPONENT_TEST_ENV	+= "_JAVA_OPTIONS=-Djava.io.tmpdir=$(BUILD_DIR_32)/tmp"
4700
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    57
COMPONENT_TEST_TARGETS	 = test-build
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    58
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    59
COMPONENT_SYSTEM_TEST_ARGS	+= -Dsystem-binjar=/usr/share/lib/java/$(COMPONENT_NAME).jar
5146
c60fe986692f 17329146 junit build leaves crud in /var/tmp
Rich Burridge <rich.burridge@oracle.com>
parents: 4700
diff changeset
    60
COMPONENT_SYSTEM_TEST_ENV	+= "_JAVA_OPTIONS=-Djava.io.tmpdir=$(BUILD_DIR_32)/tmp"
4700
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    61
COMPONENT_SYSTEM_TEST_TARGETS	 = test
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    62
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    63
# Test transforms
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    64
# 	remove everything upto "test" which is build noise
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    65
#	remove time
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    66
COMPONENT_TEST_TRANSFORMS += \
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    67
	'-e "1,/^test/d"' \
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    68
	'-e "s/.*[Tt]ime.*$$//"'
318
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    69
1434
c782e620dd26 17296512 Add ASLR_NOT_APPLICABLE as an ASLR mode in Userland
Rich Burridge <rich.burridge@oracle.com>
parents: 1178
diff changeset
    70
ASLR_MODE = $(ASLR_NOT_APPLICABLE)
c782e620dd26 17296512 Add ASLR_NOT_APPLICABLE as an ASLR mode in Userland
Rich Burridge <rich.burridge@oracle.com>
parents: 1178
diff changeset
    71
318
3ed992b12a6c 7054498 Move JUnit to Userland
Srinivasa Sarva <srinivasa.sarva@oracle.com>
parents:
diff changeset
    72
build:		$(BUILD_32)
5146
c60fe986692f 17329146 junit build leaves crud in /var/tmp
Rich Burridge <rich.burridge@oracle.com>
parents: 4700
diff changeset
    73
c60fe986692f 17329146 junit build leaves crud in /var/tmp
Rich Burridge <rich.burridge@oracle.com>
parents: 4700
diff changeset
    74
install:	build
1178
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    75
4700
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    76
# Another test is:
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    77
# To test after you have installed the resulting package do:
1178
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    78
# $ java -cp /usr/share/lib/java/junit.jar:/usr/share/doc/junit/samples/org \
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    79
#       junit/samples/money/MoneyTest
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    80
# ......................
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    81
# Time: 0.003
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    82
#
640a1a5dcf77 15998720 junit randomly fails a test with jdk 1.7
Craig Mohrman <craig.mohrman@oracle.com>
parents: 1165
diff changeset
    83
# OK (22 tests)
4339
6501cf9c29f9 21116842 add system-test targets to each component Makefile and to top-level Makefiles
Stacy Yeh <stacy.yeh@oracle.com>
parents: 4197
diff changeset
    84
4700
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    85
test:		$(TEST_32)
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    86
3e0131debf7c 20217156 junit should have its tests hooked up in the Makefile
Craig Mohrman <craig.mohrman@oracle.com>
parents: 4339
diff changeset
    87
system-test:    build $(SYSTEM_TEST_32)
5146
c60fe986692f 17329146 junit build leaves crud in /var/tmp
Rich Burridge <rich.burridge@oracle.com>
parents: 4700
diff changeset
    88
4197
67d7270f6817 19789496 junit does not build with java 8
Craig Mohrman <craig.mohrman@oracle.com>
parents: 3959
diff changeset
    89
REQUIRED_PACKAGES += runtime/java/jre-8