8274980: Improve adhoc build version strings

Reviewed-by: shade, erikj
This commit is contained in:
Magnus Ihse Bursie 2022-02-14 10:31:42 +00:00
parent c61d629add
commit 95f198b2b1
7 changed files with 83 additions and 64 deletions

View File

@ -183,7 +183,6 @@ jobs:
--with-conf-name=linux-x64
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-version-build=0
--with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}
--with-jtreg=${HOME}/jtreg
--with-gtest=${GITHUB_WORKSPACE}/gtest
@ -201,8 +200,8 @@ jobs:
with:
name: transient_jdk-linux-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: |
jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz
jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz
jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin${{ matrix.artifact }}.tar.gz
jdk/build/linux-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz
linux_x64_test:
name: Linux x64
@ -308,23 +307,23 @@ jobs:
- name: Unpack jdk
run: |
mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }}"
mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin${{ matrix.artifact }}"
- name: Unpack tests
run: |
mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}"
mkdir -p "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin-tests${{ matrix.artifact }}"
- name: Find root of jdk image dir
run: |
imageroot=`find ${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin${{ matrix.artifact }} -name release -type f`
imageroot=`find ${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin${{ matrix.artifact }} -name release -type f`
echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
- name: Run tests
run: >
JDK_IMAGE_DIR=${{ env.imageroot }}
TEST_IMAGE_DIR=${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin-tests${{ matrix.artifact }}
TEST_IMAGE_DIR=${HOME}/jdk-linux-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin-tests${{ matrix.artifact }}
BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}
JT_HOME=${HOME}/jtreg
make test-prebuilt
@ -477,12 +476,12 @@ jobs:
- name: Unpack build JDK
run: |
mkdir -p "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
tar -xf "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin.tar.gz" -C "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin"
mkdir -p "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin"
tar -xf "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin.tar.gz" -C "${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin"
- name: Find root of build JDK image dir
run: |
build_jdk_root=`find ${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x64_bin -name release -type f`
build_jdk_root=`find ${HOME}/jdk-linux-x64/jdk-${{ env.JDK_VERSION }}-internal_linux-x64_bin -name release -type f`
echo "build_jdk_root=`dirname ${build_jdk_root}`" >> $GITHUB_ENV
- name: Update apt
@ -550,7 +549,6 @@ jobs:
${{ matrix.flags }}
${{ env.cross_flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-version-build=0
--with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}
--with-build-jdk=${{ env.build_jdk_root }}
--with-default-make-target="hotspot"
@ -649,7 +647,6 @@ jobs:
--with-target-bits=32
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-version-build=0
--with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}
--with-jtreg=${HOME}/jtreg
--with-gtest=${GITHUB_WORKSPACE}/gtest
@ -667,8 +664,8 @@ jobs:
with:
name: transient_jdk-linux-x86${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: |
jdk/build/linux-x86/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}.tar.gz
jdk/build/linux-x86/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}.tar.gz
jdk/build/linux-x86/bundles/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin${{ matrix.artifact }}.tar.gz
jdk/build/linux-x86/bundles/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin-tests${{ matrix.artifact }}.tar.gz
linux_x86_test:
name: Linux x86
@ -775,23 +772,23 @@ jobs:
- name: Unpack jdk
run: |
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }}"
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin${{ matrix.artifact }}"
- name: Unpack tests
run: |
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}"
mkdir -p "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin-tests${{ matrix.artifact }}"
- name: Find root of jdk image dir
run: |
imageroot=`find ${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin${{ matrix.artifact }} -name release -type f`
imageroot=`find ${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin${{ matrix.artifact }} -name release -type f`
echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
- name: Run tests
run: >
JDK_IMAGE_DIR=${{ env.imageroot }}
TEST_IMAGE_DIR=${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_linux-x86_bin-tests${{ matrix.artifact }}
TEST_IMAGE_DIR=${HOME}/jdk-linux-x86${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_linux-x86_bin-tests${{ matrix.artifact }}
BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}
JT_HOME=${HOME}/jtreg
make test-prebuilt
@ -927,7 +924,6 @@ jobs:
--openjdk-target=aarch64-unknown-cygwin
${{ matrix.flags }}
--with-version-opt="$env:GITHUB_ACTOR-$env:GITHUB_SHA"
--with-version-build=0
--with-boot-jdk="$env:BOOT_JDK"
--with-default-make-target="hotspot"
working-directory: jdk
@ -1039,7 +1035,6 @@ jobs:
--with-msvc-toolset-version=14.28
${{ matrix.flags }}
--with-version-opt="$env:GITHUB_ACTOR-$env:GITHUB_SHA"
--with-version-build=0
--with-boot-jdk="$env:BOOT_JDK"
--with-jtreg="$env:JT_HOME"
--with-gtest="$env:GTEST"
@ -1059,9 +1054,9 @@ jobs:
with:
name: transient_jdk-windows-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: |
jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}.zip
jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}.tar.gz
jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols.tar.gz
jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin${{ matrix.artifact }}.zip
jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin-tests${{ matrix.artifact }}.tar.gz
jdk/build/windows-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin${{ matrix.artifact }}-symbols.tar.gz
windows_x64_test:
name: Windows x64
@ -1181,21 +1176,21 @@ jobs:
- name: Unpack jdk
run: |
mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}.zip" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}"
mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin${{ matrix.artifact }}.zip" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin${{ matrix.artifact }}"
- name: Unpack symbols
run: |
mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols"
tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols.tar.gz" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }}-symbols"
mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin${{ matrix.artifact }}-symbols"
tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin${{ matrix.artifact }}-symbols.tar.gz" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin${{ matrix.artifact }}-symbols"
- name: Unpack tests
run: |
mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}"
mkdir -p "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin-tests${{ matrix.artifact }}"
- name: Find root of jdk image dir
run: echo ("imageroot=" + (Get-ChildItem -Path $HOME/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin${{ matrix.artifact }} -Filter release -Recurse -ErrorAction SilentlyContinue -Force).DirectoryName) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8
run: echo ("imageroot=" + (Get-ChildItem -Path $HOME/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin${{ matrix.artifact }} -Filter release -Recurse -ErrorAction SilentlyContinue -Force).DirectoryName) | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8
- name: Run tests
run: >
@ -1203,7 +1198,7 @@ jobs:
$env:Path = $env:Path -split ";" -match "C:\\Windows|PowerShell|cygwin" -join ";" ;
$env:JDK_IMAGE_DIR = cygpath "${{ env.imageroot }}" ;
$env:SYMBOLS_IMAGE_DIR = cygpath "${{ env.imageroot }}" ;
$env:TEST_IMAGE_DIR = cygpath "$HOME/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_windows-x64_bin-tests${{ matrix.artifact }}" ;
$env:TEST_IMAGE_DIR = cygpath "$HOME/jdk-windows-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_windows-x64_bin-tests${{ matrix.artifact }}" ;
$env:BOOT_JDK = cygpath "$HOME/bootjdk/$env:BOOT_JDK_VERSION" ;
$env:JT_HOME = cygpath "$HOME/jtreg" ;
& make test-prebuilt
@ -1346,7 +1341,6 @@ jobs:
--with-conf-name=macos-x64
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-version-build=0
--with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home
--with-jtreg=${HOME}/jtreg
--with-gtest=${GITHUB_WORKSPACE}/gtest
@ -1364,8 +1358,8 @@ jobs:
with:
name: transient_jdk-macos-x64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: |
jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }}.tar.gz
jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}.tar.gz
jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin${{ matrix.artifact }}.tar.gz
jdk/build/macos-x64/bundles/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin-tests${{ matrix.artifact }}.tar.gz
macos_aarch64_build:
name: macOS aarch64
@ -1449,7 +1443,6 @@ jobs:
--openjdk-target=aarch64-apple-darwin
${{ matrix.flags }}
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
--with-version-build=0
--with-boot-jdk=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home
--with-jtreg=${HOME}/jtreg
--with-gtest=${GITHUB_WORKSPACE}/gtest
@ -1467,8 +1460,8 @@ jobs:
with:
name: transient_jdk-macos-aarch64${{ matrix.artifact }}_${{ needs.prerequisites.outputs.bundle_id }}
path: |
jdk/build/macos-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-aarch64_bin${{ matrix.artifact }}.tar.gz
jdk/build/macos-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal+0_macos-aarch64_bin-tests${{ matrix.artifact }}.tar.gz
jdk/build/macos-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal_macos-aarch64_bin${{ matrix.artifact }}.tar.gz
jdk/build/macos-aarch64/bundles/jdk-${{ env.JDK_VERSION }}-internal_macos-aarch64_bin-tests${{ matrix.artifact }}.tar.gz
macos_x64_test:
@ -1575,13 +1568,13 @@ jobs:
- name: Unpack jdk
run: |
mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }}"
mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin${{ matrix.artifact }}"
- name: Unpack tests
run: |
mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}"
mkdir -p "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin-tests${{ matrix.artifact }}"
tar -xf "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin-tests${{ matrix.artifact }}.tar.gz" -C "${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin-tests${{ matrix.artifact }}"
- name: Install dependencies
run: brew install make
@ -1591,13 +1584,13 @@ jobs:
- name: Find root of jdk image dir
run: |
imageroot=`find ${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin${{ matrix.artifact }} -name release -type f`
imageroot=`find ${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin${{ matrix.artifact }} -name release -type f`
echo "imageroot=`dirname ${imageroot}`" >> $GITHUB_ENV
- name: Run tests
run: >
JDK_IMAGE_DIR=${{ env.imageroot }}
TEST_IMAGE_DIR=${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal+0_macos-x64_bin-tests${{ matrix.artifact }}
TEST_IMAGE_DIR=${HOME}/jdk-macos-x64${{ matrix.artifact }}/jdk-${{ env.JDK_VERSION }}-internal_macos-x64_bin-tests${{ matrix.artifact }}
BOOT_JDK=${HOME}/bootjdk/${BOOT_JDK_VERSION}/Contents/Home
JT_HOME=${HOME}/jtreg
gmake test-prebuilt

View File

@ -131,7 +131,7 @@ JAVA_PLATFORM := Java Platform
ifeq ($(IS_DRAFT), true)
DRAFT_MARKER_STR := <br><strong>DRAFT $(VERSION_STRING)</strong>
ifeq ($(VERSION_BUILD), 0)
ifeq ($(VERSION_BUILD), )
DRAFT_MARKER_TITLE := $(SPACE)[ad-hoc build]
else
DRAFT_MARKER_TITLE := $(SPACE)[build $(VERSION_BUILD)]

View File

@ -199,6 +199,10 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
&& test "x$VERSION_BUILD$VERSION_OPT" = x; then
AC_MSG_ERROR([Version string contains + but both 'BUILD' and 'OPT' are missing])
fi
if test "x$VERSION_BUILD" = x0; then
AC_MSG_WARN([Version build 0 is interpreted as no build number])
VERSION_BUILD=
fi
# Stop the version part process from setting default values.
# We still allow them to explicitly override though.
NO_DEFAULT_VERSION_PARTS=true
@ -250,9 +254,10 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
fi
else
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
# Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
# Default is to calculate a string like this:
# 'adhoc.<username>.<base dir name>'
# Outer [ ] to quote m4.
[ basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'` ]
[ basedirname=`$BASENAME "$WORKSPACE_ROOT" | $TR -d -c '[a-z][A-Z][0-9].-'` ]
VERSION_OPT="adhoc.$USERNAME.$basedirname"
fi
fi
@ -271,13 +276,15 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
VERSION_BUILD=
else
JDKVER_CHECK_AND_SET_NUMBER(VERSION_BUILD, $with_version_build)
if test "x$VERSION_BUILD" = "x0"; then
AC_MSG_WARN([--with-version-build=0 is interpreted as --without-version-build])
VERSION_BUILD=
fi
fi
else
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
# Default is to not have a build number.
VERSION_BUILD=""
# FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
VERSION_BUILD=0
fi
fi
@ -450,14 +457,23 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
for i in 1 2 3 4 5 6 ; do stripped_version_number=${stripped_version_number%.0} ; done
VERSION_NUMBER=$stripped_version_number
# The complete version string, with additional build information
if test "x$VERSION_BUILD$VERSION_OPT" = x; then
VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
else
# If either build or opt is set, we need a + separator
VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
# A build number of "0" is interpreted as "no build number".
if test "x$VERSION_BUILD" = x0; then
VERSION_BUILD=
fi
# Compute the complete version string, with additional build information
version_with_pre=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
if test "x$VERSION_BUILD" != x || \
( test "x$VERSION_OPT" != x && test "x$VERSION_PRE" = x ); then
# As per JEP 223, if build is set, or if opt is set but not pre,
# we need a + separator
version_with_build=$version_with_pre+$VERSION_BUILD
else
version_with_build=$version_with_pre
fi
VERSION_STRING=$version_with_build${VERSION_OPT:+-$VERSION_OPT}
# The short version string, just VERSION_NUMBER and PRE, if present.
VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}

View File

@ -239,7 +239,7 @@ VERSION_DOCS_API_SINCE := @VERSION_DOCS_API_SINCE@
JDK_SOURCE_TARGET_VERSION := @JDK_SOURCE_TARGET_VERSION@
# Convenience CFLAGS settings for passing version information into native programs.
VERSION_CFLAGS := \
VERSION_CFLAGS = \
-DVERSION_FEATURE=$(VERSION_FEATURE) \
-DVERSION_INTERIM=$(VERSION_INTERIM) \
-DVERSION_UPDATE=$(VERSION_UPDATE) \
@ -419,7 +419,7 @@ GTEST_FRAMEWORK_SRC := @GTEST_FRAMEWORK_SRC@
# Source file for cacerts
CACERTS_FILE=@CACERTS_FILE@
# Source folder for user provided cacerts PEM files
# Source folder for user provided cacerts PEM files
CACERTS_SRC=@CACERTS_SRC@
# Enable unlimited crypto policy
@ -929,7 +929,12 @@ JDK_MACOSX_CONTENTS_DIR=$(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
JRE_MACOSX_CONTENTS_DIR=$(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_CONTENTS_SUBDIR)
# Bundle names
BASE_NAME := $(VERSION_SHORT)+$(VERSION_BUILD)_$(OPENJDK_TARGET_BUNDLE_PLATFORM)
ifneq ($(VERSION_BUILD), )
BASE_NAME := $(VERSION_SHORT)+$(VERSION_BUILD)_$(OPENJDK_TARGET_BUNDLE_PLATFORM)
else
BASE_NAME := $(VERSION_SHORT)_$(OPENJDK_TARGET_BUNDLE_PLATFORM)
endif
ifeq ($(DEBUG_LEVEL), fastdebug)
DEBUG_PART := -debug
else ifneq ($(DEBUG_LEVEL), release)

View File

@ -1,5 +1,5 @@
#
# Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2013, 2021, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@ -61,6 +61,11 @@ else
OPENJDK_TARGET_CPU_VM_VERSION := $(OPENJDK_TARGET_CPU)
endif
ifeq ($(VERSION_BUILD), )
# Hotspot cannot handle an empty build number
VERSION_BUILD := 0
endif
CFLAGS_VM_VERSION := \
$(VERSION_CFLAGS) \
-DHOTSPOT_VERSION_STRING='"$(VERSION_STRING)"' \

View File

@ -249,7 +249,7 @@ public class Basic {
}
Optional<String> javaVerPre
= (ver.length == 2)
= (ver.length >= 2)
? Optional.ofNullable(ver[1])
: Optional.empty();
if (!javaVerPre.equals(current.pre())) {

View File

@ -49,7 +49,7 @@ public class InfoOptsTest extends OptionModesTester {
String specVersion = System.getProperty("java.specification.version");
testInfoOpt("-version", "javac", specVersion);
testInfoOpt("-fullversion", "javac", specVersion, "+");
testInfoOpt("-fullversion", "javac", specVersion);
}
void testInfoOpt(String opt, String... expect) {