Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modified testScript.sh to allow for Win2012 to build JDK #942

Merged
merged 11 commits into from
Oct 30, 2019
11 changes: 11 additions & 0 deletions ansible/pbTestScripts/buildJDKWin.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash
set -eu
export TARGET_OS=linux
Willsparker marked this conversation as resolved.
Show resolved Hide resolved
export ARCHITECTURE=x64
export JAVA_TO_BUILD=jdk8u
export VARIANT=openj9
Willsparker marked this conversation as resolved.
Show resolved Hide resolved
export JDK7_BOOT_DIR=/usr/lib/jvm/java-1.7.0
export JDK_BOOT_DIR=/usr/lib/jvm/java-8-openjdk-amd64
Willsparker marked this conversation as resolved.
Show resolved Hide resolved
echo $PATH
export PATH=/usr/bin:$PATH
/cygdrive/c/openjdk-build/build-farm/make-adopt-build-farm.sh
13 changes: 13 additions & 0 deletions ansible/pbTestScripts/testScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,15 @@ testBuild()
vagrant ssh -c "cd /vagrant/pbTestScripts && ./buildJDK.sh"
}

testBuildWin()
{
# Ensures the git config won't change line endings
vagrant powershell -c "Start-Process powershell -Verb runAs; C:/cygwin64/bin/sed -i -e 's/autocrlf.*/autocrlf = false/g' C:\\ProgramData/Git/config"
Willsparker marked this conversation as resolved.
Show resolved Hide resolved
# Clone build repo and run buildJDKWin.sh
vagrant powershell -c "cd C:/;git clone https://github.com/adoptopenjdk/openjdk-build; Start-Sleep 5"
vagrant powershell -c "cd C:\vagrant\pbTestScripts; c:/cygwin64/bin/bash buildJDKWin.sh"
}

# Takes the OS as arg 1
startVMPlaybook()
{
Expand Down Expand Up @@ -175,6 +184,10 @@ startVMPlaybookWin()
fi
# run the ansible playbook on the VM & logs the output.
ansible-playbook -i playbooks/AdoptOpenJDK_Windows_Playbook/hosts.win -u vagrant --skip-tags jenkins,adoptopenjdk playbooks/AdoptOpenJDK_Windows_Playbook/main.yml 2>&1 | tee ~/adoptopenjdkPBTests/logFiles/$folderName.$branchName.$OS.log
if [[ "$testNativeBuild" = true ]]; then
testBuildWin
Willsparker marked this conversation as resolved.
Show resolved Hide resolved
fi
vagrant halt
}

destroyVM()
Expand Down