diff options
| author | Garrett D'Amore <garrett@damore.org> | 2017-08-09 16:13:24 -0700 |
|---|---|---|
| committer | Garrett D'Amore <garrett@damore.org> | 2017-08-09 16:13:24 -0700 |
| commit | 032c74653cc2035b539ee48183055a9354e9b888 (patch) | |
| tree | 0bbd532f8f91e796c80a63a89891132924d3651b /tests/convey.h | |
| parent | e469d1084d144961a72c4db1fb84cbd29ed4df8a (diff) | |
| download | nng-032c74653cc2035b539ee48183055a9354e9b888.tar.gz nng-032c74653cc2035b539ee48183055a9354e9b888.tar.bz2 nng-032c74653cc2035b539ee48183055a9354e9b888.zip | |
fixes #48 tcp sometimes fails to get a port
Diffstat (limited to 'tests/convey.h')
| -rw-r--r-- | tests/convey.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/convey.h b/tests/convey.h index bb52ad7d..d367cfcc 100644 --- a/tests/convey.h +++ b/tests/convey.h @@ -80,6 +80,8 @@ extern int conveyStart(conveyScope *, const char *); extern int conveyLoop(conveyScope *, int); extern void conveyFinish(conveyScope *, int *); extern int conveyMain(int, char **); +extern char *conveyGetEnv(const char *); +extern int conveyPutEnv(const char *, char *); extern void conveyAssertPass(const char *, const char *, int); extern void conveyAssertSkip(const char *, const char *, int); @@ -168,6 +170,17 @@ extern void conveyPrintf(const char *, int, const char *, ...); } /* + * ConveyGetEnv is used to get environment variables, which can be + * overridden with -p <name>=<value> on the command line. + */ +#define ConveyGetEnv(name) conveyGetEnv(name) + +/* + * ConveyPutEnv is used to change environment variables. This is not + * thread safe! + */ +#define ConveyPutEnv(name, value) conveyPutEnv(name, value) +/* * ConveyTest creates a top-level test instance, which can contain multiple * Convey blocks. */ |
