adoptium / aqa-tests

Home of test infrastructure for Adoptium builds
https://adoptium.net/aqavit
Apache License 2.0
125 stars 304 forks source link

Recompile material in test-images.tar.gz in Grinder #5183

Open fengxue-IS opened 3 months ago

fengxue-IS commented 3 months ago

Currently Grinder consumes the pre-compiled test resource from JDK build's test-images.tar.gz, if a test change is made to on of the compiled libs, it would require developer to rebuild a custom JDK so Grinder would be able to pick up the change.

It would be much simpler if Grinder job can have a option to recompile the test libs without need to recompile entire JDK

llxia commented 2 months ago

It looks like we can run test-image: https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/95a3a61b3bbd5ed37e4f840c8f6552cace79c462/doc/building.md?plain=1#L781 https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/95a3a61b3bbd5ed37e4f840c8f6552cace79c462/make/Main.gmk#L948 internal diff

def get_compile_command() {
    def make_target = ''
    if ((SDK_VERSION == "17") && SPEC.contains('zos')) {
         make_target = 'images test-image debug-image'
    } else if ((SDK_VERSION == "21") && SPEC.contains('zos')) {
         make_target = 'images debug-image'
    } else {
         make_target = 'all'
    }
    return "make ${EXTRA_MAKE_OPTIONS} ${make_target}"
}

openj9 image: https://github.com/ibmruntimes/openj9-openjdk-jdk11/blob/95a3a61b3bbd5ed37e4f840c8f6552cace79c462/closed/custom/Main.gmk#L33

pshipton commented 2 months ago

To make the test-image it first needs to build the JVM, so basically it will be doing an entire build. Maybe saving a little time by not building all but the bulk of the time is to build the JVM. I expect re-building the test-image should be left to the user to manage. The most efficient way is to have manual build setup where you change the code and then build again, which will do an incremental build, only recompiling the pieces that changed.

pshipton commented 2 months ago

Also a factor is that not all test machines are suitable for running builds. A JDK/test image build needs to run on a build machine.