-
Bug
-
Resolution: Unresolved
-
P4
-
None
-
Fix Understood
A number of our older tests were written to only run the test code on particular platforms, and immediately exit on other platforms. A couple examples of how this is done:
if (File.separatorChar != '\\') {
/* This test is only valid on win32 systems */
return;
}
or
if (!System.getProperty("os.name").contains("OS X")) {
System.out.println("Test only run on MAC. Exiting.");
return;
}
But now that we have jtreg's @requires tag, these tests can be tagged to only run on the relevant platforms. This should prevent these tests from being run, and superficial results being generated, on unnecessary platforms.
if (File.separatorChar != '\\') {
/* This test is only valid on win32 systems */
return;
}
or
if (!System.getProperty("os.name").contains("OS X")) {
System.out.println("Test only run on MAC. Exiting.");
return;
}
But now that we have jtreg's @requires tag, these tests can be tagged to only run on the relevant platforms. This should prevent these tests from being run, and superficial results being generated, on unnecessary platforms.