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
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
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
\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
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