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