fix test execution error when running example and example64 in parallel

This commit is contained in:
Adrian Imboden 2021-03-25 09:16:00 +00:00
parent cacf7f1d4e
commit 369ad7cfee
2 changed files with 2 additions and 7 deletions

View File

@ -232,6 +232,7 @@ endif()
add_executable(example test/example.c)
target_link_libraries(example zlib)
set_target_properties(example PROPERTIES COMPILE_FLAGS "-DTESTFILE=\\\"foo-gz\\\"")
add_test(example example)
add_executable(minigzip test/minigzip.c)
@ -240,7 +241,7 @@ target_link_libraries(minigzip zlib)
if(HAVE_OFF64_T)
add_executable(example64 test/example.c)
target_link_libraries(example64 zlib)
set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64")
set_target_properties(example64 PROPERTIES COMPILE_FLAGS "-D_FILE_OFFSET_BITS=64 -DTESTFILE=\\\"foo-gz-64\\\"")
add_test(example64 example64)
add_executable(minigzip64 test/minigzip.c)

View File

@ -13,12 +13,6 @@
# include <stdlib.h>
#endif
#if defined(VMS) || defined(RISCOS)
# define TESTFILE "foo-gz"
#else
# define TESTFILE "foo.gz"
#endif
#define CHECK_ERR(err, msg) { \
if (err != Z_OK) { \
fprintf(stderr, "%s error: %d\n", msg, err); \