diff --git a/build.gradle b/build.gradle
index 517024575..6948079e5 100644
--- a/build.gradle
+++ b/build.gradle
@@ -6,6 +6,7 @@ plugins {
}
import de.itemis.mps.gradle.*
+import groovy.xml.XmlSlurper
import java.time.LocalDateTime
@@ -272,12 +273,42 @@ task build_tests(type: BuildLanguages, dependsOn: build_languages) {
script scriptFile('tests/build.xml')
}
+task failOnTestError() {
+ description 'evaluate junit result and fail on error'
+ doLast {
+
+ def juniXml = file('TESTS-TestSuites.xml')
+ if(juniXml.exists()){
+ def junitResult = new XmlSlurper().parse(juniXml)
+ def failures = junitResult.'**'.findAll { it.name() == 'failure' }
+ def errors = junitResult.'**'.findAll { it.name() == 'error' }
+
+ if (failures || errors) {
+ def amount = failures.size() + errors.size()
+ throw new GradleException(amount + " JUnit tests failed. Check the test report for details.")
+ }
+ }
+ }
+}
+
task run_tests(type: TestLanguages, dependsOn: build_tests) {
description "Will execute all tests from command line"
script scriptFile('tests/build.xml')
targets 'check'
+ doLast {
+ ant.taskdef(name: 'junitreport',
+ classname: 'org.apache.tools.ant.taskdefs.optional.junit.XMLResultAggregator',
+ classpath: configurations.junitAnt.asPath)
+ ant.junitreport {
+ fileset(dir: "$buildDir", includes: '**/TEST*.xml')
+ report(format: 'frames', todir: "$buildDir/junitreport")
+ }
+ ant.echo("JUnit report placed into $buildDir/junitreport/index.html")
+ }
}
+run_tests.configure { finalizedBy failOnTestError }
+
task install_nativelibs(type: Copy, dependsOn: build_languages) {
from "$rootDir/artifacts/de.itemis.mps.extensions/"
include "de.itemis.mps.nativelibs.loader/"
diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps
index 75de68613..15b8a9844 100644
--- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps
+++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/generator/template/main@generator.mps
@@ -548,7 +548,7 @@
-
+
@@ -565,7 +565,7 @@
-
+
@@ -8066,7 +8066,7 @@
-
+
@@ -8663,7 +8663,7 @@
-
+
@@ -8707,11 +8707,11 @@
-
+
-
+
@@ -16960,7 +16960,7 @@
-
+
@@ -17173,7 +17173,7 @@
-
+
@@ -18491,7 +18491,7 @@
-
+
@@ -18515,7 +18515,7 @@
-
+
@@ -26324,7 +26324,7 @@
-
+
@@ -27159,7 +27159,7 @@
-
+
@@ -29378,7 +29378,7 @@
-
+
diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/behavior.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/behavior.mps
index 3c369dff3..996a57bf8 100644
--- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/behavior.mps
+++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/behavior.mps
@@ -2403,7 +2403,7 @@
-
+
@@ -2692,7 +2692,7 @@
-
+
@@ -2745,7 +2745,7 @@
-
+
@@ -2793,7 +2793,7 @@
-
+
@@ -2847,7 +2847,7 @@
-
+
@@ -4545,7 +4545,7 @@
-
+
diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/constraints.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/constraints.mps
index 1596a0e46..e3f44a3a7 100644
--- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/constraints.mps
+++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/constraints.mps
@@ -124,7 +124,7 @@
-
+
diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps
index 46e918777..4548e0858 100644
--- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps
+++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/editor.mps
@@ -20,9 +20,6 @@
-
-
-
@@ -81,9 +78,6 @@
-
-
-
@@ -1636,7 +1630,7 @@
-
+
@@ -1684,7 +1678,7 @@
-
+
@@ -1739,9 +1733,7 @@
-
-
-
+
@@ -1773,7 +1765,7 @@
-
+
@@ -1788,7 +1780,7 @@
-
+
@@ -1863,7 +1855,7 @@
-
+
@@ -1884,7 +1876,7 @@
-
+
@@ -2403,26 +2395,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -2452,7 +2424,7 @@
-
+
@@ -2466,7 +2438,7 @@
-
+
@@ -2558,5 +2530,10 @@
+
+
+
+
+
diff --git a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/structure.mps b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/structure.mps
index 88377e5ae..99dc19749 100644
--- a/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/structure.mps
+++ b/code/grammarcells/languages/com.mbeddr.mpsutil.grammarcells/models/com/mbeddr/mpsutil/grammarcells/structure.mps
@@ -587,8 +587,8 @@
-
-
+
+
@@ -689,7 +689,7 @@
-
+
@@ -703,21 +703,21 @@
-
+
-
+
-
+
@@ -731,19 +731,19 @@
-
+
-
+
-
+
@@ -758,8 +758,8 @@
-
-
+
+
@@ -779,21 +779,21 @@
-
+
-
+
-
+
@@ -1093,8 +1093,8 @@
-
-
+
+
diff --git a/code/multiline/solutions/de.slisson.mps.editor.multiline.runtime/models/de/slisson/mps/editor/multiline/runtime.mps b/code/multiline/solutions/de.slisson.mps.editor.multiline.runtime/models/de/slisson/mps/editor/multiline/runtime.mps
index 8d5a94762..8905609cd 100644
--- a/code/multiline/solutions/de.slisson.mps.editor.multiline.runtime/models/de/slisson/mps/editor/multiline/runtime.mps
+++ b/code/multiline/solutions/de.slisson.mps.editor.multiline.runtime/models/de/slisson/mps/editor/multiline/runtime.mps
@@ -4,6 +4,7 @@
+
@@ -28,6 +29,12 @@
+
+
+
+
+
+
@@ -134,7 +141,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -462,34 +487,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -500,6 +497,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
@@ -507,217 +516,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -730,6 +528,18 @@
+
+
+
+
+
+
+
+
+
+
+
+