@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 if "%~1"=="x64" ( set X64=true shift ) else ( set X64=false ) 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 set nunitPath=..\ext\nunit\2.0 if "%X64%"=="true" ( set OutputPath=%CD%\bin\nt.x64%SN% set ReferencePath=..\bin\nt.x64%SN% ) if "%X64%"=="false" ( set OutputPath=%CD%\bin\nt.x86%SN% set ReferencePath=..\bin\nt.x86%SN% ) 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 "%~1" == "compile" ( call :Compile_TestHarness shift ) call LaunchServer.bat if "%~3"=="unicode" ( set P4CHARSET=utf8 set P4COMMANDCHARSET=utf8 set RUNNINGUNICODE=true ) else ( set RUNNINGUNICODE=false set P4CHARSET= set P4COMMANDCHARSET= ) call :RunTests call StopServer.bat set P4CHARSET= set P4COMMANDCHARSET= goto :eof :usage echo. echo P4.Net Test Harness. Usage: echo runtest.bat 1.1^|2.0 [compile] [unicode] echo 1.1^|2.0 The .Net framework version echo [compile] Compile first (test harness only). echo [unicode] Run server in unicode mode. 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 rem 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 /d:DEBUG /d:TRACE set FLAGS=%FLAGS% "/out:%OutputPath%\P4.Net.TestDriver.dll" set FLAGS=%FLAGS% /nologo set SOURCES="%SrcPath%\P4.NetTestDriver\*.cs" echo Compiling P4.Net.TestDriver.dll... csc %FLAGS% %SOURCES% goto :eof :RunTests echo Running Tests... "%nunitPath%\nunit-console.exe" "%OutputPath%\P4.Net.TestDriver.dll" /nologo /labels /fixture=P4.Net.TestDriver.StandardTest if "%RUNNINGUNICODE%"=="true" ( "%nunitPath%\nunit-console.exe" "%OutputPath%\P4.Net.TestDriver.dll" /nologo /labels /fixture=P4.Net.TestDriver.UnicodeTest ) goto :eof
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#8 | 6505 | Shawn Hladky |
P4.Net: Multiple Changes 1. Update samples to VS2008 and new bin paths 2. Update MSBuild sync tasks to have IgnoredWarnings parameter 3. Added public class for P4RecordsetCallback. This allows consumers to easily migrate code that uses Recordsets to also take advantage of callback hooks. 4. Reworked method signiture of RunCallback. Removed tagged parameter and added RunCallbackUnparsed method. Made Callback parameter first so command and arguments are next to one-another. Note: this is a BREAKING CHANGE if you are using callbacks. 5. Reworked so switching between tagged and untagged runs will not disconnect/reconnect. 6. Add initial work for a file diffing object. |
||
#7 | 6472 | Shawn Hladky | P4.Net: Build script updates to support x64 | ||
#6 | 5918 | Shawn Hladky | P4.Net unit test changes for fx1.1 | ||
#5 | 5915 | Shawn Hladky |
p4.net Fixed diff2 bug. Re-worked array field logic More unit tests Organized P4Connection w/ #region blocks, and moved methods around |
||
#4 | 5878 | Shawn Hladky |
P4.Net: 1.0, support for raw spec processing. Update copyright. Fix build script. Bugs found along the way. |
||
#3 | 5874 | Shawn Hladky |
P4.Net: v1.0 WIP. Upgrade API to 2006.2. Fixes/tests for print and unicode servers. Changed ConvertDate to use client's timezone... old logic trying to use server's timezone didn't account for daylight savings time. |
||
#2 | 5842 | Shawn Hladky |
P4.Net Update test harness for unicode server. Add methods to support p4 print. |
||
#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 |