private static void checkSurefireConfiguration ( Object mojo ) throws Exception { String forkCount = null ; try { forkCount = invokeAndGetString ( GET_FORK_COUNT , mojo ) ; } catch ( NoSuchMethodException ex ) { // Nothing: earlier versions (before 2.14) of surefire did // not have forkCount. } String forkMode = null ; try { forkMode = getStringField ( FORK_MODE_FIELD , mojo ) ; } catch ( NoSuchMethodException ex ) { // Nothing: earlier versions (before 2.1) of surefire did // not have forkMode. } if ( ( forkCount != null && forkCount . equals ( "0" ) ) || ( forkMode != null && ( forkMode . equals ( "never" ) || forkMode . equals ( "none" ) ) ) ) { throwMojoExecutionException ( mojo , "Fork has to be enabled when running tests with Ekstazi; check forkMode and forkCount parameters." , null ) ; } }
Checks that surefire configuration allows integration with Ekstazi . At the moment we check that forking is enabled .