summaryrefslogtreecommitdiffstats
path: root/windows/hl/tools/gif2h5/h52giftest.bat
diff options
context:
space:
mode:
Diffstat (limited to 'windows/hl/tools/gif2h5/h52giftest.bat')
-rw-r--r--windows/hl/tools/gif2h5/h52giftest.bat134
1 files changed, 78 insertions, 56 deletions
diff --git a/windows/hl/tools/gif2h5/h52giftest.bat b/windows/hl/tools/gif2h5/h52giftest.bat
index a28b484..80a5391 100644
--- a/windows/hl/tools/gif2h5/h52giftest.bat
+++ b/windows/hl/tools/gif2h5/h52giftest.bat
@@ -1,67 +1,89 @@
-@REM Copyright by The HDF Group.
-@REM Copyright by the Board of Trustees of the University of Illinois.
-@REM All rights reserved.
-@REM
-@REM This file is part of HDF5. The full HDF5 copyright notice, including
-@REM terms governing use, modification, and redistribution, is contained in
-@REM the files COPYING and Copyright.html. COPYING can be found at the root
-@REM of the source code distribution tree; Copyright.html can be found at the
-@REM root level of an installed copy of the electronic HDF5 document set and
-@REM is linked from the top-level documents page. It can also be found at
-@REM http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
-@REM access to either file, you may request a copy from help@hdfgroup.org.
-
@echo off
+rem
+rem Copyright by The HDF Group.
+rem Copyright by the Board of Trustees of the University of Illinois.
+rem All rights reserved.
+rem
+rem This file is part of HDF5. The full HDF5 copyright notice, including
+rem terms governing use, modification, and redistribution, is contained in
+rem the files COPYING and Copyright.html. COPYING can be found at the root
+rem of the source code distribution tree; Copyright.html can be found at the
+rem root level of an installed copy of the electronic HDF5 document set and
+rem is linked from the top-level documents page. It can also be found at
+rem http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have
+rem access to either file, you may request a copy from help@hdfgroup.org.
+rem
+rem HDF Utilities Test script
+rem
+rem Created: Scott Wegner, 4/5/07
+rem Modified: Scott Wegner, 8/22/07
+rem
-::This batch file is for h52gif tests.
-::Usage
-:: h52giftest release -- release static version
-:: h52giftest debug -- debug static version
-:: h52giftest release dll -- release dll version
-:: h52giftest debug dll -- debug dll version
-:: Written By: Scott Wegner
-:: Date : April 5, 2005
-
-
-REM Set up our environment
-
-mkdir temptest
-
-set TESTFILE1=..\testfiles\h52giftst.h5
-set TESTFILE2=..\testfiles\image1.gif
+setlocal enabledelayedexpansion
+pushd %~dp0
-set H52GIF=..\gifconv%2\h52gif%2\%1\h52gif%2.exe
-set GIF2H5=..\gifconv%2\gif2h5%2\%1\gif2h5%2.exe
+rem h52gif name
+set h52gif=h52gif%2
+rem The path to the h52gif binary
+set h52gif_bin=%CD%\..\gifconv%2\%h52gif%\%1\%h52gif%
+rem gif2h5 name
+set gif2h5=gif2h5%2
+rem The path to the gif2h5 binary
+set gif2h5_bin=%CD%\..\gifconv%2\%gif2h5%\%1\%gif2h5%
+set testfile1=%CD%\..\testfiles\h52giftst.h5
+set testfile2=%CD%\..\testfiles\image1.gif
-REM The tests
+rem initialze errors variable
+set errors=0
-REM TOOLTEST1 $TESTFILE1 image1.gif -i image
-%H52GIF% %TESTFILE1% image1.gif -i image 2>%1 > temptest\gifconv_1.results
-if %ERRORLEVEL% NEQ 0 (
- echo Testing h52gif h52giftst.h5 image1.gif -i image FAILED
- type temptest\gifconv_1.results
-) else (
- echo Testing h52gif h52giftst.h5 image1.gif -i image PASSED
-)
-del temptest\gifconv_1.results
+goto main
-REM TOOLTEST2 $TESTFILE2 image1.h5
-%GIF2H5% %TESTFILE2% image1.h5 2>%1 > temptest\gifconv_2.results
-if %ERRORLEVEL% NEQ 0 (
- echo Testing gif2h5 image1.gif image1.h5 FAILED
- type temptest\gifconv_2.results
-) else (
- echo Testing gif2h5 image1.gif image1.h5 PASSED
-)
-del temptest\gifconv_2.results
+:testing
+ set test_msg=Testing
+ for %%a in (%*) do (
+ if %%a neq PASSED (
+ if %%a neq *FAILED* (
+ set test_msg=!test_msg! %%~nxa
+ ) )
+ )
+ set test_msg=%test_msg%
+ echo.%test_msg:~0,69% %1
+
+ exit /b
-REM Cleanup
-set TESTFILE1=
-set TESTFILE2=
-set H52GIF=
-set GIF2H5=
+:tooltest1
+ %h52gif_bin% %*
+
+ if %errorlevel% neq 0 (
+ call :testing *FAILED* %h52gif_bin% %*
+ set /a errors=!errors!+1
+ ) else (
+ call :testing PASSED %h52gif_bin% %*
+ )
+
+ exit /b
+
-rmdir /s/q temptest \ No newline at end of file
+:tooltest2
+ %gif2h5_bin% %*
+
+ if %errorlevel% neq 0 (
+ call :testing *FAILED* %gif2h5_bin% %*
+ set /a errors=!errors!+1
+ ) else (
+ call :testing PASSED %gif2h5_bin% %*
+ )
+
+ exit /b
+
+
+:main
+ call :tooltest1 %testfile1% image1.gif -i image
+ call :tooltest2 %testfile2% image1.h5
+
+ popd
+ endlocal & exit /b %errors%
+ \ No newline at end of file