aqa-tests icon indicating copy to clipboard operation
aqa-tests copied to clipboard

provide a way to allow to run external tests on any container

Open judovana opened this issue 1 year ago • 0 comments

Currently the runtime of containers supports some kind of lets say "default" image, which is temurin-jdk/jre image (so a custom jdk passed in have all deps), and that is based on ubuntu. As an option on openj9 images have several hardcoded occurences and are again based on ubuntu. In addition there is hardcoded version of openj9 on Red Hat UBI images - https://github.com/adoptium/aqa-tests/blob/2ee9988dedef51534a8afdb15827167e389443b6/external/dockerfile_functions.sh#L87-L105 . There are then several occurences of hardcoded ubi/ubuntu:, eg:https://github.com/adoptium/aqa-tests/blob/2ee9988dedef51534a8afdb15827167e389443b6/external/dockerfile_functions.sh#L617 (note also the !package expansion). Note, that the resulting image is jsut ARG in rsulting dockerfile. eg:

ARG IMAGE=docker.io/library/eclipse-temurin:21-jdk
ARG OS=ubuntu
ARG IMAGE_VERSION=nightly
ARG TAG=21-jdk
FROM $IMAGE

There are two ways how to run the tests:

  • Through https://github.com/adoptium/aqa-tests/blob/2ee9988dedef51534a8afdb15827167e389443b6/external/build_all.sh which seems to be only building images and TBH I'm not sure what it is for in wider scope
  • through more usual TEST_JDK_HOME, BUILD_LIST and make compile which builds image and make _testname which runs

The initial change should affect at least the second. To affect the build_all.sh on top of that, should be refactoring, which would remove all the for test in ${supported_tests} do for vm in ${supported_jvms} do for os in ${supported_os} do for package in ${supported_packages} do for build in ${supported_builds} do build_image.sh ${test} ${version} ${vm} ${os} ${package} ${build} to actually do all the looping through ${supported_jvms}, ${supported_os}, ${supported_packages}, ${supported_builds} first, to prepare set of (fully) qualified container IDs and then loop through them, via shortened for test in ${supported_tests} do build_image.sh ${test} ${image} I would probably like to addres it in different issue and different purpose as usage of build-all.sh is unclear to me.

Second part of this work is to properly adjust dependencies. Currently the test.properties have hardcoded ubuntu_packages and/or ubi_packages. This is to clumsy. A better way how to handle generic dependencies, and per os-family dependencies down to os dependencies and os:version dependencies must be done. It would be also nice to have some generic deps whcih are installed always, so unzip and curl are not repeated in each test.properties. Hoefully this is aligned also with one of the future goals, to have ability to run external tests on local machine without container. The second part may sound separated, but is not. If it should go alone, it would need to go before all other, and without all other it would be change just for itself.

judovana avatar Sep 05 '24 12:09 judovana