1
1
mirror of https://github.com/ariya/phantomjs.git synced 2024-10-26 14:29:13 +03:00

Small test suite improvements:

* handle failures reported by done() correctly
 * support valgrind as a debugger
This commit is contained in:
Zack Weinberg 2015-12-22 17:17:57 -05:00
parent 9ac8cccf0a
commit 476b7b9401
2 changed files with 4 additions and 0 deletions

View File

@ -760,6 +760,8 @@ class TestRunner(object):
return ["gdb", "--args", self.phantomjs_exe]
elif debugger == "lldb":
return ["lldb", "--", self.phantomjs_exe]
elif debugger == "valgrind":
return ["valgrind", self.phantomjs_exe]
else:
raise RuntimeError("Don't know how to invoke " + self.debugger)

View File

@ -785,6 +785,8 @@ Test.prototype.fail = function fail(message) {
Test.prototype.done = function done() {
var i;
this.in_done = true;
if (this.timeout_id !== null) {
clearTimeout(this.timeout_id);
this.timeout_id = null;