File: rules

package info (click to toggle)
jtreg7 7.5.1%2B1%2Bds1-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 51,224 kB
  • sloc: java: 409,123; xml: 8,266; sh: 1,966; ansic: 1,084; exp: 689; makefile: 387; javascript: 162; cpp: 120
file content (63 lines) | stat: -rwxr-xr-x 2,557 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/make -f

JAVA_HOME = /usr/lib/jvm/default-java

# version string has the form 7.1+N[+ds]-D, the Debian release is not passed into the build
VERSION      := $(shell dpkg-parsechangelog --show-field Version | awk -F'[+]' '{ print $$1 }')
BUILD_NUMBER := $(shell dpkg-parsechangelog --show-field Version | awk -F'[+~-]' '{ print $$2 }')
DATE         := $(shell dpkg-parsechangelog --show-field Date)
JTREG_HOME   := $(shell readlink -f build/images/jtreg)

export TESTNG_VERSION=7.5

export JTREG_HOME

export HEADLESS=1
COMMA=,

SPACE = $(EMPTY) $(EMPTY)
ifneq (,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
  NJOBS = $(subst parallel=,,$(filter parallel=%,$(subst $(COMMA), ,$(DEB_BUILD_OPTIONS))))
endif

JAVA_VERSION=$(shell java -version 2>&1)
JAVA_SPECIFICATION_VERSION=$(shell echo "${JAVA_VERSION}" | \
	grep -e ^java -e ^openjdk | \
	head -n 1 | \
	sed -e 's/^[^0-9]*\(1\.\)*\([1-9][0-9]*\).*/\2/' )

components:=apiguardian hawt-jni jansi1 jline3 picocli univocity-parsers libhamcrest-java junit4 opentest4j opentest4j-reporting junit5 testng

%:
	dh $@

override_dh_clean:
	./debian/component-scripts/clean-components.sh jtreg7 $(components)
	dh_clean

override_dh_auto_build:
	./debian/component-scripts/build-components.sh jtreg7 $(components)

	echo "=== $(VERSION) - $(BUILD_NUMBER) ==="
	mkdir -p build/classes/com/sun/javatest/regtest/tool
	mkdir -p build/test
	(cd make && make \
		ASMTOOLS_JAR=/usr/share/java/asmtools.jar \
		BUILD_DIR=../build \
		JUNIT_JARS=../junit5/debian/jtreg7/usr/share/java/junit-platform-console-standalone.jar \
		TESTNG_JARS="../testng/debian/jtreg7/usr/share/java/testng.jar /usr/share/java/guice.jar /usr/share/java/jcommander.jar /usr/share/java/slf4j-simple.jar /usr/share/java/slf4j-api.jar" \
		JAVATEST_JAR=/usr/share/java/javatest.jar \
		BUILD_DATE='$(DATE)' \
		BUILD_NUMBER=$(VERSION) \
		BUILD_VERSION_STRING="$(VERSION)-src+$(BUILD_NUMBER)" \
		BUILD_MILESTONE=src \
		JDKHOME=$(JAVA_HOME) \
		JAVA_SPECIFICATION_VERSION=$(JAVA_SPECIFICATION_VERSION) \
		BUILD_NUMBER=$(BUILD_NUMBER) -j$(NJOBS) all)

	# Generate the manpages
	JT_HOME=build/images/jtreg help2man --name="Regression Test Harness" --help-option="-help all" --version-option="-version" build/images/jtreg/bin/jtdiff > jtdiff.1
	JT_HOME=build/images/jtreg help2man --name="Regression Test Harness" --help-option="-help all" --version-option="-version" build/images/jtreg/bin/jtreg > jtreg.1

	# Make jtreg.jar writable so it is not ignored by strip-nondeterminism
	chmod +w build/images/jtreg/lib/jtreg.jar