Openj9: Create common test utilities for isJava8, isWindows, etc.

Created on 28 Feb 2018  路  7Comments  路  Source: eclipse/openj9

Several tests need to know the platform (usually z/OS or Windows) and the Java version (often Java 8 vs. later). There are multiple implementations of isJava8() already.

Suggest creating a common class in TestUtilities, e.g. org.openj9.test.util.PlatformInfo
with (initially)
static boolean [isWindows(), isZos(), isJava8()].
The code for these can be lifted from existing sources.

@smlambert @llxia your thoughts?

beginner test low

Most helpful comment

Yes you already have VersionCheck, so @chandrams can use that for her purpose. This issue is for platform checks (and likely a few other machine capabilities that are commonly requested by tests).

All 7 comments

I had hoped to leave this as a beginner item for some new contributor to pick up, but I guess its time to move it forward, given #1745.

I'll open a PR shortly.

@DanHeidinga would this be a good exercise to get a student up to speed?

Our students already have a list of items from @tajila, as I mentioned above, I will take this one.

@smlambert - Any update on this one? I 'm looking specifically for isJava8() to include in one of the functional tests.

Doesn't https://github.com/eclipse/openj9/blob/f66506e7a528340d176260c3af47c63cf66979ec/test/functional/TestUtilities/src/org/openj9/test/util/VersionCheck.java already provide this info? It has a major() method which returns the major java version - 8, 9, 10 etc

Yes you already have VersionCheck, so @chandrams can use that for her purpose. This issue is for platform checks (and likely a few other machine capabilities that are commonly requested by tests).

We need isMacOS() (or equivalent - suggestions for a better name are welcome) for https://github.com/eclipse/openj9/issues/3266.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lmajewski picture lmajewski  路  123Comments

markehammons picture markehammons  路  63Comments

ChengJin01 picture ChengJin01  路  238Comments

zl-wang picture zl-wang  路  94Comments

pshipton picture pshipton  路  62Comments