diff options
author | Craig Tiller <ctiller@google.com> | 2015-01-14 11:19:09 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-01-14 11:19:09 -0800 |
commit | 6d43445a1a72028442cadd4fafd16df363b1f1cf (patch) | |
tree | 1a08265225b2a2cc14ebf69ca11e5e44f97d6591 /test | |
parent | cc19464dd5d51f0f38771e997838f9ad9a9c06ff (diff) | |
parent | 29512b56d0d16bec59f95999afbabb0d6f6e4aab (diff) |
Merge github.com:google/grpc into api
Diffstat (limited to 'test')
-rw-r--r-- | test/build/event2.c | 8 | ||||
-rw-r--r-- | test/core/util/test_config.c | 16 |
2 files changed, 15 insertions, 9 deletions
diff --git a/test/build/event2.c b/test/build/event2.c deleted file mode 100644 index f632b1e43e..0000000000 --- a/test/build/event2.c +++ /dev/null @@ -1,8 +0,0 @@ -/* This is only a compilation test, to see if we have libevent installed. */ - -#include <event2/event.h> - -int main() { - event_base_new(); - return 0; -} diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 1a8f1a5f49..94245d85bc 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -33,14 +33,28 @@ #include "test/core/util/test_config.h" +#include <grpc/support/port_platform.h> #include <stdlib.h> #include <signal.h> + +#if GPR_GETPID_IN_UNISTD_H #include <unistd.h> +static int seed() { + return getpid(); +} +#endif + +#if GPR_GETPID_IN_PROCESS_H +#include <process.h> +static int seed(void) { + return _getpid(); +} +#endif void grpc_test_init(int argc, char **argv) { /* disable SIGPIPE */ signal(SIGPIPE, SIG_IGN); /* seed rng with pid, so we don't end up with the same random numbers as a concurrently running test binary */ - srand(getpid()); + srand(seed()); } |