Skip to content
Snippets Groups Projects
Unverified Commit 0d55630b authored by David Schneider's avatar David Schneider Committed by GitHub
Browse files

Merge pull request #1 from bivab/develop

Run regressionTests on travis-ci
parents 499c5e53 b2a0afb2
Branches
Tags
No related merge requests found
Showing with 211 additions and 192 deletions
......@@ -17,3 +17,4 @@ temp
out/
src/test/**/*.tla
src/test/**/*.cfg
public_examples
language: java
sudo: true
script: gradle build
script: ./gradlew --no-daemon --console verbose --stacktrace build
before_install:
- openssl aes-256-cbc -pass pass:$ENCRYPTION_PASSWORD -in secring.gpg.enc -out secring.gpg
-d
......
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'maven'
apply plugin: 'jacoco'
apply plugin: 'findbugs'
plugins {
id 'java'
id 'eclipse'
id 'maven'
id 'jacoco'
id 'findbugs'
id "de.undercouch.download" version "3.4.3"
}
project.version = '1.0.4-SNAPSHOT'
project.group = 'de.hhu.stups'
......@@ -61,13 +64,28 @@ test {
//exclude('de/tlc4b/tlc/integration')
}
task downloadPublicExamples(type: Download) {
src 'https://www3.hhu.de/stups/downloads/prob/source/ProB_public_examples.tgz'
dest buildDir
onlyIfModified true
}
task extractPublicExamples(dependsOn: downloadPublicExamples, type: Copy) {
from tarTree(resources.gzip("${buildDir}/ProB_public_examples.tgz"))
into projectDir
}
clean {
delete "${projectDir}/public_examples"
}
task regressionTests(type: Test){
task regressionTests(dependsOn: extractPublicExamples, type: Test){
doFirst{ println("Running integration tests") }
scanForTestClasses = true
//include('de/tlc4b/tlc/integration/probprivate/**')
include('de/tlc4b/**')
}
check.dependsOn(regressionTests)
// type 'gradle integrationTests jacocoIntegrationTestReport' in order to run the jacoco code coverage analysis
task jacocoIntegrationTestReport(type: JacocoReport) {
......
......@@ -32,7 +32,7 @@ public class CoverageTest extends AbstractParseMachineTest {
public static Configuration getConfig() {
final ArrayList<String> list = new ArrayList<String>();
final ArrayList<String> ignoreList = new ArrayList<String>();
list.add("../prob_examples/public_examples/TLC/");
list.add("public_examples/TLC/");
list.add("./src/test/resources/");
ignoreList.add("./src/test/resources/compound/");
......
......@@ -37,7 +37,7 @@ public class AssertionErrorTest extends AbstractParseMachineTest {
@Config
public static Configuration getConfig() {
final ArrayList<TestPair> list = new ArrayList<TestPair>();
list.add(new TestPair(AssertionError, "../prob_examples/public_examples/TLC/AssertionError"));
list.add(new TestPair(AssertionError, "public_examples/TLC/AssertionError"));
return getConfiguration(list);
}
}
......@@ -38,7 +38,7 @@ public class DeadlockTest extends AbstractParseMachineTest {
public static Configuration getConfig() {
final ArrayList<TestPair> list = new ArrayList<TestPair>();
list.add(new TestPair(Deadlock,
"../prob_examples/public_examples/TLC/Deadlock"));
"public_examples/TLC/Deadlock"));
return getConfiguration(list);
}
}
......@@ -38,7 +38,7 @@ public class GoalTest extends AbstractParseMachineTest {
public static Configuration getConfig() {
final ArrayList<TestPair> list = new ArrayList<TestPair>();
list.add(new TestPair(Goal,
"../prob_examples/public_examples/TLC/GOAL"));
"public_examples/TLC/GOAL"));
return getConfiguration(list);
}
}
......@@ -38,7 +38,7 @@ public class InvariantViolationTest extends AbstractParseMachineTest {
public static Configuration getConfig() {
final ArrayList<TestPair> list = new ArrayList<TestPair>();
list.add(new TestPair(InvariantViolation,
"../prob_examples/public_examples/TLC/InvariantViolation"));
"public_examples/TLC/InvariantViolation"));
return getConfiguration(list);
}
}
......@@ -17,70 +17,70 @@ public class LawsTest {
@Test
public void BoolLaws() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/BoolLaws.mch"};
String[] a = new String[] { "public_examples/TLC/Laws/BoolLaws.mch"};
assertEquals(NoError, test(a));
}
@Test
public void BoolWithArithLaws() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/BoolWithArithLaws.mch", "-nodead"};
String[] a = new String[] { "public_examples/TLC/Laws/BoolWithArithLaws.mch", "-nodead"};
assertEquals(NoError, test(a));
}
@Test
public void FunLaws() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/FunLaws.mch"};
String[] a = new String[] { "public_examples/TLC/Laws/FunLaws.mch"};
assertEquals(NoError, test(a));
}
@Test
public void FunLawsWithLambda() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/FunLawsWithLambda.mch"};
String[] a = new String[] { "public_examples/TLC/Laws/FunLawsWithLambda.mch"};
assertEquals(NoError, test(a));
}
@Test
public void RelLaws_TLC() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/RelLaws_TLC.mch"};
String[] a = new String[] { "public_examples/TLC/Laws/RelLaws_TLC.mch"};
assertEquals(Goal, test(a));
}
@Test
public void BoolLaws_SetCompr() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/BoolLaws_SetCompr.mch"};
String[] a = new String[] { "public_examples/TLC/Laws/BoolLaws_SetCompr.mch"};
assertEquals(NoError, test(a));
}
@Test
public void BoolLaws_SetComprCLPFD() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/BoolLaws_SetComprCLPFD.mch"};
String[] a = new String[] { "public_examples/TLC/Laws/BoolLaws_SetComprCLPFD.mch"};
assertEquals(NoError, test(a));
}
@Test
public void CardinalityLaws_TLC() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/CardinalityLaws_TLC.mch", "-nodead"};
String[] a = new String[] { "public_examples/TLC/Laws/CardinalityLaws_TLC.mch", "-nodead"};
assertEquals(NoError, test(a));
}
@Test
public void EqualityLaws() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/EqualityLaws.mch", "-nodead"};
String[] a = new String[] { "public_examples/TLC/Laws/EqualityLaws.mch", "-nodead"};
assertEquals(NoError, test(a));
}
@Test
public void SubsetLaws() throws Exception {
TLC4BGlobals.setDeleteOnExit(true);
String[] a = new String[] { "../prob_examples/public_examples/TLC/Laws/SubsetLaws.mch", "-nodead"};
String[] a = new String[] { "public_examples/TLC/Laws/SubsetLaws.mch", "-nodead"};
assertEquals(NoError, test(a));
}
}
......@@ -38,7 +38,7 @@ public class NoErrorTest extends AbstractParseMachineTest {
public static Configuration getConfig() {
final ArrayList<TestPair> list = new ArrayList<TestPair>();
list.add(new TestPair(NoError,
"../prob_examples/public_examples/TLC/NoError"));
"public_examples/TLC/NoError"));
return getConfiguration(list);
}
......
......@@ -37,7 +37,7 @@ public class WellDefinednessTest extends AbstractParseMachineTest {
@Config
public static Configuration getConfig() {
final ArrayList<TestPair> list = new ArrayList<TestPair>();
list.add(new TestPair(WellDefinednessError, "../prob_examples/public_examples/TLC/WellDefinednessError"));
list.add(new TestPair(WellDefinednessError, "public_examples/TLC/WellDefinednessError"));
return getConfiguration(list);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment