summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--MANIFEST1
-rw-r--r--vms/src/make.com4
-rw-r--r--vms/test/make.com4
-rw-r--r--vms/tools/h5jam/check_h5jam.com138
4 files changed, 143 insertions, 4 deletions
diff --git a/MANIFEST b/MANIFEST
index a8e0409..8a6564d 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -1472,6 +1472,7 @@
./vms/tools/h5diff/make.com
./vms/tools/h5import/check_h5import.com
./vms/tools/h5import/make.com
+./vms/tools/h5jam/check_h5jam.com
./vms/tools/h5jam/make.com
./vms/tools/h5repack/check_h5repack.com
./vms/tools/h5repack/make.com
diff --git a/vms/src/make.com b/vms/src/make.com
index 7aa239e..8bcd3c6 100644
--- a/vms/src/make.com
+++ b/vms/src/make.com
@@ -42,11 +42,11 @@ $ cobj= "H5, H5A, H5AC, H5B, H5B2, H5B2cache,"+-
"H5HFdblock, H5HFdtable, H5HFhdr, H5HFiblock,"+-
"H5HFiter, H5HFsection, H5HFspace,"+-
"H5HG, H5HGdbg, H5HL, H5HLdbg, H5HP, H5I, H5MF, H5MM,"+-
- "H5MP, H5MPtest,H5L, H5O, H5Oattr, H5Obogus, H5Ocache,"+-
+ "H5MP, H5MPtest,H5L, H5Lexternal, H5O, H5Oattr, H5Obogus, H5Ocache,"+-
"H5Ocont, H5Odtype, H5Oefl, H5Ofill, H5Oginfo, H5Olayout,"+-
"H5Olinfo, H5Olink, H5Omtime,"+-
"H5Oname, H5Onull, H5Opline, H5Osdspace, H5Oshared, H5Ostab,"+-
- "H5P, H5Pacpl, H5Pdcpl, H5Pdxpl, H5Pfapl, H5Pfcpl, H5Pgcpl, "+-
+ "H5P, H5Pacpl, H5Pdcpl, H5Pdxpl, H5Pfapl, H5Pfcpl, H5Pgcpl, H5Plapl, "+-
"H5Pocpl, H5Ptest"
$ cobj1= "H5R, H5RC,"+-
"H5RS, H5S, H5Sall, H5Shyper, H5Smpio, H5Snone, H5Spoint,"+-
diff --git a/vms/test/make.com b/vms/test/make.com
index f9be931..dff2b45 100644
--- a/vms/test/make.com
+++ b/vms/test/make.com
@@ -22,7 +22,7 @@ $ type sys$input
Creating testhdf5
$
$ cobj= "h5test.c, testframe.c, testhdf5.c, tarray.c, tattr.c, tconfig.c, "+-
- "tfile.c, tgenprop.c,th5s.c, theap.c, tid.c, titerate.c,"+-
+ "tfile.c, tgenprop.c, th5o.c, th5s.c, theap.c, tid.c, titerate.c,"+-
"tmeta.c, tmisc.c, ttime.c, trefer.c, trefstr.c,"+-
"tselect.c, tskiplist.c, ttst.c, tunicode.c, tvltypes.c,"+-
"tvlstr.c, cache_common.c"
@@ -32,7 +32,7 @@ $ library/create/replace []libh5test h5test, testframe, cache_common
$ type sys$input
Creating libh5test
$ link testhdf5,tarray,tattr,tconfig, -
- tfile,tgenprop,th5s,theap,tid,titerate, -
+ tfile,tgenprop,th5o,th5s,theap,tid,titerate, -
tmeta,tmisc,ttime,trefer,trefstr, -
tselect,tskiplist,ttst,tunicode,tvltypes, -
tvlstr, -
diff --git a/vms/tools/h5jam/check_h5jam.com b/vms/tools/h5jam/check_h5jam.com
new file mode 100644
index 0000000..1675201
--- /dev/null
+++ b/vms/tools/h5jam/check_h5jam.com
@@ -0,0 +1,138 @@
+$ !
+$ ! This command file tests h5jam and h5unjam utilities. The command file has to
+$ ! run in the [hdf5-top.tools.testfiles] directory.
+$ !
+$ !
+$ ! Define h5jam, h5unjam and h5dump symbols
+$ !
+$! set message/notext/nofacility/noidentification/noseverity
+$ current_dir = F$DIRECTRY()
+$ len = F$LENGTH(current_dir)
+$ temp = F$EXTRACT(0, len-10, current_dir)
+$ h5dump_dir = temp + "H5DUMP]"
+$ h5dump :== $sys$disk:'h5dump_dir'h5dump.exe
+$ h5jam_dir = temp + "H5JAM]"
+$ h5jam :== $sys$disk:'h5jam_dir'h5jam.exe
+$ !
+$ ! Define output for diff command that compares expected and actual
+$ ! outputs of h5dump
+$ !
+$ create h5dump.log
+$ !
+$ ! h5jam and h5unjam tests
+$ !
+$
+$ CALL H5JAMTEST "-u u10.txt -i" tall.h5 ta2.h5
+$! CALL H5JAMTEST "-u u511.txt -i" tall.h5 ta3.h5
+$! CALL H5JAMTEST "-u u512.txt -i" tall.h5 ta4.h5
+$! CALL H5JAMTEST "-u u513.txt -i" tall.h5 ta5.h5
+$
+$
+$H5JAMTEST: SUBROUTINE
+$
+$ len_org = F$LENGTH(P2)
+$ base_org = F$EXTRACT(0,len_org-2,P2)
+$ len = F$LENGTH(P3)
+$ base = F$EXTRACT(0,len-2,P3)
+$ actual = base + "out"
+$ actual_org = base_org + "org"
+$ actual_err = base + "err"
+$ actual_err_org = base_org + "err"
+$
+$ ON ERROR THEN CONTINUE
+$ begin = "Testing h5jam"
+$ !
+$ ! Run the test
+$ !
+$ h5jam 'P1 'P2 -o 'P3
+$ !
+$ ! Dump the original and result file
+$ !
+$ define/nolog sys$output 'actual'
+$ define/nolog sys$error 'actual_err'
+$ h5dump 'P3
+$ deassign sys$output
+$ deassign sys$error
+$ if F$SEARCH(actual_err) .NES. ""
+$ then
+$ set message/notext/nofacility/noidentification/noseverity
+$ append 'actual_err' 'actual'
+$ set message/ntext/facility/identification/severity
+$ endif
+$ define/nolog sys$output 'actual_org'
+$ define/nolog sys$error 'actual_err_org'
+$ h5dump 'P2
+$ deassign sys$output
+$ deassign sys$error
+$ if F$SEARCH(actual_err_org) .NES. ""
+$ then
+$ set message/notext/nofacility/noidentification/noseverity
+$ append 'actual_err_org' 'actual_org'
+$ set message/ntext/facility/identification/severity
+$ endif
+$ !
+$ ! Compare the results
+$ !
+$ diff/output=h5dump_temp/ignore=(spacing,trailing_spaces,blank_lines) 'actual_org' -
+ 'actual'
+$ !
+$ ! Delete output file 'P3
+$ !
+$ del 'P3;*
+$ open/read temp_out h5dump_temp.dif
+$READ_DATA:
+$ read/end_of_file=end_read temp_out record1
+$ !
+$ ! Skip blank lines
+$ !
+$ if record1 .EQS. "" then goto READ_DATA
+$ !
+$ ! Find record with "Number" and exit the loop
+$ !
+$ len = F$LENGTH(record1)
+$ pos = F$LOCATE("Number", record1)
+$ !
+$ if pos .EQ. 0
+$ then
+$ err_code = F$EXTRACT(len-1,1,record1)
+$ goto END_READ
+$ endif
+$ !
+$ goto READ_DATA
+$
+$ !
+$END_READ:
+$ close temp_out
+$
+$ !
+$ ! Extract error code and format output line
+$ !
+$ len = F$LENGTH(record1)
+$ err_code = F$EXTRACT(len-1,1,record1)
+$ if err_code .eqs. "1"
+$ then
+$ result = "PASSED"
+$ line = F$FAO("!14AS !14AS !7AS !2AS !25AS !100AS", begin, P1, P2, -
+ "-o", P3, result)
+$ else
+$ result = "*FAILED*"
+$ line = F$FAO("!14AS !14AS !7AS !2AS !25AS !99AS", begin, P1, P2, -
+ "-o", P3, result)
+$ endif
+$ !
+$ ! Print test result
+$ !
+$ write sys$output line
+$ !
+$ ! Append the result to the log file
+$ !
+$ append h5dump_temp.dif h5dump.log
+$ !
+$ ! Delete temporary files
+$ !
+$! del *.out;*
+$! del *.org;*
+$! del *.dif;*
+$ !
+$ENDSUBROUTINE
+