Openjdk-tests: Tweetest Prep work for quarkus_quickstart tests

Created on 1 Apr 2021  ·  10Comments  ·  Source: AdoptOpenJDK/openjdk-tests

👾 Description of the issue

We run external third-party application tests at this project. They are contained within the external directory. We would like to improve how we run these tests. The first step to improving how we run them is to add some documentation and to pull out the individual test properties that we use so that they are stored in the same directory as the test.

This issue is to add a README.md and a test.properties file to the /external/quarkus_quickstart test directory. As part of this prep work, since we already generate the Dockerfile, please also remove the static https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/quarkus_quickstart/dockerfile/Dockerfile.

The contents of the README file can be simply some instructions for how to run the test locally. Use with the instructions from https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/README.md#running-external-tests-locally and modify Steps 7 and 9 to reference quarkus_quickstart and quarkus_quickstart_test specifically.

The contents of the test.properties file will be a key=value format, copying the information from https://github.com/AdoptOpenJDK/openjdk-tests/blob/master/external/common_functions.sh#L361-L373 to populate it.

Adding these files will not change the current way we run these tests. A separate change will be made to reference the test.properties file, at which point the contents must match those in the common_functions.sh script.

Please take the time to try and run the test locally (using the instructions you are adding in the README file). Some of the external tests are failing. When you run it locally, you may find that to be the case. The reviewer can help to advise you if there are any further steps you can take to try and debug the pre-existing failure, if it exists.

📋 Step by Step

To solve this issue and contribute a fix you should check the following step-by-step list. A more detailed documentation of the workflow can be found here. Note: that you do not need to add yourself to a Contributors.md file as outlined in the detailed instructions.

  • [ ] Claim this issue: Comment below.
  • [ ] Fork the repository in github by simply clicking the 'fork' button.
  • [ ] Check out the forked repository
  • [ ] Create a feature branch for the issue. We do not have any naming definition for branches.
  • [ ] Commit your changes.
  • [ ] Start a Pull Request.
  • [ ] Done 👍 Ask in comments for a review :)
  • [ ] If the reviewer find some missing pieces or a problem they will start a discussion with you and describe the next steps how the problem can be solved.
  • [ ] You did it 🎉 We will merge the fix in the master branch.
  • [ ] Thanks, thanks, thanks for being part of this project as an open source contributor ❤️

🤔❓ Questions

If you have any questions just ask us directly in this issue by adding a comment. You can join our community chat at Slack. Next to this you can find a general manual about open source contributions here.

docs good first issue external

All 10 comments

I'd be interested in taking this issue!

Fantastic @ceelo777 ! If you have questions, please ask them in this issue!

Alright this is finished - I'm going to test now - what's a simple SDK I can download and use to test?

You can follow the instructions you put in the README file you are adding and download from the website... you can use the default one at the adoptopenjdk.net website, which is jdk11 hotspot.

BUILD FAILED
.../openjdk-tests/TKG/scripts/build_test.xml:31: Problem: failed to create task or type var
Cause: The name is undefined.
Action: Check the spelling.
Action: Check that any custom tasks/types have been declared.
Action: Check that any / declarations have taken place.

Getting this issue above ^ - any ideas? This is after I run:

  • make compile
  • export BUILD_LIST=external/quarkus_quickstarts
  • export EXTRA_DOCKER_ARGS="-v $TEST_JDK_HOME:/opt/java/openjdk"
  • export TEST_JDK_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/

That looks like a failure may be caused by not having ant-contrib installed (part of prereqs step 0).

gmake[1]: Leaving directory '/Users/chris/Desktop/OpenSource/openjdk-tests/TKG'
gmake -f runtest.mk quarkus_quickstarts_test
gmake[1]: Entering directory '/Users/chris/Desktop/OpenSource/openjdk-tests/TKG'
gmake[2]: Entering directory '/Users/chris/Desktop/OpenSource/openjdk-tests'
gmake[3]: Entering directory '/Users/chris/Desktop/OpenSource/openjdk-tests/external'
gmake[4]: Entering directory '/Users/chris/Desktop/OpenSource/openjdk-tests/external/quarkus_quickstarts'
tee: /Users/chris/Desktop/OpenSource/openjdk-tests/TKG/../TKG/output_16181022203644/TestTargetResult: No such file or directory

gmake[4]: * [autoGen.mk:20: quarkus_quickstarts_test_0] Error 1
gmake[4]: Leaving directory '/Users/chris/Desktop/OpenSource/openjdk-tests/external/quarkus_quickstarts'
gmake[3]:
[/Users/chris/Desktop/OpenSource/openjdk-tests/TKG/../TKG/settings.mk:250: quarkus_quickstarts_test-quarkus_quickstarts] Error 2
gmake[3]: Leaving directory '/Users/chris/Desktop/OpenSource/openjdk-tests/external'
gmake[2]:
[/Users/chris/Desktop/OpenSource/openjdk-tests/TKG/../TKG/settings.mk:250: quarkus_quickstarts_test-external] Error 2
gmake[2]: Leaving directory '/Users/chris/Desktop/OpenSource/openjdk-tests'
gmake[1]:
[settings.mk:250: quarkus_quickstarts_test-..] Error 2
gmake[1]: Leaving directory '/Users/chris/Desktop/OpenSource/openjdk-tests/TKG'
gmake: *
* [makefile:48: quarkus_quickstarts_test] Error 2

I got gmake compile to work, any idea what this means?

Since that is only partial console output that you posted, it is hard to tell what is the problem.

When I step through the steps defined in https://github.com/AdoptOpenJDK/openjdk-tests/tree/master/external#running-external-tests-locally, I am able to run to completion successfully.

  • I have the test prereqs installed
  • I clone the openjdk-tests repo
  • I export the necessary environment variables, BUILD_LIST=external/quarkus_quickstarts, DOCKERIMAGE_TAG=nightly, TEST_JDK_HOME=/Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home (where I installed a JDK that I downloaded)
  • I go into the openjdk-tests dir and run ./get.sh
  • it downloads TKG, and I cd into TKG and run make compile
  • that builds a Docker image, and I run the test by running make _quarkus_quickstarts_test

It takes a while to run the test, and when it completes, it prints this at the end...
TEST TARGETS SUMMARY
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
PASSED test targets:
quarkus_quickstarts_test_0

TOTAL: 1 EXECUTED: 1 PASSED: 1 FAILED: 0 DISABLED: 0 SKIPPED: 0
ALL TESTS PASSED
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Was this page helpful?
0 / 5 - 0 ratings