openjdk team mailing list archive
-
openjdk team
-
Mailing list archive
-
Message #13852
[Merge] ~tdaitx/ubuntu/+source/openjdk:openjdk-11-minimum-jtreg-version into ~openjdk/ubuntu/+source/openjdk/+git/openjdk:openjdk-11
Tiago Stürmer Daitx has proposed merging ~tdaitx/ubuntu/+source/openjdk:openjdk-11-minimum-jtreg-version into ~openjdk/ubuntu/+source/openjdk/+git/openjdk:openjdk-11.
Commit message:
Set and verify that minimum jtreg versions is being used
Set minimum dependency on jtreg based on testsuite requirements and fail
during pre-build if installed jtreg version is lower then that.
Requested reviews:
Matthias Klose (doko)
For more details, see:
https://code.launchpad.net/~tdaitx/ubuntu/+source/openjdk/+git/openjdk/+merge/371600
Instead of hardcoding the minimum jtreg version in debian/rules, this change look at the required jtreg version inside TEST.ROOT files, picks the newest one (testsuites might require different minimum versions) and uses that for generating the debian/control file.
It also adds a check in pre-build so that the build will fail when the installed jtreg cannot satisfy the minimum required version - this covers the corner case where the user tries to build without regenerating a control file when a TEST.ROOT file has been updated to require a newer jtreg version.
This changes reduces the amount of manual maintenance and checks required by the maintainer and prevents builds from continuing when upstream updates its jtreg version requirements and the installed one is too old.
--
Your team OpenJDK is subscribed to branch ~openjdk/ubuntu/+source/openjdk/+git/openjdk:openjdk-11.
diff --git a/debian/changelog b/debian/changelog
index 61e525c..bbd41c7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -5,6 +5,9 @@ openjdk-11 (11.0.4+11-2) UNRELEASED; urgency=medium
[ Tiago Stürmer Daitx ]
* Properly generate Breaks: rules for bionic (fix typo).
+ * Set minimum dependency on jtreg based on testsuite requirements.
+ * Fail during pre-build if installed jtreg version is lower then
+ the minimum required version.
-- Matthias Klose <doko@xxxxxxxxxx> Wed, 17 Jul 2019 14:49:36 +0200
diff --git a/debian/control b/debian/control
index 302cb36..f57265d 100644
--- a/debian/control
+++ b/debian/control
@@ -6,7 +6,7 @@ Uploaders: Matthias Klose <doko@xxxxxxxxxx>
Build-Depends: debhelper (>= 11),
m4, lsb-release, zip, unzip,
sharutils, gawk, cpio, pkg-config, procps, wdiff, time, fastjar (>= 2:0.96-0ubuntu2),
- jtreg (>= 4.2-b12-1~) <!nocheck>, testng <!nocheck>, xvfb <!nocheck>, xauth <!nocheck>, xfonts-base <!nocheck>, libgl1-mesa-dri [!x32] <!nocheck>, xfwm4 <!nocheck>, x11-xkb-utils <!nocheck>, dbus-x11 <!nocheck>,
+ jtreg (>= 4.2-b12) <!nocheck>, testng <!nocheck>, xvfb <!nocheck>, xauth <!nocheck>, xfonts-base <!nocheck>, libgl1-mesa-dri [!x32] <!nocheck>, xfwm4 <!nocheck>, x11-xkb-utils <!nocheck>, dbus-x11 <!nocheck>,
autoconf, automake, autotools-dev, ant, ant-optional,
g++-8 <!cross>,
openjdk-11-jdk-headless:native | openjdk-10-jdk-headless:native,
diff --git a/debian/rules b/debian/rules
index 0966d64..1c39f39 100755
--- a/debian/rules
+++ b/debian/rules
@@ -612,8 +612,11 @@ ifeq (,$(filter $(distrel),precise))
nocheck_profile = $(EMPTY) <!nocheck>
endif
+# look at all TEST.ROOT for the required jtreg version, sorted by newest
+min_jtreg_version := $(shell find test/ -name TEST.ROOT -exec grep -hr "^requiredVersion=" {} \; | sed 's:^requiredVersion=::' | sort -uVr | head -n1 | tr ' ' '-')
+
bd_check = \
- jtreg (>= 4.2-b12-1~)$(nocheck_profile), testng$(nocheck_profile), \
+ jtreg (>= $(min_jtreg_version))$(nocheck_profile), testng$(nocheck_profile), \
xvfb$(nocheck_profile), xauth$(nocheck_profile), \
xfonts-base$(nocheck_profile), libgl1-mesa-dri [!x32]$(nocheck_profile), \
xfwm4$(nocheck_profile), x11-xkb-utils$(nocheck_profile), \
@@ -947,6 +950,12 @@ build_stamps = \
build_stamps += stamps/jtreg-check-default
pre-build:
+ jtreg_version="$$(dpkg-query -f '$${Version}\n' -W jtreg)"; \
+ if ! dpkg --compare-versions $(min_jtreg_version) le $$jtreg_version; then \
+ echo "Error: testsuite requires jtreg $(min_jtreg_version) but $$jtreg_version is installed"; \
+ echo "Please update the jtreg dependency and regenerate debian/control"; \
+ false; \
+ fi
ifneq (,$(filter $(DEB_HOST_ARCH),s390))
@echo explicitely fail the build for $(DEB_HOST_ARCH), patches not updated
#else ifneq (,$(filter $(DEB_HOST_ARCH),armel))
Follow ups