зеркало из https://github.com/mozilla/gecko-dev.git
Bug 764527 - Catch exceptions thrown during robocop tests. r=jmaher
This commit is contained in:
Родитель
a51f1b21bf
Коммит
c920eca88f
|
@ -74,6 +74,20 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||||
mRawBaseUrl = ((String)config.get("rawhost")).replaceAll("(/$)", "");
|
mRawBaseUrl = ((String)config.get("rawhost")).replaceAll("(/$)", "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void runTest() throws Throwable {
|
||||||
|
try {
|
||||||
|
super.runTest();
|
||||||
|
} catch (Throwable t) {
|
||||||
|
if (mAsserter != null) {
|
||||||
|
mAsserter.dumpLog("Exception caught during test!", t);
|
||||||
|
mAsserter.ok(false, "Exception caught", t.toString());
|
||||||
|
}
|
||||||
|
// re-throw to continue bail-out
|
||||||
|
throw t;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void setTestType(String type) {
|
public void setTestType(String type) {
|
||||||
mTestType = type;
|
mTestType = type;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче