gliga / ekstazi

Software testing optimization tool
Apache License 2.0
27 stars 15 forks source link

[BUG] `force.all` and `force.failing` do not work with Maven mode #37

Open shuaiwang516 opened 3 years ago

shuaiwang516 commented 3 years ago

Bug description:

When using Ekstazi with maven, force.all and force.failing do not work as expected. To be more specific, if there is no code change, Ekstazi will not rerun tests even if I open force.all. The same for force.failing, if there is a test failure, Ekstazi will not rerun it if this is set to true.

Root Cause:

The forcefailing and forceall in StaticSelectEkstaziMojo.java do not get their value from the user's configuration on time. In the current implementation, Ekstazi always tries to use the default value of these configurations because the user's configurations are loaded into Ekstazi too late.

Fix:

In this PR I deleted the 2 parameters above and directly use Config.FORCE_FAILING_V and Config.FORCE_ALL_V. In loadEkstaziAgent() I preload the user's configuration settings in .ekstazirc to make sure these 2 configurations are correctly passed into Ekstazi before they got used.