[CSharp] Assert that test compilation succeeded.

Assert that the dotnet restore / build commands succeeded.  If we
get a failure at this point, the test is obviously going to fail, and
we're masking the error by trying to push on with other commands.
This commit is contained in:
Ewan Mellor 2017-11-14 01:32:00 -08:00
parent 2e0ed500dc
commit 0ba9808982
No known key found for this signature in database
GPG Key ID: 7CE1C6BC9EC8645D
1 changed files with 6 additions and 1 deletions

View File

@ -337,7 +337,9 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest
}
public String execRecognizer() {
compile();
boolean success = compile();
assertTrue(success);
String output = execTest();
if ( output!=null && output.length()==0 ) {
output = null;
@ -507,6 +509,7 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest
runtimeProjPath
};
boolean success = runProcess(args, tmpdir);
assertTrue(success);
// restore project
args = new String[] {
@ -516,6 +519,7 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest
"--no-dependencies"
};
success = runProcess(args, tmpdir);
assertTrue(success);
// build test
args = new String[] {
@ -527,6 +531,7 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest
"--no-dependencies"
};
success = runProcess(args, tmpdir);
assertTrue(success);
}
catch(Exception e) {
e.printStackTrace(System.err);