Closed nicolabertazzo closed 5 years ago
It works if the patch.diff is generated with
git diff > patch.diff
Hi @nicolabertazzo
I'm working on it.
When you do not specify a path to a patch file, DSpot-diff-test-selection
tries to generate one but it seems that this generation is buggy.
Hello, #795 should fix the issue.
I test it on 2.1.1-SNAPSHOT and it works!
Characteristics
Description
Problem executing eu.stamp-project:dspot-diff-test-selection:2.1.0:list without patch.diff or with a patch.diff created from diff unix command.
Steps to reproduce
Without patch.diff
Execute these commands:
output error:
Writing HTML report to '/home/bertazzo/Scrivania/tmp/dspot_diff_test/dspot/dspot-diff-test-selection/src/test/resources/tavern/target/clover/report' Done. Processed 2 packages in 982ms (491ms per package). java.io.FileNotFoundException: /home/bertazzo/Scrivania/tmp/dspot_diff_test/dspot/dspot-diff-test-selection/src/test/resources/tavern/patch.diff (File o directory non esistente) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.<init>(FileInputStream.java:138) at java.io.FileReader.<init>(FileReader.java:72) at eu.stamp_project.diff_test_selection.DiffTestSelection.getTestThatExecuteChanges(DiffTestSelection.java:49) at eu.stamp_project.diff_test_selection.Main.run(Main.java:28) at eu.stamp_project.diff_test_selection.maven.DiffTestSelectionMojo.execute(DiffTestSelectionMojo.java:57) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80) at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) at org.apache.maven.cli.MavenCli.main(MavenCli.java:199) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356) [INFO] Saving result in /home/bertazzo/Scrivania/tmp/dspot_diff_test/dspot/dspot-diff-test-selection/src/test/resources/tavern/testsThatExecuteTheChange.csv ... [INFO] [INFO] Writing Coverage in /home/bertazzo/Scrivania/tmp/dspot_diff_test/dspot/dspot-diff-test-selection/src/test/resources/tavern/testsThatExecuteTheChange_coverage.csv [INFO] total;0;0
With a freshed patch.diff
Execute these commands
output:
... [INFO] Writing Coverage in /home/bertazzo/Scrivania/tmp/dspot_diff_test/dspot/dspot-diff-test-selection/src/test/resources/tavern/testsThatExecuteTheChange_coverage.csv [INFO] total;0;0
I attached the generated patch.diff (renamed in patch.diff.txt) patch.diff.txtRelationships
Help on issue template
Preview to follow the link or open file .github/ISSUE_DOC.md