@echo off rem unit test script. Usage rem runtest.bat 1.1^|2.0 [compile] rem rem The first argument is the .Net framework version rem Supply "compile" if you want the test harness to be compiled rem rem To build for the 1.1 framework, execute from a Visual Studio .Net 2003 command prompt. rem To build for the 2.0 framework, execute from a Visual Studio .Net 2005 command prompt. rem set DotNetFWVersion=0 if "%~1"=="1.1" set DotNetFWVersion=1.1 if "%~1"=="2.0" set DotNetFWVersion=2.0 rem change the following line if you're really anal rem and want to validate the SN versions as well. set SN= rem set SN=SN_ if "%DotNetFWVersion%"=="0" ( echo Must include the .Net Framework version! call :usage goto :eof ) if "%DotNetFWVersion%"=="1.1" ( set OutputPath=%CD%\bin\CLR_1.1 set ReferencePath=..\bin\%SN%CLR_1.1 set nunitPath=..\ext\nunit\1.1 ) if "%DotNetFWVersion%"=="2.0" ( set OutputPath=%CD%\bin\CLR_2.0 set ReferencePath=..\bin\%SN%CLR_2.0 set nunitPath=..\ext\nunit\2.0 ) if not exist "%ReferencePath%\p4api.dll" ( echo "Must compile p4api.dll and p4dn.dll before running test!" goto :eof ) if not exist "%ReferencePath%\p4dn.dll" ( echo "Must compile p4api.dll and p4dn.dll before running test!" goto :eof ) set SrcPath=%CD%\src set BasePath=%CD%\.. if "%~2" == "compile" call :Compile_TestHarness call LaunchServer.bat call :RunTests call StopServer.bat goto :eof :usage echo. echo P4.Net Test Harness. Usage: echo runtest.bat 1.1^|2.0 [compile] echo 1.1^|2.0 The .Net framework version echo [compile] Compile first. echo. echo To build for the 1.1 framework, execute from a echo Visual Studio .Net 2003 command prompt. echo. echo To build for the 2.0 framework, execute from a echo Visual Studio .Net 2005 command prompt. echo. echo The test harness will launch a new instance of p4d echo and run tests against it. echo. echo Your favorite version of p4d.exe and p4.exe needs echo to be added to the current directory. echo. goto :eof :Compile_TestHarness if exist "%OutputPath%" rd /s /q "%OutputPath%" mkdir "%OutputPath%" rem make sure we have the references copy /y "%ReferencePath%\p4dn.dll" "%OutputPath%\p4dn.dll" >nul copy /y "%ReferencePath%\p4api.dll" "%OutputPath%\p4api.dll" >nul copy /y "%nunitPath%\nunit.framework.dll" "%OutputPath%\nunit.framework.dll" >nul set FLAGS=/target:library set FLAGS=%FLAGS% /reference:"%OutputPath%\p4dn.dll" set FLAGS=%FLAGS% /reference:"%OutputPath%\p4api.dll" set FLAGS=%FLAGS% /reference:"%OutputPath%\nunit.framework.dll" set FLAGS=%FLAGS% /w:0 /o set FLAGS=%FLAGS% "/out:%OutputPath%\P4.Net.TestDriver.dll" set FLAGS=%FLAGS% /nologo set SOURCES="%SrcPath%\P4.NetTestDriver\*.cs" echo Compiling p4api.dll... csc %FLAGS% %SOURCES% goto :eof :RunTests echo Running Tests... "%nunitPath%\nunit-console.exe" "%OutputPath%\P4.Net.TestDriver.dll" /nologo /labels if errorlevel 0 ( echo All Tests Passed! ) else ( echo At least one test failed :-^( ) goto :eof
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 5831 | Shawn Hladky | P4.Net: Branch release 0.9 and delete a few files missed last time | ||
//guest/shawn_hladky/P4.Net/main/test/runtest.bat | |||||
#1 | 5830 | Shawn Hladky | P4.Net: reorg to support release branches | ||
//guest/shawn_hladky/P4.Net/test/runtest.bat | |||||
#4 | 5678 | Shawn Hladky |
WIP... more tests. OnPrompt event to recieve input from prompts. |
||
#3 | 5636 | Shawn Hladky |
1. Added test harness framework, and some initial tests 2. Fixed many bugs (oddly enough identified by the unit tests) 3. Fixes so will build 1.1 Framework (and build batch files actually work) 4. Pathetic attempt at documentation |
||
#2 | 5411 | Shawn Hladky | WIP -- forms are working now. | ||
#1 | 5373 | Shawn Hladky | P4.Net: Still WIP, but some things starting to work |