diff options
author | Yang Tse <yangsita@gmail.com> | 2011-05-25 20:22:46 +0200 |
---|---|---|
committer | Yang Tse <yangsita@gmail.com> | 2011-05-25 20:24:03 +0200 |
commit | 9f390a356ea464183cc11ef44c48968ccdcd36ac (patch) | |
tree | a6b88053c996b6c390f568a79605ead7d305a94e /tests/libtest | |
parent | 017ee34bbad9885e524f735401be7ad859cdbd84 (diff) |
unit tests: build adjustment
Also define UNITTESTS macro when building unit test sources.
Fixing compiler warning: external definition with no prior declaration
Diffstat (limited to 'tests/libtest')
-rw-r--r-- | tests/libtest/first.c | 3 | ||||
-rw-r--r-- | tests/libtest/test.h | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/tests/libtest/first.c b/tests/libtest/first.c index a6f8e3cc2..205d3943f 100644 --- a/tests/libtest/first.c +++ b/tests/libtest/first.c @@ -49,7 +49,10 @@ char *libtest_arg2=NULL; char *libtest_arg3=NULL; int test_argc; char **test_argv; + +#ifdef UNITTESTS int unitfail; /* for unittests */ +#endif int main(int argc, char **argv) { diff --git a/tests/libtest/test.h b/tests/libtest/test.h index e9638a240..33d7bed83 100644 --- a/tests/libtest/test.h +++ b/tests/libtest/test.h @@ -73,3 +73,6 @@ extern int select_test(int num_fds, fd_set *rd, fd_set *wr, fd_set *exc, extern int test(char *URL); /* the actual test function provided by each individual libXXX.c file */ +#ifdef UNITTESTS +extern int unitfail; +#endif |