diff options
author | kientzle <kientzle@FreeBSD.org> | 2009-03-05 18:30:50 +0000 |
---|---|---|
committer | kientzle <kientzle@FreeBSD.org> | 2009-03-05 18:30:50 +0000 |
commit | 02ea6bca591c13b528ae6dc9a0f8ba19ee8d1e38 (patch) | |
tree | 4377ab36667b3514f74bd971d625d060df1a83b3 /lib/libarchive/test/main.c | |
parent | 88976b7afbe56eaf0e04097d3142b12fdce0eea8 (diff) | |
download | FreeBSD-src-02ea6bca591c13b528ae6dc9a0f8ba19ee8d1e38.zip FreeBSD-src-02ea6bca591c13b528ae6dc9a0f8ba19ee8d1e38.tar.gz |
Merge r386,r395,r451 from libarchive.googlecode.com: On Windows, break
into the debugger on test setup failures (otherwise, the console window
just goes away and you can't see what went wrong). On all platforms,
clean up a stray buffer before exiting.
Diffstat (limited to 'lib/libarchive/test/main.c')
-rw-r--r-- | lib/libarchive/test/main.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libarchive/test/main.c b/lib/libarchive/test/main.c index 4927ba0..16d4bee 100644 --- a/lib/libarchive/test/main.c +++ b/lib/libarchive/test/main.c @@ -35,6 +35,8 @@ #include <time.h> #ifdef _WIN32 #include <crtdbg.h> +#include <windows.h> +#include <winbase.h> #endif /* @@ -910,10 +912,13 @@ get_refdir(void) strncat(tried, "\n", sizeof(tried) - strlen(tried) - 1); } +#if defined(_WIN32) && defined(_DEBUG) /* You should have to add "$(TargetDir)" to * Properties > Configuration Properties > Debugging > Working Directory, * if you are running libarchive_test.exe on Visual Studio. */ + DebugBreak(); +#endif printf("Unable to locate known reference file %s\n", KNOWNREF); printf(" Checked following directories:\n%s\n", tried); exit(1); @@ -1092,6 +1097,7 @@ int main(int argc, char **argv) i = atoi(*argv); if (**argv < '0' || **argv > '9' || i < 0 || i >= limit) { printf("*** INVALID Test %s\n", *argv); + free(refdir_alloc); usage(progname); } else { if (test_run(i, tmpdir)) |