Skip to content

Commit

Permalink
[MINVOKER-311] Override reports directory in IT test
Browse files Browse the repository at this point in the history
  • Loading branch information
slawekjaranowski committed Sep 18, 2022
1 parent c07ca87 commit 304d2d5
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 12 deletions.
2 changes: 2 additions & 0 deletions pom.xml
Expand Up @@ -359,6 +359,8 @@ 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>
</properties>
<scriptVariables>
<projectVersion>${project.version}</projectVersion>
Expand Down
2 changes: 1 addition & 1 deletion src/it/MINVOKER-196_junit_report_file/verify.groovy
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
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
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
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
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
2 changes: 1 addition & 1 deletion src/it/selector-scripts/setup.groovy
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
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

0 comments on commit 304d2d5

Please sign in to comment.