Skip to content

Commit

Permalink
Rename openjdkbinary folder to jdkbinary (#4837)
Browse files Browse the repository at this point in the history
Signed-off-by: Lan Xia <Lan_Xia@ca.ibm.com>
  • Loading branch information
llxia authored Oct 31, 2023
1 parent 86014be commit 06f5612
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 27 deletions.
24 changes: 12 additions & 12 deletions buildenv/jenkins/JenkinsfileBase
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def setupEnv() {
CLOUD_PROVIDER = params.CLOUD_PROVIDER ? params.CLOUD_PROVIDER : ""
env.JDK_BRANCH = params.JDK_BRANCH ? params.JDK_BRANCH : ""
env.USER_CREDENTIALS_ID = params.USER_CREDENTIALS_ID ? params.USER_CREDENTIALS_ID : ""
env.TEST_JDK_HOME = "$WORKSPACE/openjdkbinary/j2sdk-image"
env.TEST_JDK_HOME = "$WORKSPACE/jdkbinary/j2sdk-image"
env.JVM_VERSION = params.JVM_VERSION ? params.JVM_VERSION : ""
env.JVM_OPTIONS = params.JVM_OPTIONS ? params.JVM_OPTIONS : ""
env.APPLICATION_OPTIONS = params.APPLICATION_OPTIONS ? params.APPLICATION_OPTIONS : ""
Expand Down Expand Up @@ -408,7 +408,7 @@ def setup() {

if (SDK_RESOURCE == 'upstream' && !params.CUSTOMIZED_SDK_URL) {
timeout(time: 1, unit: 'HOURS') {
dir('openjdkbinary') {
dir('jdkbinary') {
step([$class: 'CopyArtifact',
fingerprintArtifacts: true,
flatten: true,
Expand Down Expand Up @@ -508,14 +508,14 @@ def setup_jck_interactives() {
if (jckRunDirExists) {
def jdkDir = ""
if (PLATFORM.contains("windows")) {
jdkDir = sh(script: "unzip -l `pwd`/openjdkbinary/${tarBall} | head -n 4 | tail -n 1 | xargs -n 1 echo | tail -n 1", returnStdout: true).trim().replaceFirst(".\$","")
jdkDir = sh(script: "unzip -l `pwd`/jdkbinary/${tarBall} | head -n 4 | tail -n 1 | xargs -n 1 echo | tail -n 1", returnStdout: true).trim().replaceFirst(".\$","")
if (PLATFORM.contains("x86-32_windows")) {
jdkDir = "${jdkDir}_32"
} else if (PLATFORM.contains("x86-64_windows")) {
jdkDir = "${jdkDir}_64"
}
} else {
jdkDir = sh(script: "tar -tf `pwd`/openjdkbinary/${tarBall} | head -1", returnStdout: true).trim().replaceFirst(".\$","")
jdkDir = sh(script: "tar -tf `pwd`/jdkbinary/${tarBall} | head -1", returnStdout: true).trim().replaceFirst(".\$","")
}
def jckRunDir = "${targetDir}/${jdkDir}"
def jckRunJDKExists = sh(script: """
Expand Down Expand Up @@ -646,12 +646,12 @@ def buildTest() {
}
}

if (fileExists('openjdkbinary/openjdk-test-image')) {
env.TESTIMAGE_PATH = "$WORKSPACE/openjdkbinary/openjdk-test-image"
if (fileExists('jdkbinary/openjdk-test-image')) {
env.TESTIMAGE_PATH = "$WORKSPACE/jdkbinary/openjdk-test-image"
}

if (fileExists('openjdkbinary/openjdk-test-image/openj9')) {
env.NATIVE_TEST_LIBS = "$WORKSPACE/openjdkbinary/openjdk-test-image/openj9"
if (fileExists('jdkbinary/openjdk-test-image/openj9')) {
env.NATIVE_TEST_LIBS = "$WORKSPACE/jdkbinary/openjdk-test-image/openj9"
}

if (!params.DYNAMIC_COMPILE) {
Expand All @@ -667,7 +667,7 @@ def buildTest() {

if (params.CODE_COVERAGE) {
echo "Clean gcda files before generating new Code Coverage info"
sh "find ${WORKSPACE}/openjdkbinary/j2sdk-image -name '*.gcda' -type f -delete"
sh "find ${WORKSPACE}/jdkbinary/j2sdk-image -name '*.gcda' -type f -delete"
}
}
}
Expand Down Expand Up @@ -730,9 +730,9 @@ def runTest( ) {

if (params.CODE_COVERAGE) {
echo 'Generating Code Coverage Reports...'
dir("$WORKSPACE/openjdkbinary/j2sdk-image") {
dir("$WORKSPACE/jdkbinary/j2sdk-image") {
// Current lcov generates "Cannot open source file" info, but does not affect results, since Build and Test paths difference are corrected after summary.
sh "lcov --capture --quiet --directory . --output-file codeCoverageInfoOrigin.info --rc geninfo_adjust_src_path='/home/jenkins/workspace/ => ${WORKSPACE}/openjdkbinary/j2sdk-image/jenkins/workspace/'"
sh "lcov --capture --quiet --directory . --output-file codeCoverageInfoOrigin.info --rc geninfo_adjust_src_path='/home/jenkins/workspace/ => ${WORKSPACE}/jdkbinary/j2sdk-image/jenkins/workspace/'"
sh "lcov --quiet --output-file codeCoverageInfoFinal.info --remove codeCoverageInfoOrigin.info '/usr/include/*' '/usr/local/*' '/home/*/attrlookup.gperf'"
sh "genhtml --quiet codeCoverageInfoFinal.info --output-directory code_coverage_report"
}
Expand Down Expand Up @@ -873,7 +873,7 @@ def post(output_name) {
if (params.CODE_COVERAGE) {
echo "Archive Code Coverage Report"
def code_coverage_report_tar_name = "${output_name}_code_coverage_report${suffix}"
dir("${WORKSPACE}/openjdkbinary/j2sdk-image") {
dir("${WORKSPACE}/jdkbinary/j2sdk-image") {
if (tar_cmd.startsWith('tar')) {
sh "${tar_cmd} - ${pax_opt} codeCoverageInfoFinal.info code_coverage_report ${tar_cmd_suffix} > ${code_coverage_report_tar_name}"
} else {
Expand Down
22 changes: 11 additions & 11 deletions get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ getBinaryOpenjdk()
{
echo "get jdk binary..."
cd $SDKDIR
mkdir -p openjdkbinary
cd openjdkbinary
mkdir -p jdkbinary
cd jdkbinary

if [ "$SDK_RESOURCE" != "upstream" ]; then
if [ "$(ls -A $SDKDIR/openjdkbinary)" ]; then
echo "$SDKDIR/openjdkbinary is not an empty directory, please empty it or specify a different SDK directory."
if [ "$(ls -A $SDKDIR/jdkbinary)" ]; then
echo "$SDKDIR/jdkbinary is not an empty directory, please empty it or specify a different SDK directory."
echo "This directory is used to download SDK resources into it and the script will not overwrite its contents."
exit 1
fi
Expand Down Expand Up @@ -349,7 +349,7 @@ getBinaryOpenjdk()
# Otherwise, files will be extracted under ./tmp
if [[ "$jar_name" =~ "debug-image" ]] || [[ "$jar_name" =~ "debugimage" ]]; then
extract_dir="./j2sdk-image"
if [ -d "$SDKDIR/openjdkbinary/j2sdk-image/jre" ]; then
if [ -d "$SDKDIR/jdkbinary/j2sdk-image/jre" ]; then
extract_dir="./j2sdk-image/jre"
fi
echo "Uncompressing $jar_name over $extract_dir..."
Expand All @@ -364,10 +364,10 @@ getBinaryOpenjdk()
fi
fi
else
if [ -d "$SDKDIR/openjdkbinary/tmp" ]; then
rm -rf $SDKDIR/openjdkbinary/tmp/*
if [ -d "$SDKDIR/jdkbinary/tmp" ]; then
rm -rf $SDKDIR/jdkbinary/tmp/*
else
mkdir $SDKDIR/openjdkbinary/tmp
mkdir $SDKDIR/jdkbinary/tmp
fi
echo "Uncompressing file: $jar_name ..."
if [[ $jar_name == *zip ]] || [[ $jar_name == *jar ]]; then
Expand All @@ -379,7 +379,7 @@ getBinaryOpenjdk()
gzip -cd $jar_name | (cd tmp && tar xof -)
fi

cd $SDKDIR/openjdkbinary/tmp
cd $SDKDIR/jdkbinary/tmp
jar_dirs=`ls -d */`
jar_dir_array=(${jar_dirs//\\n/ })
len=${#jar_dir_array[@]}
Expand Down Expand Up @@ -429,7 +429,7 @@ getBinaryOpenjdk()
elif [ "$len" -gt 1 ]; then
mv ../tmp ../j2sdk-image
fi
cd $SDKDIR/openjdkbinary
cd $SDKDIR/jdkbinary
fi
done

Expand Down Expand Up @@ -660,7 +660,7 @@ testJavaVersion()
{
# use environment variable TEST_JDK_HOME to run java -version
if [ "$TEST_JDK_HOME" = "" ]; then
TEST_JDK_HOME=$SDKDIR/openjdkbinary/j2sdk-image
TEST_JDK_HOME=$SDKDIR/jdkbinary/j2sdk-image
fi
_java=${TEST_JDK_HOME}/bin/java
_release=${TEST_JDK_HOME}/release
Expand Down
2 changes: 1 addition & 1 deletion jck/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ docker run -it -v <path_to_aqa-tests_root>:/test -v <jck_material_root>:/jck op
// within docker container
cd /test
bash get.sh --testdir /test --customizedURL https://api.adoptopenjdk.net/openjdk8-openj9/nightly/x64_linux/latest/binary --sdkdir /java
export TEST_JDK_HOME=/java/openjdkbinary/j2sdk-image
export TEST_JDK_HOME=/java/jdkbinary/j2sdk-image
export BUILD_LIST=jck
export JCK_GIT_REPO=git@github.com:mypretendcompany/jck8tests.git
export JCK_ROOT=/jck/jck8tests
Expand Down
2 changes: 1 addition & 1 deletion jck/jck-semiauto-updater/jckupdater.sh
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ getJCKSources() {
#install Java
get_JAVA_SDK(){
if [[ $JAVA_HOME = "" ]] ; then
cd $WORKSPACE/../../../../openjdkbinary/j2sdk-image
cd $WORKSPACE/../../../../jdkbinary/j2sdk-image
JAVA_SDK_PATH="$(pwd)"
echo $JAVA_SDK_PATH
$JAVA_SDK_PATH/bin/java -version
Expand Down
4 changes: 2 additions & 2 deletions terminateTestProcesses.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ if [ "$OS" = "Windows_NT" ]; then

# Match anything that is most likely a test job or process related
match_str="(CommandLine like '%java%jck%' or \
CommandLine like '%openjdkbinary%java%' or \
CommandLine like '%jdkbinary%java%' or \
CommandLine like '%java%javatest%' or \
CommandLine like '%java%-Xfuture%' or \
CommandLine like '%rmid%' or \
Expand Down Expand Up @@ -42,7 +42,7 @@ else
echo "Unix type machine.."

# Match anything that is most likely a jck test job or process related
match_str="java.*jck|openjdkbinary.*java|java.*javatest|java.*-Xfuture|X.*vfb|rmid|rmiregistry|tnameserv|make"
match_str="java.*jck|jdkbinary.*java|java.*javatest|java.*-Xfuture|X.*vfb|rmid|rmiregistry|tnameserv|make"

# Ignore Jenkins agent and grep cmd
ignore_str="remoting.jar|agent.jar|grep"
Expand Down

0 comments on commit 06f5612

Please sign in to comment.