summaryrefslogtreecommitdiffstats
path: root/src/subprocess_test.cc
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2014-11-24 17:37:47 (GMT)
committerNico Weber <thakis@chromium.org>2014-11-24 17:37:47 (GMT)
commit3309498174411e02e7680ea8b470bb7d1d70bdb8 (patch)
tree2c84adc7263350e6929dca36d778ea7e29fe5cc5 /src/subprocess_test.cc
parent85e13c163d0129216fb382df6a53d11393c4c0c2 (diff)
parentb532cab080bbde2068ab49aba814c7176111681f (diff)
downloadNinja-3309498174411e02e7680ea8b470bb7d1d70bdb8.zip
Ninja-3309498174411e02e7680ea8b470bb7d1d70bdb8.tar.gz
Ninja-3309498174411e02e7680ea8b470bb7d1d70bdb8.tar.bz2
v1.5.3v1.5.3
Diffstat (limited to 'src/subprocess_test.cc')
-rw-r--r--src/subprocess_test.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/subprocess_test.cc b/src/subprocess_test.cc
index 775a13a..8a0787c 100644
--- a/src/subprocess_test.cc
+++ b/src/subprocess_test.cc
@@ -18,6 +18,7 @@
#ifndef _WIN32
// SetWithLots need setrlimit.
+#include <stdio.h>
#include <sys/time.h>
#include <sys/resource.h>
#include <unistd.h>
@@ -92,7 +93,7 @@ TEST_F(SubprocessTest, InterruptParent) {
return;
}
- ADD_FAILURE() << "We should have been interrupted";
+ ASSERT_FALSE("We should have been interrupted");
}
TEST_F(SubprocessTest, Console) {
@@ -171,14 +172,15 @@ TEST_F(SubprocessTest, SetWithMulti) {
TEST_F(SubprocessTest, SetWithLots) {
// Arbitrary big number; needs to be over 1024 to confirm we're no longer
// hostage to pselect.
- const size_t kNumProcs = 1025;
+ const unsigned kNumProcs = 1025;
// Make sure [ulimit -n] isn't going to stop us from working.
rlimit rlim;
ASSERT_EQ(0, getrlimit(RLIMIT_NOFILE, &rlim));
- ASSERT_GT(rlim.rlim_cur, kNumProcs)
- << "Raise [ulimit -n] well above " << kNumProcs
- << " to make this test go";
+ if (!EXPECT_GT(rlim.rlim_cur, kNumProcs)) {
+ printf("Raise [ulimit -n] well above %u to make this test go\n", kNumProcs);
+ return;
+ }
vector<Subprocess*> procs;
for (size_t i = 0; i < kNumProcs; ++i) {