[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:
parent
2e0ed500dc
commit
0ba9808982
|
@ -337,7 +337,9 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest
|
||||||
}
|
}
|
||||||
|
|
||||||
public String execRecognizer() {
|
public String execRecognizer() {
|
||||||
compile();
|
boolean success = compile();
|
||||||
|
assertTrue(success);
|
||||||
|
|
||||||
String output = execTest();
|
String output = execTest();
|
||||||
if ( output!=null && output.length()==0 ) {
|
if ( output!=null && output.length()==0 ) {
|
||||||
output = null;
|
output = null;
|
||||||
|
@ -507,6 +509,7 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest
|
||||||
runtimeProjPath
|
runtimeProjPath
|
||||||
};
|
};
|
||||||
boolean success = runProcess(args, tmpdir);
|
boolean success = runProcess(args, tmpdir);
|
||||||
|
assertTrue(success);
|
||||||
|
|
||||||
// restore project
|
// restore project
|
||||||
args = new String[] {
|
args = new String[] {
|
||||||
|
@ -516,6 +519,7 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest
|
||||||
"--no-dependencies"
|
"--no-dependencies"
|
||||||
};
|
};
|
||||||
success = runProcess(args, tmpdir);
|
success = runProcess(args, tmpdir);
|
||||||
|
assertTrue(success);
|
||||||
|
|
||||||
// build test
|
// build test
|
||||||
args = new String[] {
|
args = new String[] {
|
||||||
|
@ -527,6 +531,7 @@ public class BaseCSharpTest implements RuntimeTestSupport /*, SpecialRuntimeTest
|
||||||
"--no-dependencies"
|
"--no-dependencies"
|
||||||
};
|
};
|
||||||
success = runProcess(args, tmpdir);
|
success = runProcess(args, tmpdir);
|
||||||
|
assertTrue(success);
|
||||||
}
|
}
|
||||||
catch(Exception e) {
|
catch(Exception e) {
|
||||||
e.printStackTrace(System.err);
|
e.printStackTrace(System.err);
|
||||||
|
|
Loading…
Reference in New Issue