[Getdata-commits] SF.net SVN: getdata:[497] trunk/getdata
Scientific Database Format
Brought to you by:
ketiltrout
|
From: <ket...@us...> - 2010-12-08 00:54:39
|
Revision: 497
http://getdata.svn.sourceforge.net/getdata/?rev=497&view=rev
Author: ketiltrout
Date: 2010-12-08 00:54:32 +0000 (Wed, 08 Dec 2010)
Log Message:
-----------
Always build encoding tests, but skip them (return 77) if they won't work.
Also the test.h patch from Peter.
Modified Paths:
--------------
trunk/getdata/ChangeLog
trunk/getdata/m4/encoding.m4
trunk/getdata/test/Makefile.am
trunk/getdata/test/bzip_get.c
trunk/getdata/test/bzip_get_get.c
trunk/getdata/test/bzip_move_from.c
trunk/getdata/test/bzip_nframes.c
trunk/getdata/test/gzip_get.c
trunk/getdata/test/gzip_get_get.c
trunk/getdata/test/gzip_move_from.c
trunk/getdata/test/gzip_nframes.c
trunk/getdata/test/lzma_get.c
trunk/getdata/test/lzma_nframes.c
trunk/getdata/test/slim_get.c
trunk/getdata/test/slim_nframes.c
trunk/getdata/test/test.h
trunk/getdata/test/xz_get.c
trunk/getdata/test/xz_nframes.c
Modified: trunk/getdata/ChangeLog
===================================================================
--- trunk/getdata/ChangeLog 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/ChangeLog 2010-12-08 00:54:32 UTC (rev 497)
@@ -1,3 +1,14 @@
+2010-12-08 D. V. Wiebe <ge...@ke...> svn:497
+ * m4/encoding.m4: Replace TEST_<foo> AM_CONDITIONALs with a preprocessor
+ symbols.
+ * test/Makefile.am: Remove TEST_<foo> conditionals.
+ * test/gzip_move_from.c test/bzip_get_get.c test/gzip_get_get.c
+ test/gzip_get.c test/xz_nframes.c test/slim_nframes.c test/lzma_nframes.c
+ test/slim_get.c test/lzma_get.c test/bzip_move_from.c test/xz_get.c: If
+ helper binaries are unavailable, just skip these tests.
+
+ * test/test.h: MSVC mkdir() patch from Peter Kümmel.
+
2010-12-07 D. V. Wiebe <ge...@ke...> svn:494
MSVC fixes from Peter:
Modified: trunk/getdata/m4/encoding.m4
===================================================================
--- trunk/getdata/m4/encoding.m4 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/m4/encoding.m4 2010-12-08 00:54:32 UTC (rev 497)
@@ -106,9 +106,11 @@
$7
])
AM_CONDITIONAL(AS_TR_CPP([USE_$1]), [test "x$use_$1" = "xyes"])
-AM_CONDITIONAL(AS_TR_CPP([TEST_$1]),
- [test "x$path_$5" != "xnot found" -a "x$path_$6" != "xnot found"])
+if test "x$path_$5" != "xnot found" -a "x$path_$6" != "xnot found"; then
+ AC_DEFINE(AS_TR_CPP([TEST_$1]), [], [ Define to enable $1 tests ])
+fi
+
dnl add to summary and private lib list
if test "x$use_$1" != "xno"; then
if test "x$use_modules" != "xno"; then
Modified: trunk/getdata/test/Makefile.am
===================================================================
--- trunk/getdata/test/Makefile.am 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/Makefile.am 2010-12-08 00:54:32 UTC (rev 497)
@@ -67,9 +67,7 @@
BOF_TESTS=bof bof_lincom bof_phase
-if TEST_BZIP2
BZIP_TESTS=bzip_get bzip_get_get bzip_move_from bzip_nframes
-endif
CVLIST_TESTS=cvlist cvlist_array cvlist_array_meta cvlist_invalid cvlist_meta \
cvlist_meta_invalid
@@ -179,9 +177,7 @@
GLOBAL_TESTS=global_name global_ref global_ref_empty global_ref_set
-if TEST_GZIP
GZIP_TESTS=gzip_get gzip_get_get gzip_move_from gzip_nframes
-endif
HEADER_TESTS=header_complex
@@ -196,9 +192,7 @@
legacy_nonexistent legacy_put legacy_spf
endif
-if TEST_LZMA
LZMA_TESTS=lzma_get lzma_nframes
-endif
MADD_TESTS=madd madd_bit madd_bit_invalid madd_carray madd_clincom madd_const \
madd_cpolynom madd_crecip madd_crecip89 madd_divide madd_lincom \
@@ -284,9 +278,7 @@
repr_real_m repr_real_r repr_uint16 repr_uint32 repr_uint64 \
repr_uint8
-if TEST_SLIM
SLIM_TESTS=slim_get slim_nframes
-endif
SVLIST_TESTS=svlist svlist_invalid svlist_meta svlist_meta_invalid
@@ -306,9 +298,7 @@
VLIST_TESTS=vlist vlist_invalid vlist_meta vlist_meta_invalid
-if TEST_LZMA
XZ_TESTS=xz_get xz_nframes
-endif
TESTS=$(ADD_TESTS) $(ALTER_TESTS) $(ASCII_TESTS) \
$(BOF_TESTS) $(BZIP_TESTS) $(CLOSE_TESTS) \
Modified: trunk/getdata/test/bzip_get.c
===================================================================
--- trunk/getdata/test/bzip_get.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/bzip_get.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -13,6 +13,9 @@
int main(void)
{
+#ifndef TEST_BZIP2
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -68,4 +71,5 @@
#endif
return r;
+#endif
}
Modified: trunk/getdata/test/bzip_get_get.c
===================================================================
--- trunk/getdata/test/bzip_get_get.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/bzip_get_get.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -13,7 +13,7 @@
int main(void)
{
-#ifndef USE_BZIP2
+#if !defined USE_BZIP2 || !defined TEST_BZIP2
return 77; /* skip test */
#else
const char* filedir = __TEST__ "dirfile";
Modified: trunk/getdata/test/bzip_move_from.c
===================================================================
--- trunk/getdata/test/bzip_move_from.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/bzip_move_from.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -15,6 +15,9 @@
int main(void)
{
+#ifndef TEST_BZIP2
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* format1 = __TEST__ "dirfile/format1";
@@ -101,4 +104,5 @@
gd_free_entry_strings(&E);
return r;
+#endif
}
Modified: trunk/getdata/test/bzip_nframes.c
===================================================================
--- trunk/getdata/test/bzip_nframes.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/bzip_nframes.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -12,6 +12,9 @@
int main(void)
{
+#ifndef TEST_BZIP2
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -65,4 +68,5 @@
#endif
return r;
+#endif
}
Modified: trunk/getdata/test/gzip_get.c
===================================================================
--- trunk/getdata/test/gzip_get.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/gzip_get.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -15,6 +15,9 @@
int main(void)
{
+#ifndef TEST_GZIP
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -71,4 +74,5 @@
#endif
return r;
+#endif
}
Modified: trunk/getdata/test/gzip_get_get.c
===================================================================
--- trunk/getdata/test/gzip_get_get.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/gzip_get_get.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -13,7 +13,7 @@
int main(void)
{
-#ifndef USE_GZIP
+#if !defined USE_GZIP || !defined TEST_GZIP
return 77; /* skip test */
#else
const char* filedir = __TEST__ "dirfile";
Modified: trunk/getdata/test/gzip_move_from.c
===================================================================
--- trunk/getdata/test/gzip_move_from.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/gzip_move_from.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -15,6 +15,9 @@
int main(void)
{
+#ifndef TEST_GZIP
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* format1 = __TEST__ "dirfile/format1";
@@ -101,4 +104,5 @@
gd_free_entry_strings(&E);
return r;
+#endif
}
Modified: trunk/getdata/test/gzip_nframes.c
===================================================================
--- trunk/getdata/test/gzip_nframes.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/gzip_nframes.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -12,6 +12,9 @@
int main(void)
{
+#ifndef TEST_GZIP
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -63,4 +66,5 @@
#endif
return r;
+#endif
}
Modified: trunk/getdata/test/lzma_get.c
===================================================================
--- trunk/getdata/test/lzma_get.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/lzma_get.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -13,6 +13,9 @@
int main(void)
{
+#ifndef TEST_LZMA
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -68,4 +71,5 @@
#endif
return r;
+#endif
}
Modified: trunk/getdata/test/lzma_nframes.c
===================================================================
--- trunk/getdata/test/lzma_nframes.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/lzma_nframes.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -12,6 +12,9 @@
int main(void)
{
+#ifndef TEST_LZMA
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -63,4 +66,5 @@
#endif
return r;
+#endif
}
Modified: trunk/getdata/test/slim_get.c
===================================================================
--- trunk/getdata/test/slim_get.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/slim_get.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -13,6 +13,9 @@
int main(void)
{
+#ifndef TEST_SLIM
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -70,4 +73,5 @@
#endif
return r;
+#endif
}
Modified: trunk/getdata/test/slim_nframes.c
===================================================================
--- trunk/getdata/test/slim_nframes.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/slim_nframes.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -12,6 +12,9 @@
int main(void)
{
+#ifndef TEST_SLIM
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -65,4 +68,5 @@
#endif
return r;
+#endif
}
Modified: trunk/getdata/test/test.h
===================================================================
--- trunk/getdata/test/test.h 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/test.h 2010-12-08 00:54:32 UTC (rev 497)
@@ -25,6 +25,13 @@
#define gd_system system
#endif
+/* mkdir for MSVC */
+#ifdef _MSC_VER
+#define mkdir(x,y) \
+ system("rmdir /q/s "__TEST__"dirfile"); \
+ _mkdir(x)
+#endif
+
#define CHECK(e,n,nf,vf,...) \
if (e) { r = 1; \
fprintf(stderr, #n " = " nf " (expected " vf ")\n", __VA_ARGS__); }
Modified: trunk/getdata/test/xz_get.c
===================================================================
--- trunk/getdata/test/xz_get.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/xz_get.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -13,6 +13,9 @@
int main(void)
{
+#ifndef TEST_LZMA
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -68,4 +71,5 @@
#endif
return r;
+#endif
}
Modified: trunk/getdata/test/xz_nframes.c
===================================================================
--- trunk/getdata/test/xz_nframes.c 2010-12-07 23:56:18 UTC (rev 496)
+++ trunk/getdata/test/xz_nframes.c 2010-12-08 00:54:32 UTC (rev 497)
@@ -12,6 +12,9 @@
int main(void)
{
+#ifndef TEST_LZMA
+ return 77;
+#else
const char* filedir = __TEST__ "dirfile";
const char* format = __TEST__ "dirfile/format";
const char* data = __TEST__ "dirfile/data";
@@ -63,4 +66,5 @@
#endif
return r;
+#endif
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|