Skip to content

Commit

Permalink
rename flag
Browse files Browse the repository at this point in the history
  • Loading branch information
bobjacobsen committed Nov 17, 2019
1 parent 75e1116 commit 36ab24b
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@
<sysproperty key="jmri.shutdownmanager" value="jmri.util.MockShutDownManager" />
<!-- <sysproperty key="jinput.plugins" path="net.bobis.jinput.hidraw.HidRawEnvironmentPlugin"/> no longer specify specific library -->

<sysproperty key="jmri.skipKnownIntermittent" value="true"/><!-- skip intermittent tests -->
<sysproperty key="jmri.skipTestsRequiringSeparateRunning" value="true"/><!-- skip intermittent tests -->

<sysproperty key="user.language" value="en"/>
<sysproperty key="user.country" value="US"/>
Expand Down
9 changes: 5 additions & 4 deletions help/en/html/doc/Technical/JUnit.shtml
Original file line number Diff line number Diff line change
Expand Up @@ -230,10 +230,11 @@
This is used in our standard testing infrastructure(s) to ensure that a mocked
test-compatible ShutDownManager is available.
</dd>
<dt>jmri.skipKnownIntermittent</dt>
<dd>When set to "true", this skips running certain tests that are too intermittent to
include in CI running.
The scripts/run_intermittent_tests_separately file
<dt>jmri.skipTestsRequiringSeparateRunning</dt>
<dd>When set to "true", this skips running certain tests that should be run
separately (not in the long series of tests we use for CI running)
because they behave intermittently when run as part of the main test sequence.
The <code>scripts/run_flagged_tests_separately<code> file
runs these test classes separately.</dd>
<dt>jmri.skipschematests</dt>
<dd>If true, JUnit tests will skip checking the schema of all the test XML files.</dd>
Expand Down
2 changes: 1 addition & 1 deletion java/test/jmri/jmrit/logix/LearnWarrantTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class LearnWarrantTest {
@Test
public void testLearnWarrant() throws Exception {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/LearnWarrantTest.xml");
Expand Down
8 changes: 4 additions & 4 deletions java/test/jmri/jmrit/logix/LinkedWarrantTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public class LinkedWarrantTest {
@Test
public void testLoopedWarrant() throws Exception {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/ShortBlocksTest.xml");
Expand Down Expand Up @@ -115,7 +115,7 @@ public void testLoopedWarrant() throws Exception {
@Test
public void testLinkedWarrant() throws Exception {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/ShortBlocksTest.xml");
Expand Down Expand Up @@ -190,7 +190,7 @@ public void testLinkedWarrant() throws Exception {
@Test
public void testBackAndForth() throws Exception {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/ShortBlocksTest.xml");
Expand Down Expand Up @@ -277,7 +277,7 @@ public void testBackAndForth() throws Exception {
@Test
public void testLinkedMidScript() throws Exception {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/NXWarrantTest.xml");
Expand Down
10 changes: 5 additions & 5 deletions java/test/jmri/jmrit/logix/NXFrameTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public void testGetDefault() {
@Test
public void testRoutePanel() throws Exception {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

NXFrame nxFrame = new NXFrame();
Assert.assertNotNull("NXFrame", nxFrame);
Expand All @@ -73,7 +73,7 @@ public void testRoutePanel() throws Exception {
@Test
public void testNXWarrantSetup() throws Exception {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/NXWarrantTest.xml");
Expand Down Expand Up @@ -138,7 +138,7 @@ public void testNXWarrant() throws Exception {
// then goes on to test a Warrant through the WarrantTableFrame.
// it is the WarrantTableframe portion of this test that hangs.
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/NXWarrantTest.xml");
Expand Down Expand Up @@ -255,7 +255,7 @@ public void testNXWarrant() throws Exception {
@Test
public void testWarrantLoopRun() throws Exception {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/NXWarrantTest.xml");
Expand Down Expand Up @@ -297,7 +297,7 @@ public void testWarrantLoopRun() throws Exception {
@Test
public void testWarrantRampHalt() throws Exception {
Assume.assumeFalse(GraphicsEnvironment.isHeadless());
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipKnownIntermittent"));
Assume.assumeFalse("Ignoring intermittent test", Boolean.getBoolean("jmri.skipTestsRequiringSeparateRunning"));

// load and display
File f = new File("java/test/jmri/jmrit/logix/valid/NXWarrantTest.xml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
rm -f ./failed_files.txt
touch ./failed_files.txt

for jmri_test in $( find java/test/$1 -name \*Test.java -exec grep -q jmri.skipKnownIntermittent {} \; -print)
for jmri_test in $( find java/test/$1 -name \*Test.java -exec grep -q jmri.skipTestsRequiringSeparateRunning {} \; -print)
do jmri_test=${jmri_test#java/test/}
jmri_test=${jmri_test%\.java}
date
Expand Down
6 changes: 3 additions & 3 deletions scripts/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ if [[ "${HEADLESS}" == "true" ]] ; then
-Dsurefire.runOrder=${RUN_ORDER} \
-Dant.jvm.args="-Djava.awt.headless=${HEADLESS}" \
-Djava.awt.headless=${HEADLESS} \
-Djmri.skipKnownIntermittent=${SKIPINTERMITTENT} \
-Djmri.skipTestsRequiringSeparateRunning=${SKIPINTERMITTENT} \
-Dcucumber.options="--tags 'not @Ignore' --tags 'not @Headed'"
fi
else
Expand All @@ -42,11 +42,11 @@ else
-Dsurefire.runOrder=${RUN_ORDER} \
-Dant.jvm.args="-Djava.awt.headless=${HEADLESS}" \
-Djava.awt.headless=${HEADLESS} \
-Djmri.skipKnownIntermittent=${SKIPINTERMITTENT} \
-Djmri.skipTestsRequiringSeparateRunning=${SKIPINTERMITTENT} \
-Djmri.skipschematests=true \
-Dcucumber.options="--tags 'not @Ignore'"
else
# run the SKIPINTERMITTENT tests separately
./scripts/run_intermittent_tests_separately
./scripts/run_flagged_tests_separately
fi
fi

0 comments on commit 36ab24b

Please sign in to comment.