about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-09-08 13:28:03 -0700
committerBrian Anderson <banderson@mozilla.com>2011-09-11 17:31:37 -0700
commitf1e348ce6ae8b80bcb3ffd81934d82dbdddc7647 (patch)
treea49843e8c90cec28e482c0786ff635e7e6928af7
parenta1131748c2e86bcbcbbbec81a83ca844e58073b4 (diff)
downloadrust-f1e348ce6ae8b80bcb3ffd81934d82dbdddc7647.tar.gz
rust-f1e348ce6ae8b80bcb3ffd81934d82dbdddc7647.zip
Change the exit status used for valgrind errors and check for it in tests
-rw-r--r--mk/platform.mk2
-rw-r--r--src/test/compiletest/procsrv.rs2
-rw-r--r--src/test/compiletest/runtest.rs6
3 files changed, 3 insertions, 7 deletions
diff --git a/mk/platform.mk b/mk/platform.mk
index c8c4fef41fd..a647e9cb3c5 100644
--- a/mk/platform.mk
+++ b/mk/platform.mk
@@ -114,7 +114,7 @@ ifdef CFG_UNIXY
   endif
   ifdef CFG_VALGRIND
     CFG_VALGRIND += --leak-check=full \
-                    --error-exitcode=1 \
+                    --error-exitcode=100 \
                     --quiet --suppressions=$(CFG_SRC_DIR)src/etc/x86.supp
   endif
 endif
diff --git a/src/test/compiletest/procsrv.rs b/src/test/compiletest/procsrv.rs
index 63a3807f6a5..fcf611cccbf 100644
--- a/src/test/compiletest/procsrv.rs
+++ b/src/test/compiletest/procsrv.rs
@@ -66,7 +66,7 @@ fn run(handle: &handle, lib_path: &str, prog: &str, args: &[str],
     writeclose(resp.infd, input);
     let output = readclose(resp.outfd);
     let errput = readclose(resp.errfd);
-    let status = os::waitpid(resp.pid);
+    let status = run::waitpid(resp.pid);
     ret {status: status, out: output, err: errput};
 }
 
diff --git a/src/test/compiletest/runtest.rs b/src/test/compiletest/runtest.rs
index 87ae7750e03..373db1a10ad 100644
--- a/src/test/compiletest/runtest.rs
+++ b/src/test/compiletest/runtest.rs
@@ -55,11 +55,7 @@ fn run_rfail_test(cx: &cx, props: &test_props, testfile: &str) {
         fatal_procres("run-fail test didn't produce an error!", procres);
     }
 
-    // This is the value valgrind returns on failure
-    // FIXME: Why is this value neither the value we pass to
-    // valgrind as --error-exitcode (1), nor the value we see as the
-    // exit code on the command-line (137)?
-    const valgrind_err: int = 9;
+    const valgrind_err: int = 100;
     if procres.status == valgrind_err {
         fatal_procres("run-fail test isn't valgrind-clean!", procres);
     }