summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2008-03-25 19:22:25 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2008-03-25 19:22:25 (GMT)
commitb95e5a90cdf9c6c7116e6d3432fb10daf0351fb8 (patch)
tree42786accb740f8904217e033cd001b6ed0faa40d
parent44fca4292fd81c5da8694f6270f0fc165187da56 (diff)
downloadhdf5-b95e5a90cdf9c6c7116e6d3432fb10daf0351fb8.zip
hdf5-b95e5a90cdf9c6c7116e6d3432fb10daf0351fb8.tar.gz
hdf5-b95e5a90cdf9c6c7116e6d3432fb10daf0351fb8.tar.bz2
[svn-r14774] Enhancement?.
Red Storm did not like to use "touch" as the faked h5recover tools. Added h5recover.c to provide a dummy executable to make RS happy. Tested: Kagiso, smirom, linew, Redstorm. (but red storm now failed when trecover uses Async crash.)
-rw-r--r--tools/h5recover/Makefile.am5
-rw-r--r--tools/h5recover/Makefile.in14
-rw-r--r--tools/h5recover/h5recover.c38
-rw-r--r--tools/h5recover/testh5recover.sh.in12
4 files changed, 57 insertions, 12 deletions
diff --git a/tools/h5recover/Makefile.am b/tools/h5recover/Makefile.am
index b04f2da..36f47a3 100644
--- a/tools/h5recover/Makefile.am
+++ b/tools/h5recover/Makefile.am
@@ -35,8 +35,9 @@ SCRIPT_DEPEND=trecover$(EXEEXT)
trecover_SOURCES=trecover_main.c trecover_writer.c trecover_crasher.c
# Our main target, the h5recover tool.
-# h5recover source is not ready yet.
-bin_PROGRAMS=#h5recover
+# For now, it is a dummy program in order to provide a real executable
+# for the Red Storm platform.
+bin_PROGRAMS=h5recover
# All the programs depend on the hdf5 and h5tools libraries
LDADD=$(LIBH5TOOLS) $(LIBHDF5)
diff --git a/tools/h5recover/Makefile.in b/tools/h5recover/Makefile.in
index 87b57b1..0122095 100644
--- a/tools/h5recover/Makefile.in
+++ b/tools/h5recover/Makefile.in
@@ -53,7 +53,7 @@ DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
$(srcdir)/testh5recover.sh.in $(top_srcdir)/config/commence.am \
$(top_srcdir)/config/conclude.am
check_PROGRAMS = $(am__EXEEXT_1)
-bin_PROGRAMS =
+bin_PROGRAMS = h5recover$(EXEEXT)
TESTS = $(check_PROGRAMS) $(check_SCRIPTS)
subdir = tools/h5recover
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
@@ -67,6 +67,10 @@ am__installdirs = "$(DESTDIR)$(bindir)"
binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
am__EXEEXT_1 = trecover$(EXEEXT)
PROGRAMS = $(bin_PROGRAMS)
+h5recover_SOURCES = h5recover.c
+h5recover_OBJECTS = h5recover.$(OBJEXT)
+h5recover_LDADD = $(LDADD)
+h5recover_DEPENDENCIES = $(LIBH5TOOLS) $(LIBHDF5)
am_trecover_OBJECTS = trecover_main.$(OBJEXT) \
trecover_writer.$(OBJEXT) trecover_crasher.$(OBJEXT)
trecover_OBJECTS = $(am_trecover_OBJECTS)
@@ -84,8 +88,8 @@ CCLD = $(CC)
LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
--mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
$(LDFLAGS) -o $@
-SOURCES = $(trecover_SOURCES)
-DIST_SOURCES = $(trecover_SOURCES)
+SOURCES = h5recover.c $(trecover_SOURCES)
+DIST_SOURCES = h5recover.c $(trecover_SOURCES)
ETAGS = etags
CTAGS = ctags
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
@@ -421,6 +425,9 @@ clean-checkPROGRAMS:
echo " rm -f $$p $$f"; \
rm -f $$p $$f ; \
done
+h5recover$(EXEEXT): $(h5recover_OBJECTS) $(h5recover_DEPENDENCIES)
+ @rm -f h5recover$(EXEEXT)
+ $(LINK) $(h5recover_OBJECTS) $(h5recover_LDADD) $(LIBS)
trecover$(EXEEXT): $(trecover_OBJECTS) $(trecover_DEPENDENCIES)
@rm -f trecover$(EXEEXT)
$(LINK) $(trecover_OBJECTS) $(trecover_LDADD) $(LIBS)
@@ -431,6 +438,7 @@ mostlyclean-compile:
distclean-compile:
-rm -f *.tab.c
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/h5recover.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trecover_crasher.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trecover_main.Po@am__quote@
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trecover_writer.Po@am__quote@
diff --git a/tools/h5recover/h5recover.c b/tools/h5recover/h5recover.c
new file mode 100644
index 0000000..d2b1c87
--- /dev/null
+++ b/tools/h5recover/h5recover.c
@@ -0,0 +1,38 @@
+/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
+ * Copyright by The HDF Group. *
+ * Copyright by the Board of Trustees of the University of Illinois. *
+ * All rights reserved. *
+ * *
+ * This file is part of HDF5. The full HDF5 copyright notice, including *
+ * terms governing use, modification, and redistribution, is contained in *
+ * the files COPYING and Copyright.html. COPYING can be found at the root *
+ * of the source code distribution tree; Copyright.html can be found at the *
+ * root level of an installed copy of the electronic HDF5 document set and *
+ * is linked from the top-level documents page. It can also be found at *
+ * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
+ * access to either file, you may request a copy from help@hdfgroup.org. *
+ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
+
+/*
+ * Programmer: Albert Cheng
+ * March 25, 2008
+ */
+
+/*
+ * Just a dummy program to provide a real executable.
+ */
+
+#include "H5private.h"
+#include "h5tools.h"
+#include "h5tools_utils.h"
+
+int
+main(int argc, const char *argv[])
+{
+ printf("h5recover is here.\n");
+ printf("Command arguments are:\n");
+ while (--argc > 0)
+ printf("%s\n", *++argv);
+ return(0);
+}
+
diff --git a/tools/h5recover/testh5recover.sh.in b/tools/h5recover/testh5recover.sh.in
index 1b496cc..9a6531b 100644
--- a/tools/h5recover/testh5recover.sh.in
+++ b/tools/h5recover/testh5recover.sh.in
@@ -26,11 +26,8 @@ TOOL=trecover # The tool name
TOOL_BIN=`pwd`/$TOOL # The path of the tool binary
TOOLDataFile=trecover.h5
TOOLCTLDataFile=CTL$TOOLDataFile
-# Since h5recover does not exist yet, use touch for now.
-#RECOVERTOOL=h5recover # The tool name
-#RECOVERTOOL_BIN=`pwd`/$RECOVERTOOL # The path of the tool binary
-RECOVERTOOL=touch # The tool name
-RECOVERTOOL_BIN=touch # The path of the tool binary
+RECOVERTOOL=h5recover # The tool name
+RECOVERTOOL_BIN=`pwd`/$RECOVERTOOL # The path of the tool binary
H5DIFF=../h5diff/h5diff
TESTDIR=`pwd`/../testfiles
@@ -81,8 +78,9 @@ TOOLTEST() {
if [ $? = 0 ]; then
echo first diff did not fail as expected
fi
- # Recover the file
- $RUNSERIAL $RECOVERTOOL_BIN $TOOLDataFile
+ # Recover the file.
+ # h5recover is not ready yet. Redirect its output to /dev/null.
+ $RUNSERIAL $RECOVERTOOL_BIN $TOOLDataFile > /dev/null
# second diff should produce expected output
$RUNSERIAL $H5DIFF $TOOLDataFile $TOOLCTLDataFile > $actual
(