Skip to content

Commit

Permalink
Make compatibility spec suite write to subdirectory of target
Browse files Browse the repository at this point in the history
This prevents name clashes when intellij runs the suite with the project's top-level module dir (which is the default)
  • Loading branch information
boggle committed Jun 17, 2016
1 parent 533d2d9 commit 8d31d9c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public static File targetDirectory( String suffix )

private static File obtainTargetDirectory( boolean create, String suffix )
{
File directory = new File( new File ( new File( "target" ), "compatibility-spec-suite" ), suffix ).getAbsoluteFile();
File directory = new File( new File ( new File( "target" ), CompatibilitySpecSuiteTest.SUITE_NAME ), suffix ).getAbsoluteFile();
if ( !directory.exists() )
{
if ( !(create && directory.mkdirs()) )
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,10 @@ public static class CostCompiled

// constants for TCK configuration

public static final String SUITE_NAME = "compatibility-spec-suite";
private static final String DB_CONFIG = "cypher.cucumber.db.DatabaseConfigProvider:/db-config/";
private static final String HTML_REPORT = "html:target/";
private static final String JSON_REPORT = "cypher.feature.reporting.CypherResultReporter:target/";
private static final String GLUE_PATH = "classpath:cypher/feature/steps";
private static final String FEATURE_PATH = "target/features/";
private static final String FEATURE_PATH = "target/" + SUITE_NAME + "/features/";
private static final String HTML_REPORT = "html:target/" + SUITE_NAME + "/";
private static final String JSON_REPORT = "cypher.feature.reporting.CypherResultReporter:target/" + SUITE_NAME + "/";
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private JFreeChart createBarChart( Map<String,Integer> data )
return cached;
}
JFreeChart chart = ChartFactory
.createBarChart( "TCK tag distribution", "Tags", "Occurrences in queries",
.createBarChart( "Spec suite tag distribution", "Tags", "Occurrences in queries",
createCategoryDataset( data ) );

// styling
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import org.scalatest.{Assertions, Matchers}

import scala.util.{Failure, Success, Try}

case class TCKErrorHandler(typ: String, phase: String, detail: String) extends Matchers with Assertions {
case class SpecSuiteErrorHandler(typ: String, phase: String, detail: String) extends Matchers with Assertions {

def check(result: Try[Result]) = {
phase match {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ trait SpecSuiteSteps extends FunSuiteLike with Matchers with TCKCucumberTemplate

Then(EXPECT_ERROR) { (typ: String, phase: String, detail: String) =>
ifEnabled {
TCKErrorHandler(typ, phase, detail).check(result)
SpecSuiteErrorHandler(typ, phase, detail).check(result)
}
}

Expand Down

0 comments on commit 8d31d9c

Please sign in to comment.