build-sys: split test cases in lib/ into their own files
In order to avoid compiling the same source files twice, with and without the TEST_PROGRAM define. Tested that the build still works and that `make distcheck` works as expected. Tested that the test_* programs in lib/ keep working. (Though they are not really invoked by `make check` and in particular test_nsutils is quite useless, test_fileutils also quite poor.) Signed-off-by: Filipe Brandenburger <filbranden@google.com>
This commit is contained in:
@ -43,13 +43,3 @@ void close_stdout(void)
|
||||
if (close_stream(stderr) != 0)
|
||||
_exit(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#ifdef TEST_PROGRAM
|
||||
#include <stdio.h>
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
atexit(close_stdout);
|
||||
printf("Hello, World!\n");
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
#endif /* TEST_PROGRAM */
|
||||
|
Reference in New Issue
Block a user