tst: passthrough-dotnet: include in test suite

This commit is contained in:
Bill Zissimopoulos
2017-04-11 18:23:56 -07:00
parent 739eb80cfb
commit a29390412b
3 changed files with 45 additions and 40 deletions

View File

@ -12,20 +12,26 @@ if X!ProjDir!==X (echo usage: build-sample Config Arch Sample ProjDir >&2 & goto
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" x64
set RegKey="HKLM\SOFTWARE\WinFsp"
set RegVal="InstallDir"
reg query !RegKey! /v !RegVal! /reg:32 >nul 2>&1
if !ERRORLEVEL! equ 0 (
for /f "tokens=2,*" %%i in ('reg query !RegKey! /v !RegVal! /reg:32 ^| findstr !RegVal!') do (
set InstallDir=%%j
)
if X!FSP_SAMPLE_DIR!==X (
set RegKey="HKLM\SOFTWARE\WinFsp"
set RegVal="InstallDir"
reg query !RegKey! /v !RegVal! /reg:32 >nul 2>&1
if !ERRORLEVEL! equ 0 (
for /f "tokens=2,*" %%i in ('reg query !RegKey! /v !RegVal! /reg:32 ^| findstr !RegVal!') do (
set InstallDir=%%j
)
)
if not exist "!InstallDir!" (echo cannot find WinFsp installation >&2 & goto fail)
if not exist "!InstallDir!samples\!Sample!" (echo cannot find WinFsp sample !Sample! >&2 & goto fail)
set SampleDir=!InstallDir!samples
) else (
set SampleDir=!FSP_SAMPLE_DIR!
)
if not exist "!InstallDir!" (echo cannot find WinFsp installation >&2 & goto fail)
if not exist "!InstallDir!samples\!Sample!" (echo cannot find WinFsp sample !Sample! >&2 & goto fail)
if exist "!ProjDir!" rmdir /s/q "!ProjDir!"
mkdir "!ProjDir!"
xcopy /s/e/q/y "!InstallDir!samples\!Sample!" "!ProjDir!"
xcopy /s/e/q/y "!SampleDir!\!Sample!" "!ProjDir!"
devenv "!ProjDir!\!Sample!.sln" /build "!Config!|!Arch!"
if !ERRORLEVEL! neq 0 goto :fail

View File

@ -364,20 +364,20 @@ exit /b 0
:__ifstest-memfs
%1
set IfsTestDirectories=^
securit^
opcreatg^
opcreatp^
closedel^
volinfo^
fileinfo^
dirinfo^
filelock^
oplocks^
chgnotif^
readwr^
seccache^
reparspt^
estream
securit^
opcreatg^
opcreatp^
closedel^
volinfo^
fileinfo^
dirinfo^
filelock^
oplocks^
chgnotif^
readwr^
seccache^
reparspt^
estream
set IfsTestMemfsExit=0
call :__ifstest %1 /g Security
if !ERRORLEVEL! neq 0 set IfsTestMemfsExit=1
@ -421,7 +421,7 @@ rem StreamEnhancements.StreamNotifyNameTest: WinFsp does not notify when streams
call :__ifstest %1 /g StreamEnhancements -t StreamRenameTest -t StreamNotifyNameTest
if !ERRORLEVEL! neq 0 set IfsTestMemfsExit=1
for %%d in (!IfsTestDirectories!) do (
if exist %%d (echo :ifstest directory %%d still exists & set IfsTestMemfsExit=1)
if exist %%d (echo :ifstest directory %%d still exists & set IfsTestMemfsExit=1)
)
exit /b !IfsTestMemfsExit!
@ -505,7 +505,8 @@ if !ERRORLEVEL! neq 0 goto fail
exit /b 0
:sample-passthrough-dotnet
call :__run_sample_test passthrough-dotnet anycpu passthrough-dotnet winfsp-tests-x64
call :__run_sample_test passthrough-dotnet anycpu passthrough-dotnet winfsp-tests-x64 ^
"-create_backup_test -create_restore_test -create_namelen_test -delete_access_test"
if !ERRORLEVEL! neq 0 goto fail
exit /b 0
@ -536,7 +537,7 @@ L:
"%ProjRoot%\build\VStudio\build\%Configuration%\%4.exe" ^
--external --resilient --case-insensitive-cmp --share-prefix="\%1\%TMP::=$%\%1\test" ^
-create_allocation_test -getfileinfo_name_test -rename_flipflop_test -rename_mmap_test -exec_rename_dir_test ^
-reparse* -stream*
-reparse* -stream* %~5
if !ERRORLEVEL! neq 0 set RunSampleTestExit=1
popd
echo net use L: /delete