summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEvan Martin <martine@danga.com>2012-07-17 16:34:10 (GMT)
committerEvan Martin <martine@danga.com>2012-07-17 23:13:39 (GMT)
commit4bfc66b3a955ebc82779f8eaa7b4c56a52d4b4c0 (patch)
tree6a03923da8afc11eecb03a59e14349d42ce71011
parent1e2514e5212f24234c50c775a2d2333e31dd4aa8 (diff)
downloadNinja-4bfc66b3a955ebc82779f8eaa7b4c56a52d4b4c0.zip
Ninja-4bfc66b3a955ebc82779f8eaa7b4c56a52d4b4c0.tar.gz
Ninja-4bfc66b3a955ebc82779f8eaa7b4c56a52d4b4c0.tar.bz2
subprocess_test: make SetWithLots run on all non-Windows platforms
I think it might have been an oversight that this was marked Linux-specific.
-rw-r--r--src/subprocess_test.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/subprocess_test.cc b/src/subprocess_test.cc
index 0c10250..7dbaf97 100644
--- a/src/subprocess_test.cc
+++ b/src/subprocess_test.cc
@@ -16,9 +16,11 @@
#include "test.h"
-#ifdef linux
-// required by SubprocessTest
+#ifndef _WIN32
+// SetWithLots need setrlimit.
+#include <sys/time.h>
#include <sys/resource.h>
+#include <unistd.h>
#endif
namespace {
@@ -147,7 +149,7 @@ TEST_F(SubprocessTest, SetWithMulti) {
}
}
-#ifdef linux
+#ifndef _WIN32
TEST_F(SubprocessTest, SetWithLots) {
// Arbitrary big number; needs to be over 1024 to confirm we're no longer
// hostage to pselect.
@@ -174,4 +176,4 @@ TEST_F(SubprocessTest, SetWithLots) {
}
ASSERT_EQ(kNumProcs, subprocs_.finished_.size());
}
-#endif // linux
+#endif // _WIN32