]> wimlib.net Git - wimlib/blobdiff - tests/win32-test-imagex-capture_and_apply.bat
LZMS: decompression optimizations
[wimlib] / tests / win32-test-imagex-capture_and_apply.bat
index 89dd07501b2c0990b8fd240008f240b72cadf8f3..2ce8febb0876289f10054a37085554a36e3b1c2a 100644 (file)
@@ -6,10 +6,12 @@ REM
 REM Run some tests on the Windows version of wimlib-imagex.\r
 REM\r
 REM This must be run on Windows Vista or later in a clean directory, with\r
-REM Administrator privileges.  wimlib-imagex and win32-tree-cmp must be callable\r
-REM (on PATH or in same directory).\r
+REM Administrator privileges.  wimlib-imagex and win32-tree-cmp must be\r
+REM executable using the paths set below.\r
 \r
 setlocal EnableDelayedExpansion\r
+set WIN32_TREE_CMP=win32-tree-cmp\r
+set WIMLIB_IMAGEX=wimlib-imagex\r
 \r
 if exist in.dir rd /S /Q in.dir\r
 if exist out.dir rd /S /Q out.dir\r
@@ -316,9 +318,9 @@ md subdir
 echo 1 > subdir\file\r
 mklink /j junction subdir > nul\r
 cd ..\r
-wimlib-imagex capture in.dir test.wim > nul\r
+%WIMLIB_IMAGEX% capture in.dir test.wim > nul\r
 rd /s /q in.dir\r
-wimlib-imagex apply test.wim out.dir > nul\r
+%WIMLIB_IMAGEX% apply test.wim out.dir > nul\r
 echo 1 > tmp1\r
 type out.dir\junction\file > tmp2\r
 fc tmp1 tmp2 > nul\r
@@ -328,22 +330,17 @@ del tmp1 tmp2
 md in.dir\r
 cd in.dir\r
 \r
-echo Testing rpfix exclude\r
-mklink otherlink c:\some\other\directory > nul\r
-cd ..\r
-wimlib-imagex capture in.dir test.wim > nul\r
-wimlib-imagex apply test.wim out.dir > nul\r
-rd out.dir\r
-if %errorlevel% neq 0 exit /b %errorlevel%\r
-rd /s /q in.dir\r
-md in.dir\r
-cd in.dir\r
-\r
 echo Testing rpfix relative\r
 echo 1 > file\r
 mklink relink file > nul\r
-call :do_test\r
+cd ..\r
+%WIMLIB_IMAGEX% capture in.dir test.wim > nul\r
+%WIMLIB_IMAGEX% apply test.wim out.dir > nul\r
+fc in.dir\file out.dir\relink > nul\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
+rd /s /q in.dir out.dir\r
+md in.dir\r
+cd in.dir\r
 \r
 REM\r
 REM END OF TESTS\r
@@ -356,11 +353,11 @@ exit /b 0
 \r
 :do_test\r
 cd ..\r
-wimlib-imagex capture in.dir test.wim --norpfix > NUL\r
+%WIMLIB_IMAGEX% capture in.dir test.wim --norpfix > NUL\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
-wimlib-imagex apply test.wim out.dir > NUL\r
+%WIMLIB_IMAGEX% apply test.wim out.dir > NUL\r
 if %errorlevel% neq 0 exit /b %errorlevel%\r
-win32-tree-cmp in.dir out.dir\r
+%WIN32_TREE_CMP% in.dir out.dir\r
 if %errorlevel% neq 0 (\r
        echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
        echo            TEST FAILED!!!!!!!\r
@@ -377,7 +374,7 @@ REM imagex /capture in.dir test.wim "test" /norpfix > nul
 REM if %errorlevel% neq 0 exit /b %errorlevel%\r
 REM imagex /apply test.wim 1 out.dir > nul\r
 REM if %errorlevel% neq 0 exit /b %errorlevel%\r
-REM win32-tree-cmp in.dir out.dir\r
+REM %WIN32_TREE_CMP% in.dir out.dir\r
 REM if %errorlevel% neq 0 (\r
        REM echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\r
        REM echo            TEST FAILED!!!!!!! ^(imagex^)\r