[SCM] WebKit Debian packaging branch, debian/unstable, updated. debian/1.1.15-1-40151-g37bb677
kocienda
kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Sat Sep 26 05:46:05 UTC 2009
The following commit has been merged in the debian/unstable branch:
commit 4727ae6d6c91b8802b06b8eedd368966883d3caf
Author: kocienda <kocienda at 268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Sep 21 16:56:13 2001 +0000
Fixed catching of status code from forked process. Sometimes
you just gotta read the man page!
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/kwq/tests/harness.c b/WebCore/kwq/tests/harness.c
index 1e3e499..af99fd0 100644
--- a/WebCore/kwq/tests/harness.c
+++ b/WebCore/kwq/tests/harness.c
@@ -128,9 +128,9 @@ int runtest(const char *test) {
int chklen;
struct stat buf;
int pad;
- int result;
+ int status;
- result = 0;
+ status = 0;
strcpy(chkname, test);
strcat(chkname, ".chk");
@@ -174,7 +174,7 @@ int runtest(const char *test) {
close(fd);
/* exec test file */
- result = execl(test, test, NULL);
+ execl(test, test, NULL);
fprintf(stderr, "exec of %s failed\n", test);
exit(1);
@@ -186,14 +186,20 @@ int runtest(const char *test) {
}
/* Wait for child to complete before returning */
- while (wait(NULL) != pid) {} /* empty loop */
+ while (wait(&status) != pid) {} /* empty loop */
+ if (WIFEXITED(status)) {
+ status = WEXITSTATUS(status);
+ }
+ else {
+ status = -1;
+ }
/* collect result and check output from files */
outlen = getfile(outname, &out);
chklen = getfile(chkname, &chk);
/* compare output with expected result */
- if (result != 0) {
+ if (status != 0) {
no++;
printf("fail [exit code]\n");
}
@@ -204,7 +210,7 @@ int runtest(const char *test) {
else if (memcmp(out, chk, chklen) != 0) {
no++;
printf("fail [!= output]\n");
- }
+ }
else {
ok++;
printf(".ok\n");
diff --git a/WebCore/src/kwq/tests/harness.c b/WebCore/src/kwq/tests/harness.c
index 1e3e499..af99fd0 100644
--- a/WebCore/src/kwq/tests/harness.c
+++ b/WebCore/src/kwq/tests/harness.c
@@ -128,9 +128,9 @@ int runtest(const char *test) {
int chklen;
struct stat buf;
int pad;
- int result;
+ int status;
- result = 0;
+ status = 0;
strcpy(chkname, test);
strcat(chkname, ".chk");
@@ -174,7 +174,7 @@ int runtest(const char *test) {
close(fd);
/* exec test file */
- result = execl(test, test, NULL);
+ execl(test, test, NULL);
fprintf(stderr, "exec of %s failed\n", test);
exit(1);
@@ -186,14 +186,20 @@ int runtest(const char *test) {
}
/* Wait for child to complete before returning */
- while (wait(NULL) != pid) {} /* empty loop */
+ while (wait(&status) != pid) {} /* empty loop */
+ if (WIFEXITED(status)) {
+ status = WEXITSTATUS(status);
+ }
+ else {
+ status = -1;
+ }
/* collect result and check output from files */
outlen = getfile(outname, &out);
chklen = getfile(chkname, &chk);
/* compare output with expected result */
- if (result != 0) {
+ if (status != 0) {
no++;
printf("fail [exit code]\n");
}
@@ -204,7 +210,7 @@ int runtest(const char *test) {
else if (memcmp(out, chk, chklen) != 0) {
no++;
printf("fail [!= output]\n");
- }
+ }
else {
ok++;
printf(".ok\n");
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list