JavaScript Test Library - automation, proper handling of exit codes for timed executions

This commit is contained in:
bob%bclary.com 2005-11-07 07:10:59 +00:00
Родитель bfe41df825
Коммит cef24765d4
2 изменённых файлов: 9 добавлений и 8 удалений

Просмотреть файл

@ -109,14 +109,14 @@ jsbrowser: HOOK=http%3A%2F%2F$(TEST_HTTP)%2Ftests%2Fmozilla.org%2Fjs%2Fuserhook-
jsbrowser: menu.html
$(call msg,jsbrowser,Begin JavaScript Test Suite)
$(TEST_BIN)/init-profile.sh -b $(TEST_EXE) -n $(TEST_PROFILE) -e $(TEST_DIR)/xpi -u $(TEST_DIR)/prefs/test-user.js -t js | $(call prepend,jsbrowser)
$(TEST_BIN)/timed_run $(TEST_JSBROWSER_TIMEOUT) "-" $(TEST_EXE) -P $(TEST_PROFILE) -chrome chrome:$(SPIDER)%26url%3D$(URL)%26scripturl%3D$(HOOK) 2>&1 | $(call prepend,jsbrowser)
-$(TEST_BIN)/timed_run $(TEST_JSBROWSER_TIMEOUT) "-" $(TEST_EXE) -P $(TEST_PROFILE) -chrome chrome:$(SPIDER)%26url%3D$(URL)%26scripturl%3D$(HOOK) 2>&1 | $(call prepend,jsbrowser)
$(call msg,jsbrowser,End JavaScript Test Suite)
e4xbrowser: HOOK=http%3A%2F%2F$(TEST_HTTP)%2Ftests%2Fmozilla.org%2Fjs%2Fuserhook-e4x.js
e4xbrowser: menu.html
$(call msg,jse4xbrowser,Begin JavaScript E4X Test Suite)
$(TEST_BIN)/init-profile.sh -b $(TEST_EXE) -n $(TEST_PROFILE) -e $(TEST_DIR)/xpi -u $(TEST_DIR)/prefs/test-user.js -t e4x | $(call prepend,jse4xbrowser)
$(TEST_BIN)/timed_run $(TEST_E4XBROWSER_TIMEOUT) "-" $(TEST_EXE) -P $(TEST_PROFILE) -chrome chrome:$(SPIDER)%26url%3D$(URL)%26scripturl%3D$(HOOK) 2>&1 | $(call prepend,jse4xbrowser)
-$(TEST_BIN)/timed_run $(TEST_E4XBROWSER_TIMEOUT) "-" $(TEST_EXE) -P $(TEST_PROFILE) -chrome chrome:$(SPIDER)%26url%3D$(URL)%26scripturl%3D$(HOOK) 2>&1 | $(call prepend,jse4xbrowser)
$(call msg,jse4xbrowser,End JavaScript E4X Test Suite)
menu.html: menuhead.html menufoot.html $(TEST_JS) Makefile

Просмотреть файл

@ -79,17 +79,18 @@ my @args = ("$bindir/timed_run",
$profile,
"-chrome",
$spider);
#print "args: " . join(',', @args) . "\n";
my $rc = system @args;
my $signal = $rc & 0x00ff;
if ($signal == 2)
system @args;
my $rc = $? >> 8;
if ($rc == 99)
{
die "received signal: $signal\n";
exit $rc;
}
sub usage
{
return "Usage: each.pl bindir browserexe profile timeout jsfile hook\n";
return "Usage: each.pl bindir timeout browserexe profile jsfile hook\n";
}
1;