Skip to content

Commit

Permalink
Vagrant: Improve Test Coverage & Align Tests In VPC process. (#3832)
Browse files Browse the repository at this point in the history
* VPC: Improve VPC JDK Test Process

* VPC: Improve windows tests

* Vagrant: Increase Fedora 40 Disksize

* Vagrant: Add Additional Tests To VPC Testing.
  • Loading branch information
steelhead31 authored and mahdipub committed Dec 5, 2024
1 parent 56fa9af commit 8f20b67
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 24 deletions.
31 changes: 17 additions & 14 deletions ansible/pbTestScripts/testJDK.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,31 @@ if [[ "$(uname)" == "SunOS" ]]; then
export PATH="/usr/local/bin:/opt/csw/bin:${PATH}"
fi

## Run The Smoke Tests To Ensure The JDK Build OK
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
$HOME/testLocation/aqa-tests/get.sh --vendor_repos https://github.com/adoptium/temurin-build --vendor_branches master --vendor_dirs /test/functional
cd $HOME/testLocation/aqa-tests/TKG || exit 1
export BUILD_LIST=functional/buildAndPackage
$MAKE_COMMAND compile
$MAKE_COMMAND _extended.functional

# 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
# Run a few subsets of OpenJDK Tests as a shakedown of the built JDK.
export BUILD_LIST=openjdk
$MAKE_COMMAND compile
$MAKE_COMMAND _hotspot_sanity_0
$MAKE_COMMAND _jdk_math_0

# Run Some Additional Tests To Test The Playbooks Have Run Properly
export BUILD_LIST=functional
$MAKE_COMMAND compile
$MAKE_COMMAND _MBCS_Tests_pref_ja_JP_linux_0
$MAKE_COMMAND _MBCS_Tests_formatter_ja_JP_linux_0

# Run SSL Client Tests Linux Only ( Not Solaris / FreeBSD )
if [[ "$(uname)" == "FreeBSD" ]] || [["$(uname)" == "SunOS"]]; then
if [[ "$(uname)" == "FreeBSD" ]] || [[ "$(uname)" == "SunOS" ]]; then
echo "Skipping SSL Tests As Not Supported"
else
export TESTJAVA=$TEST_JDK_HOME
Expand Down
35 changes: 25 additions & 10 deletions ansible/pbTestScripts/testJDKWin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,37 @@ rm -rf /cygdrive/c/tmp/*-test-image
export TEST_JDK_HOME=`ls -d c:/tmp/jdk*|grep -v "static"|grep -v "debug"|grep -v "jre"|grep -v "test-image"`
echo TEST_JDK_HOME=$TEST_JDK_HOME

## Run The Same Tests As Test JDK for Linux
## Run The Smoke Tests To Ensure The JDK Build OK

cd /cygdrive/c/tmp
if [ ! -d "testLocation" ];
then
echo "Creating testLocation directory"
mkdir testLocation
fi
cd testLocation
if [ ! -d "openjdk-tests" ];
then
echo "Git cloning openjdk-tests"
git clone https://github.com/adoptopenjdk/openjdk-tests
fi
cd openjdk-tests
git clone https://github.com/adoptium/aqa-tests.git
pwd
ls -tr
cd aqa-tests
./get.sh --vendor_repos https://github.com/adoptium/temurin-build --vendor_branches master --vendor_dirs /test/functional
pwd
ls -ltr
cd TKG || exit 1

./get.sh -T $HOME/testLocation/openjdk-tests -p x64_windows
cd TKG
export BUILD_LIST=system
## Run The Smoke Tests To Ensure The JDK Build OK
export BUILD_LIST=functional/buildAndPackage
make compile
make _extended.system
make _extended.functional

# Run a few subsets of OpenJDK Tests as a shakedown of the built JDK.
export BUILD_LIST=openjdk
make compile
make _hotspot_sanity_0
make _jdk_math_0

# Run Some Additional Tests To Test The Playbooks Have Run Properly
export BUILD_LIST=functional
make _MBCS_Tests_pref_ja_windows_0
make _MBCS_Tests_formatter_ja_windows_0
4 changes: 4 additions & 0 deletions ansible/vagrant/Vagrantfile.Fedora40
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ $script = <<SCRIPT
if [ -r /vagrant/id_rsa.pub ]; then
mkdir -p $HOME/.ssh && cat /vagrant/id_rsa.pub >> $HOME/.ssh/authorized_keys
fi
sudo dnf install -y cloud-utils-growpart xfsprogs
sudo growpart /dev/sda 2
sudo xfs_growfs /
SCRIPT

# 2 = version of configuration file for Vagrant 1.1+ leading up to 2.0.x
Expand All @@ -18,6 +21,7 @@ Vagrant.configure("2") do |config|
adoptopenjdkF40.vm.network :private_network, type: "dhcp"
adoptopenjdkF40.vm.provision "shell", inline: $script, privileged: false
end
config.disksize.size ="75GB"
config.vm.provider "virtualbox" do |v|
v.gui = false
v.memory = 4196
Expand Down

0 comments on commit 8f20b67

Please sign in to comment.