From 7e7121fec6a7ac5ef96d2a420e3c5302da60dfc9 Mon Sep 17 00:00:00 2001 From: lrknox Date: Tue, 21 Mar 2017 10:57:40 -0500 Subject: Remove incorrect " marks added to java files by bin/h5vers. Pull version from configure for version test in h5repack_plugin.sh.in --- bin/h5vers | 12 ++++++------ java/src/hdf/hdf5lib/H5.java | 4 ++-- java/test/TestH5.java | 4 ++-- tools/test/h5repack/h5repack_plugin.sh.in | 3 ++- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/bin/h5vers b/bin/h5vers index a72895c..efa97b1 100755 --- a/bin/h5vers +++ b/bin/h5vers @@ -366,7 +366,7 @@ if ($HDF5CONFIGCMAKE) { write_file($HDF5CONFIGCMAKE, $data); } -# Update the java/src/hdf/hdflib/H5.java file +# Update the java/src/hdf/hdf5lib/H5.java file if ($H5_JAVA) { my $data = read_file($H5_JAVA); # my $sub_rel_ver_str = ""; @@ -375,10 +375,10 @@ if ($H5_JAVA) { ? sprintf("\"%s\"", "") : sprintf("\"%s\"", "-".$newver[3].", currently under development") ); - my $version_string1 = sprintf("\"%d.%d.%d\"", @newver[0,1,2]); - my $version_string2 = sprintf("\"%d, %d, %d\"", @newver[0,1,2]); + my $version_string1 = sprintf("%d.%d.%d", @newver[0,1,2]); + my $version_string2 = sprintf("%d, %d, %d", @newver[0,1,2]); - $data =~ s/ * \@version HDF5 .*
/ * \@version HDF5 $version_string1
/; + $data =~ s/\@version HDF5 .*
/\@version HDF5 $version_string1
/; $data =~ s/ public final static int LIB_VERSION\[\] = { \d*, \d*, \d* };/ public final static int LIB_VERSION\[\] = { $version_string2 };/; write_file($H5_JAVA, $data); @@ -393,8 +393,8 @@ if ($TESTH5_JAVA) { ? sprintf("\"%s\"", "") : sprintf("\"%s\"", "-".$newver[3].", currently under development") ); - my $version_string1 = sprintf("\"%d, %d, %d\"", @newver[0,1,2]); - my $version_string2 = sprintf("\"int majnum = %d, minnum = %d, relnum = %d\"", @newver[0,1,2]); + my $version_string1 = sprintf("%d, %d, %d", @newver[0,1,2]); + my $version_string2 = sprintf("int majnum = %d, minnum = %d, relnum = %d", @newver[0,1,2]); $data =~ s/ int libversion\[\] = { .* };/ int libversion\[\] = { $version_string1 };/; $data =~ s/ int majnum = \d*, minnum = \d*, relnum = \d*;/ $version_string2;/; diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 16b28fa..168e507 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -216,7 +216,7 @@ import hdf.hdf5lib.structs.H5O_info_t; * exception handlers to print out the HDF-5 error stack. *
* - * * * * * * * * * * * * * @version HDF5 "1.11.0"
+ * @version HDF5 1.11.0
* See also: hdf.hdf5lib.HDFArray
* hdf.hdf5lib.HDF5Constants
* hdf.hdf5lib.HDF5CDataTypes
@@ -239,7 +239,7 @@ public class H5 implements java.io.Serializable { * * Make sure to update the versions number when a different library is used. */ - public final static int LIB_VERSION[] = { "1, 10, 1" }; + public final static int LIB_VERSION[] = { 1, 10, 1 }; public final static String H5PATH_PROPERTY_KEY = "hdf.hdf5lib.H5.hdf5lib"; diff --git a/java/test/TestH5.java b/java/test/TestH5.java index 173af8f..4c84988 100644 --- a/java/test/TestH5.java +++ b/java/test/TestH5.java @@ -164,7 +164,7 @@ public class TestH5 { */ @Test public void testH5get_libversion() { - int libversion[] = { "1, 11, 0" }; + int libversion[] = { 1, 11, 0 }; try { H5.H5get_libversion(libversion); @@ -186,7 +186,7 @@ public class TestH5 { */ @Test public void testH5check_version() { - "int majnum = 1, minnum = 10, relnum = 1"; + int majnum = 1, minnum = 11, relnum = 0; try { H5.H5check_version(majnum, minnum, relnum); diff --git a/tools/test/h5repack/h5repack_plugin.sh.in b/tools/test/h5repack/h5repack_plugin.sh.in index c7a9a6b..0b28f78 100644 --- a/tools/test/h5repack/h5repack_plugin.sh.in +++ b/tools/test/h5repack/h5repack_plugin.sh.in @@ -246,9 +246,10 @@ TOOLTEST_DUMP() ############################################################################## # prepare for test COPY_TESTFILES_TO_TESTDIR +version_str=`echo @H5_VERSION@ | awk -F"-" '{print $1}' | sed 's/\./,/g'` # Run the test -arg="h5repack_layout.h5 -v -f UD=260,4,9,1,9,235" +arg="h5repack_layout.h5 -v -f UD=260,4,9,$version_str" TOOLTEST_DUMP plugin_version_test $arg arg="h5repack_layout.h5 -v -f UD=257,1,9" -- cgit v0.12