summaryrefslogtreecommitdiffstats
path: root/windows/tools/repacktest.BAT
diff options
context:
space:
mode:
authorMuQun Yang <ymuqun@hdfgroup.org>2006-11-21 21:31:32 (GMT)
committerMuQun Yang <ymuqun@hdfgroup.org>2006-11-21 21:31:32 (GMT)
commit10c0ac6e1e195ab9b2af992435d742e85ef871ba (patch)
treebb63e0ae8ab7c3767a83fd9c17caabd42dfdd349 /windows/tools/repacktest.BAT
parente9262d7320615d78d32d777a416e34b01072191f (diff)
downloadhdf5-10c0ac6e1e195ab9b2af992435d742e85ef871ba.zip
hdf5-10c0ac6e1e195ab9b2af992435d742e85ef871ba.tar.gz
hdf5-10c0ac6e1e195ab9b2af992435d742e85ef871ba.tar.bz2
[svn-r12964] Update windows project files for the library.
Update batch files for h5repack test,needs big efforts. Update batch file to test hdf5 library.
Diffstat (limited to 'windows/tools/repacktest.BAT')
-rwxr-xr-xwindows/tools/repacktest.BAT217
1 files changed, 117 insertions, 100 deletions
diff --git a/windows/tools/repacktest.BAT b/windows/tools/repacktest.BAT
index 714bbaf..86d4dfe 100755
--- a/windows/tools/repacktest.BAT
+++ b/windows/tools/repacktest.BAT
@@ -23,13 +23,13 @@
::What is actually doing?
::Example case
-::h5repack -i ..\..\testfiles\test1.h5 -o ..\..\temptest\out.test1.h5
-::h5diff ..\..\testfiles\test1.h5 ..\..\temptest\out.test1.h5 > ..\..\temptest\temp.txt 2>&1
+::h5repack -i ..\..\testfiles\test_objs.h5 -o ..\..\temptest\out.test_objs.h5
+::h5diff ..\..\testfiles\test_objs.h5 ..\..\temptest\out.test_objs.h5 > ..\..\temptest\temp.txt 2>&1
::fc ..\..\temptest\temp.txt temptest\notcomp.txt
::if %ERRORLEVEL%==0 (
-:: echo Testing h5repack test1.h5 PASSED >> ..\..\repacktest%2_%1.txt
+:: echo Testing h5repack test_objs.h5 PASSED >> ..\..\repacktest%2_%1.txt
::) else (
-:: echo Testing h5repack test1.h5 FAILED >> ..\..\repacktest%2_%1.txt
+:: echo Testing h5repack test_objs.h5 FAILED >> ..\..\repacktest%2_%1.txt
:: more temp.txt >> ..\..\repacktest%2_%1.txt
::)
@@ -67,7 +67,7 @@
:: Case 1: No difference between the expected .h5 and .h5 generated by h5repack file
type nul > temptest\empty.txt
- ::Case 2: For test1.h5 and test2.h5, the output will be "Some objects
+ ::Case 2: For test_objs.h5 and test_attr.h5, the output will be "Some objects
:: are not comparable", but actually there is no difference between
type nul > temptest\notcomp.txt
@@ -97,9 +97,9 @@
set tooltest=..\..\tooltest
:: Set Variables to contain the file name and path of input and output files for testing h5repack
- for %%v in (0 1 2 3 4 5 _szip _deflate _shuffle _fletcher32 _nbit _scaleoffset _all) do (
- set test%%v=..\..\testfiles\test%%v.h5
- set output%%v=..\..\temptest\out.test%%v.h5
+ for %%v in (_fill _objs _attr _hlink _layout _early _szip _deflate _shuffle _fletcher _filters _nbit _soffset) do (
+ set test%%v=..\..\testfiles\h5repack%%v.h5
+ set output%%v=..\..\temptest\out.h5repack%%v.h5
)
:: Creat the file for saving the tests results
@@ -117,29 +117,30 @@ echo.****************************************************
echo. h5repack%2 %1 T E S T S
echo.****************************************************
+:: STARTING COMMENTS
::Basic Usage:
::1. Set flag
::2. Call batch file tooltest.bat followed with the expected file name
::3. Example
::If we want to test
-::h5repack -i ..\..\testfiles\test1.h5 -o ..\..\temptest\out.test1.h5
+::h5repack -i ..\..\testfiles\test_objs.h5 -o ..\..\temptest\out.test_objs.h5
::At first, we need to set the flag like
-::set flag=-i %test1% -o %output1%
+::set flag=-i %test_objs% -o %output1%
::Secondly, we call batch file tooltest.bat followed by one of reference files
-::call %tooltest% %test1% %notcomp%
+::call %tooltest% %test_objs% %notcomp%
:: Using Filters (Zlib, SZIP)
::1. Set flag
::2. Call batch file tooltest.bat followed with the expected file name, zlib\szip
::3. Example
::If we want to test
-::h5repack -i ..\..\testfiles\test4.h5 -o ..\..\temptest\out.test4.h5 f dset2:SZIP=8,EC -l dset2:CHUNK=20x10
+::h5repack -i ..\..\testfiles\test_layout.h5 -o ..\..\temptest\out.test_layout.h5 f dset2:SZIP=8,EC -l dset2:CHUNK=20x10
::At first, we need to set the flag like
-::set flag=-i %test4% -o %output4% f dset2:SZIP=8,EC -l dset2:CHUNK=20x10
+::set flag=-i %test_layout% -o %output_layout% f dset2:SZIP=8,EC -l dset2:CHUNK=20x10
::Secondly, we call batch file tooltest.bat followed by one of reference files and szip
-::call %tooltest% %test4% %nodiff% szip
+::call %tooltest% %test_layout% %nodiff% szip
::Similarly, if you are using zlib, replace "szip" with "zlib" when calling %tooltest%
::If you are using both zlib and szip, replace "szip" with "zlib szip" when calling %tooltest%
@@ -149,119 +150,120 @@ echo.****************************************************
::Put "skip" after the reference file, like the following
::set flag=-i %test_scaleoffset% -o %output_scaleoffset% -f dset_none:SOFF=31,IN
::call %tooltest% %test_scaleoffset% %nodiff% skip
+:: END COMMENTS
::--------------
:: test0.h5
::--------------
-set flag=-i %test0% -o %output0%
-call %tooltest% %test0% %nodiff%
+set flag=-i %test_fill% -o %output_fill%
+call %tooltest% %test_fill% %nodiff%
::This case will be used as an example case for
::illustration purpose inside tooltest.bat for repacktest
::--------------
-:: test1.h5
+:: test_objs.h5
::--------------
:: Actually we are doing:
-:: set flag=-i ..\..\testfiles\test1.h5 -o ..\..\temptest\out.test1.h5
-:: call ..\..\tooltest ..\..\testfiles\test1.h5 ..\..\temptest\notcomp.txt
+:: set flag=-i ..\..\testfiles\test_objs.h5 -o ..\..\temptest\out.test_objs.h5
+:: call ..\..\tooltest ..\..\testfiles\test_objs.h5 ..\..\temptest\notcomp.txt
-set flag=-i %test1% -o %output1%
-call %tooltest% %test1% %nodiff%
+set flag=-i %test_objs% -o %output_objs%
+call %tooltest% %test_objs% %notcomp%
::--------------
:: test2.h5
::--------------
-set flag=-i %test2% -o %output2%
-call %tooltest% %test2% %nodiff%
+set flag=-i %test_attr% -o %output_attr%
+call %tooltest% %test_attr% %notcomp%
::--------------
:: test3.h5
::--------------
-set flag=-i %test3% -o %output3%
-call %tooltest% %test3% %nodiff%
+set flag=-i %test_hlink% -o %output_hlink%
+call %tooltest% %test_hlink% %nodiff%
::--------------
-:: test4.h5
+:: test_layout.h5
::--------------
-set flag=-i %test4% -o %output4%
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout%
+call %tooltest% %test_layout% %nodiff%
::--------------
-:: test5.h5
+:: test_early.h5
::--------------
-set flag=-i %test5% -o %output5%
-call %tooltest% %test5% %nodiff%
+set flag=-i %test_early% -o %output_early%
+call %tooltest% %test_early% %nodiff%
::****************************************************************
-:: use test4.h5 to write some filters (this file has no filters)
+:: use test_layout.h5 to write some filters (this file has no filters)
::****************************************************************
::---------------------------
::gzip with individual object
::---------------------------
-set flag=-i %test4% -o %output4% -f dset1:GZIP=1 -l dset1:CHUNK=20x10
-call %tooltest% %test4% %nodiff% zlib
+set flag=-i %test_layout% -o %output_layout% -f dset1:GZIP=1 -l dset1:CHUNK=20x10
+call %tooltest% %test_layout% %nodiff% zlib
::-------------
::gzip for all
::-------------
-set flag=-i %test4% -o %output4% -f GZIP=1
-call %tooltest% %test4% %nodiff% zlib
+set flag=-i %test_layout% -o %output_layout% -f GZIP=1
+call %tooltest% %test_layout% %nodiff% zlib
::--------------------------
::szip for individual object
::--------------------------
-set flag=-i %test4% -o %output4% f dset2:SZIP=8,EC -l dset2:CHUNK=20x10
-call %tooltest% %test4% %nodiff% szip
+set flag=-i %test_layout% -o %output_layout% f dset2:SZIP=8,EC -l dset2:CHUNK=20x10
+call %tooltest% %test_layout% %nodiff% szip
::--------------
:: szip for all
::--------------
-set flag=-i %test4% -o %output4% -f SZIP=8,NN
-call %tooltest% %test4% %nodiff% szip
+set flag=-i %test_layout% -o %output_layout% -f SZIP=8,NN
+call %tooltest% %test_layout% %nodiff% szip
::-------------------------------
:: shuffle with individual object
::-------------------------------
-set flag=-i %test4% -o %output4% -f dset2:SHUF -l dset2:CHUNK=20x10
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -f dset2:SHUF -l dset2:CHUNK=20x10
+call %tooltest% %test_layout% %nodiff%
::----------------
:: shuffle for all
::----------------
-set flag=-i %test4% -o %output4% -f SHUF
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -f SHUF
+call %tooltest% %test_layout% %nodiff%
::-----------------------------------
:: fletcher32 with individual object
::-----------------------------------
-set flag=-i %test4% -o %output4% -f dset2:FLET -l dset2:CHUNK=20x10
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -f dset2:FLET -l dset2:CHUNK=20x10
+call %tooltest% %test_layout% %nodiff%
::--------------------
:: fletcher32 for all
::--------------------
-set flag=-i %test4% -o %output4% -f FLET
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -f FLET
+call %tooltest% %test_layout% %nodiff%
::------------
::all filters
::------------
-set flag=-i %test4% -o %output4% -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10
+set flag=-i %test_layout% -o %output_layout% -f dset2:SHUF -f dset2:FLET -f dset2:SZIP=8,NN -f dset2:GZIP=1 -l dset2:CHUNK=20x10
:: Check whether szlib or zlib is available, if either library is not available, skip the test.
if "%HDF5_EXT_SZIP%"=="" (
- call %tooltest% %test4% %nodiff% skip
+ call %tooltest% %test_layout% %nodiff% skip
)else (
if "%HDF5_EXT_ZLIB%"=="" (
- call %tooltest% %test4% %nodiff% skip
+ call %tooltest% %test_layout% %nodiff% skip
) else (
- call %tooltest% %test4% %nodiff%
+ call %tooltest% %test_layout% %nodiff%
)
)
:: ***********************************************************
@@ -344,14 +346,14 @@ call %tooltest% %test_shuffle% %nodiff%
::-----------------
:: fletcher32 copy
::-----------------
-set flag=-i %test_fletcher32% -o %output_fletcher32%
-call %tooltest% %test_fletcher32% %nodiff%
+set flag=-i %test_fletcher% -o %output_fletcher%
+call %tooltest% %test_fletcher% %nodiff%
::------------------
:: fletcher32 remove
::------------------
-set flag=-i %test_fletcher32% -o %output_fletcher32% -f dset_fletcher32:NONE
-call %tooltest% %test_fletcher32% %nodiff%
+set flag=-i %test_fletcher% -o %output_fletcher% -f dset_fletcher32:NONE
+call %tooltest% %test_fletcher% %nodiff%
::----------
:: nbit copy
@@ -374,26 +376,41 @@ call %tooltest% %test_nbit% %nodiff%
::----------------
:: scaleoffset add
::----------------
-set flag=-i %test_scaleoffset% -o %output_scaleoffset% -f dset_none:SOFF=31,IN
-call %tooltest% %test_scaleoffset% %nodiff%
+set flag=-i %test_soffset% -o %output_soffset% -f dset_none:SOFF=31,IN
+call %tooltest% %test_soffset% %nodiff%
::-----------------
:: scaleoffset copy
::-----------------
-set flag=-i %test_scaleoffset% -o %output_scaleoffset%
-call %tooltest% %test_scaleoffset% %nodiff%
+set flag=-i %test_soffset% -o %output_soffset%
+call %tooltest% %test_soffset% %nodiff%
::-------------------
:: scaleoffset remove
::-------------------
-set flag=-i %test_scaleoffset% -o %output_scaleoffset% -f dset_scaleoffset:NONE
-call %tooltest% %test_scaleoffset% %nodiff%
+set flag=-i %test_soffset% -o %output_soffset% -f dset_scaleoffset:NONE
+call %tooltest% %test_soffset% %nodiff%
::--------------------
:: remove all filters
::--------------------
-set flag=-i %test_all% -o %output_all%
-call %tooltest% %test_scaleoffset% %nodiff%
+
+::--------------------
+::-- Currently this test is very difficult to be tested on windows since the internal filters
+::-- such as fletcher32, scaleoffset, shuffle is hard to be checked in batch files.
+::-- Now only szip and deflate filters are checked. KY 2006-11-20
+
+:: Check whether szlib or zlib is available, if either library is not available, skip the test.
+set flag=-i %test_filters% -o %output_filters% -f NONE
+if "%HDF5_EXT_SZIP%"=="" (
+ call %tooltest% %test_filters% %nodiff% skip
+ )else (
+ if "%HDF5_EXT_ZLIB%"=="" (
+ call %tooltest% %test_filters% %nodiff% skip
+ ) else (
+ call %tooltest% %test_filters% %nodiff%
+ )
+ )
::------------------
::filter conversions
@@ -407,70 +424,70 @@ call %tooltest% %test_szip% %nodiff% zlib szip
::------
::limit
::------
-set flag=-i %test4% -o %output4% -f GZIP=1 -m 1024
-call %tooltest% %test4% %nodiff% zlib
+set flag=-i %test_layout% -o %output_layout% -f GZIP=1 -m 1024
+call %tooltest% %test_layout% %nodiff% zlib
::-----
::file
::-----
-set flag=-i %test4% -o %output4% -e ..\..\testfiles\info.h5repack
-call %tooltest% %test4% %nodiff% zlib
+set flag=-i %test_layout% -o %output_layout% -e ..\..\testfiles\info.h5repack
+call %tooltest% %test_layout% %nodiff% zlib
echo. *********************************************
echo layout options (these files have no filters)
echo. *********************************************
-set flag=-i %test4% -o %output4% -l dset2:CHUNK=20x10
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset2:CHUNK=20x10
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l CHUNK=20x10
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l CHUNK=20x10
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset2:CONTI
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset2:CONTI
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l CONTI
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l CONTI
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset2:COMPA
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset2:COMPA
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l COMPA
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l COMPA
+call %tooltest% %test_layout% %nodiff%
echo. *****************************************
echo layout conversions (file has no filters)
echo. *****************************************
-set flag=-i %test4% -o %output4% -l dset_compact:CONTI
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset_compact:CONTI
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset_compact:CHUNK=2x5
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset_compact:CHUNK=2x5
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset_compact:COMPA
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset_compact:COMPA
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset_contiguous:COMPA
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset_contiguous:COMPA
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset_contiguous:CHUNK=3x6
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset_contiguous:CHUNK=3x6
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset_contiguous:CONTI
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset_contiguous:CONTI
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset_chunk:COMPA
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset_chunk:COMPA
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset_chunk:CHUNK=18x13
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset_chunk:CHUNK=18x13
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test4% -o %output4% -l dset_chunk:CONTI
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_layout% -o %output_layout% -l dset_chunk:CONTI
+call %tooltest% %test_layout% %nodiff%
-set flag=-i %test1% -o %output1% -n
-call %tooltest% %test4% %nodiff%
+set flag=-i %test_objs% -o %output_objs% -n
+call %tooltest% %test_layout% %nodiff%
cd ..\..