RFR: Re-arrange test directory structure

Maurizio Cimadamore mcimadamore at openjdk.java.net
Thu Apr 7 17:21:33 UTC 2022


Looking more at jextract tests, when we moved things in the standalone repo, few things went wrong. For instance, `TestSplit` cannot be executed right now, because it would need to be ran with some custom JDK properties. But since it's now part of a testng test structure, that is not possible.

We'd need to move TestSplit in a different folder, but if we do that we have a problem, in that TestSplit depends on the TestUtils and JextractToolRunner helpers.

This patch moves all the helper classes (JextractToolRunner, TestUtils, JextractAPITestBase) in the `testlib` package under the `test/lib` folder.

Then, this patch restructures the test folder, as follows:

* the `java` folder is renamed to `testng` - all testng test w/o jtreg header live here
* the `generator` folder is moved under a new folder called `jtreg`; under this new folder we find tests with regular jtreg header

With all this, we can now add a TEST.properties file under `test/testng` which contains a pointer to the lib folder that should be used by testng tests.

And, we can finally move TestSplit under `test/jtreg`, and add the jtreg test header we need to be able to run this correctly.

-------------

Commit messages:
 - Revamp test directory structure
 - Move JextractToolRunner and JextractApiTestBase in lib folder

Changes: https://git.openjdk.java.net/jextract/pull/17/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jextract&pr=17&range=00
  Stats: 977 lines in 175 files changed: 459 ins; 409 del; 109 mod
  Patch: https://git.openjdk.java.net/jextract/pull/17.diff
  Fetch: git fetch https://git.openjdk.java.net/jextract pull/17/head:pull/17

PR: https://git.openjdk.java.net/jextract/pull/17


More information about the jextract-dev mailing list