Skip to content

Commit

Permalink
pbTests: Altered Windows Scripts to build and test (#1053)
Browse files Browse the repository at this point in the history
  • Loading branch information
Willsparker authored and Stewart X Addison committed Jan 3, 2020
1 parent c1b3462 commit d9b00a2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 0 additions & 2 deletions ansible/pbTestScripts/buildJDKWin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ export JAVA_TO_BUILD=jdk8
export VARIANT=hotspot
export JDK7_BOOT_DIR=/cygdrive/c/openjdk/jdk7
export PATH=/usr/bin/:$PATH
# Ensures Git won't replace line endings (CRLF)
C:/cygwin64/bin/sed -i -e 's/autocrlf.*/autocrlf = false/g' C:\\ProgramData/Git/config
# Git clone openjdk-build if it's not currently there.
cd C:/
if [ ! -d "openjdk-build" ]; then
Expand Down
2 changes: 1 addition & 1 deletion ansible/pbTestScripts/testJDKWin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fi
cd openjdk-tests

./get.sh -t $HOME/testLocation/openjdk-tests -p x64_windows
cd TestConfig
cd TKG
make -f run_configure.mk AUTO_DETECT=true
export BUILD_LIST=MachineInfo
make compile
Expand Down
2 changes: 2 additions & 0 deletions ansible/pbTestScripts/testScript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,14 @@ startVMPlaybookWin()
searchLogFiles $OS
local pbFailed=$?
if [[ "$testNativeBuild" = true && "$pbFailed" == 0 ]]; then
vagrant reload
# Runs the build script via ansible, as vagrant powershell gives error messages that ansible doesn't.
# See: https://github.com/AdoptOpenJDK/openjdk-infrastructure/pull/942#issuecomment-539946564
cd $WORKSPACE/adoptopenjdkPBTests/$folderName-$branchName/ansible
ansible all -i playbooks/AdoptOpenJDK_Windows_Playbook/hosts.win -u vagrant -m raw -a "Start-Process powershell.exe -Verb runAs; cd C:/; sh C:/vagrant/pbTestScripts/buildJDKWin.sh"
echo The build finished at : `date +%T`
if [[ "$runTest" = true ]]; then
vagrant reload
# Runs a script on the VM to test the built JDK
ansible all -i playbooks/AdoptOpenJDK_Windows_Playbook/hosts.win -u vagrant -m raw -a "sh C:/vagrant/pbTestScripts/testJDKWin.sh"
echo The test finished at : `date +%T`
Expand Down

0 comments on commit d9b00a2

Please sign in to comment.