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

pbTests: Use 'homemade' Solaris box #2405

Merged
merged 9 commits into from
Jan 6, 2022
25 changes: 20 additions & 5 deletions ansible/pbTestScripts/testJDK.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

export MAKE_COMMAND="make"
if [[ $(uname) == "FreeBSD" ]]; then
if [[ "$(uname)" == "FreeBSD" ]]; then
export MAKE_COMMAND="gmake"
cp -r $HOME/openjdk-build/workspace/build/src/build/*/jdk* $HOME
export TEST_JDK_HOME=$HOME/jdk
Expand All @@ -11,13 +11,28 @@ else
ls -ld $HOME/openjdk-build/workspace/build/src/build/*/images/*
fi

# Special case for Solaris. See: https://github.com/adoptium/infrastructure/pull/2405#issuecomment-999498345
if [[ "$(uname)" == "SunOS" ]]; then
export PATH="/opt/csw/bin:/usr/local/bin:${PATH}"
fi


mkdir -p $HOME/testLocation
[ ! -d $HOME/testLocation/aqa-tests ] && git clone https://github.com/adoptium/aqa-tests.git $HOME/testLocation/aqa-tests
# cd to aqa-tests as required by https://github.com/adoptium/aqa-tests/issues/2691#issue-932959102
cd $HOME/testLocation/aqa-tests
$HOME/testLocation/aqa-tests/get.sh
cd $HOME/testLocation/aqa-tests/TKG || exit 1
export BUILD_LIST=functional
$MAKE_COMMAND compile
# Runs this test to check for prerequisite perl modules
$MAKE_COMMAND _MBCS_Tests_pref_ja_JP_linux_0

# Solaris runs a different test to Linux.
# See: https://adoptium.slack.com/archives/C53GHCXL4/p1641311568115100?thread_ts=1641296204.114900&cid=C53GHCXL4
if [[ "$(uname)" == "SunOS" ]]; then
export BUILD_LIST=system
$MAKE_COMMAND compile
$MAKE_COMMAND _MachineInfo
else
# Runs this test to check for prerequisite perl modules
export BUILD_LIST=functional
$MAKE_COMMAND compile
$MAKE_COMMAND _MBCS_Tests_pref_ja_JP_linux_0
fi
11 changes: 0 additions & 11 deletions ansible/pbTestScripts/vagrantPlaybookCheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,6 @@ startVMPlaybook()
rm -f id_rsa.pub id_rsa
ssh-keygen -q -f $PWD/id_rsa -t rsa -N ''

# Add '-o KexAlgorithms=diffie-hellman-group1-sha1' to the Ansible ssh commands, for Solaris10
# See: https://github.com/adoptium/infrastructure/issues/1938
if [ "$OS" == "Solaris10" ]; then
sed -i 's/.*ControlPersist=60s.*/& -o KexAlgorithms=diffie-hellman-group1-sha1/g' ansible.cfg
# Pre install Solaris Compiler on VM
if [ -r /tmp/SolarisStudio12.3-solaris-x86-pkg ]; then
cp -r /tmp/SolarisStudio12.3-solaris-x86-pkg .
fi
ssh_args="-o KexAlgorithms=diffie-hellman-group1-sha1"
fi

# The BUILD_ID variable is required to stop Jenkins shutting down the wrong VMS
# See https://github.com/adoptium/infrastructure/issues/1287#issuecomment-625142917
BUILD_ID=dontKillMe vagrant up
Expand Down
11 changes: 3 additions & 8 deletions ansible/vagrant/Vagrantfile.Solaris10
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ if [ -r /vagrant/id_rsa.pub ]; then
mkdir -p $HOME/.ssh && cat /vagrant/id_rsa.pub >> $HOME/.ssh/authorized_keys
fi

# Install compiler if found on host system
if [ -r /vagrant/SolarisStudio12.3-solaris-x86-pkg ]; then
sudo /opt/csw/bin/pkgutil -y -i jdk8
sudo /vagrant/SolarisStudio12.3-solaris-x86-pkg/solarisstudio.sh --non-interactive --javahome /opt/csw/java/jdk/jdk8/
fi
yes | sudo pkgrm CSWpkgutil

# Configure host/hostname, to stop "Unable to resolve host" issue with 'sudo'
Expand All @@ -24,15 +19,15 @@ SCRIPT
Vagrant.configure("2") do |config|

config.vm.define :adoptopenjdkSol10 do |adoptopenjdkSol10|
adoptopenjdkSol10.vm.box = "tnarik/solaris10-minimal"
adoptopenjdkSol10.vm.box = "solaris10"
adoptopenjdkSol10.vm.synced_folder ".", "/vagrant"
adoptopenjdkSol10.vm.hostname = "adoptopenjdkSol10"
adoptopenjdkSol10.vm.network :private_network, type: "dhcp"
adoptopenjdkSol10.vm.provision "shell", inline: $script, privileged: false
adoptopenjdkSol10.vm.boot_timeout = 600
end
config.vm.provider "virtualbox" do |v|
v.gui = false
v.memory = 2560
v.memory = 5120
v.customize ["modifyvm", :id, "--cpuexecutioncap", "50"]
end
end