Skip to content

Commit

Permalink
[MINVOKER-311] Override reports directory in IT test
Browse files Browse the repository at this point in the history
Additionally in order to fix build:
- remove wrongPropertyInterpolation - there are no assertions
- add streamLogsOnFailures to see errors in tests
  • Loading branch information
slawekjaranowski committed Sep 19, 2022
1 parent c07ca87 commit e91898d
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 162 deletions.
3 changes: 3 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,9 @@ under the License.
<properties>
<maven.compiler.source>${maven.compiler.source}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.target}</maven.compiler.target>
<!-- in order to stop Jenkins to recognized reports from test as project report -->
<invoker.reportsDirectory>target/invoker-reports-test</invoker.reportsDirectory>
<invoker.streamLogsOnFailures>true</invoker.streamLogsOnFailures>
</properties>
<scriptVariables>
<projectVersion>${project.version}</projectVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/it/MINVOKER-196_junit_report_file/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
File buildLog = new File( basedir, 'build.log' )
assert buildLog.text.contains( '[INFO] run post-build script verify.groovy' )

File invokerReports = new File( new File(basedir, "target"), 'invoker-reports' )
File invokerReports = new File( new File(basedir, "target"), 'invoker-reports-test' )
assert invokerReports.exists()

// test on first project
Expand Down
2 changes: 1 addition & 1 deletion src/it/MINVOKER-288-failed-setup-run/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/


File invokerReports = new File( new File(basedir, 'target'), 'invoker-reports' )
File invokerReports = new File( new File(basedir, 'target'), 'invoker-reports-test' )
assert invokerReports.exists()

def build1 = new XmlSlurper().parse( new File( invokerReports, 'BUILD-project1.xml' ) )
Expand Down
2 changes: 1 addition & 1 deletion src/it/MINVOKER-288-failed-setup-verify/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/


File invokerReports = new File( new File(basedir, "target"), 'invoker-reports' )
File invokerReports = new File( new File(basedir, "target"), 'invoker-reports-test' )
assert invokerReports.exists()

def build1 = new XmlSlurper().parse( new File( invokerReports, "BUILD-project1.xml" ) )
Expand Down
4 changes: 2 additions & 2 deletions src/it/invocation-cmdline-exclude/verify.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,6 @@
* specific language governing permissions and limitations
* under the License.
*/
assert new File(basedir, 'target/invoker-reports/BUILD-minvoker-140-executable.xml').exists()
assert !new File(basedir, 'target/invoker-reports/BUILD-minvoker-140-ignorable.xml').exists()
assert new File(basedir, 'target/invoker-reports-test/BUILD-minvoker-140-executable.xml').exists()
assert !new File(basedir, 'target/invoker-reports-test/BUILD-minvoker-140-ignorable.xml').exists()

2 changes: 1 addition & 1 deletion src/it/project-setup/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ try
return false;
}

File reportFile = new File( basedir, "target/invoker-reports/BUILD-project1.xml" );
File reportFile = new File( basedir, "target/invoker-reports-test/BUILD-project1.xml" );
if ( !reportFile.exists() )
{
System.out.println( "reportFile not exists FAILED!" );
Expand Down
1 change: 1 addition & 0 deletions src/it/script-streamLogs-false/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ under the License.
</goals>
<ignoreFailures>true</ignoreFailures>
<streamLogs>false</streamLogs>
<streamLogsOnFailures>false</streamLogsOnFailures>
</configuration>
<executions>
<execution>
Expand Down
1 change: 1 addition & 0 deletions src/it/script-streamLogs-true/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ under the License.
</goals>
<ignoreFailures>true</ignoreFailures>
<streamLogs>true</streamLogs>
<streamLogsOnFailures>false</streamLogsOnFailures>
</configuration>
<executions>
<execution>
Expand Down
2 changes: 1 addition & 1 deletion src/it/selector-scripts/setup.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import org.apache.commons.io.FileUtils

// Previous potential target 'content' has impact on IT execution
// (Some new file should be created by verify.sh)
FileUtils.deleteQuietly( new File( basedir, "target/invoker-reports" ) );
FileUtils.deleteQuietly( new File( basedir, "target/invoker-reports-test" ) );
FileUtils.deleteQuietly( new File( basedir, "src/it/script-ret-quiet/target" ) );
FileUtils.deleteQuietly( new File( basedir, "src/it/script-ret-true/target" ) );
return true;
10 changes: 5 additions & 5 deletions src/it/selector-scripts/verify.bsh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ try
}

String[] success = {
"target/invoker-reports/BUILD-script-ret-true.xml",
"target/invoker-reports/BUILD-script-ret-quiet.xml",
"target/invoker-reports-test/BUILD-script-ret-true.xml",
"target/invoker-reports-test/BUILD-script-ret-quiet.xml",
};
for ( String file : success )
{
Expand All @@ -73,8 +73,8 @@ try
}

String[] skipped = {
"target/invoker-reports/BUILD-script-ret-false.xml",
"target/invoker-reports/BUILD-script-ret-other.xml",
"target/invoker-reports-test/BUILD-script-ret-false.xml",
"target/invoker-reports-test/BUILD-script-ret-other.xml",
};
for ( String file : skipped )
{
Expand All @@ -90,7 +90,7 @@ try


String[] inerror = {
"target/invoker-reports/BUILD-script-throw.xml",
"target/invoker-reports-test/BUILD-script-throw.xml",
};
for ( String file : inerror )
{
Expand Down
18 changes: 0 additions & 18 deletions src/it/wrongPropertyInterpolation/invoker.properties

This file was deleted.

59 changes: 0 additions & 59 deletions src/it/wrongPropertyInterpolation/pom.xml

This file was deleted.

This file was deleted.

54 changes: 0 additions & 54 deletions src/it/wrongPropertyInterpolation/src/it/project/pom.xml

This file was deleted.

0 comments on commit e91898d

Please sign in to comment.