2012-08-29 18:23:46 +08:00
|
|
|
::This script is used to accomplish a vs project automated testing.
|
|
|
|
::You should make sure you have set %VS100COMNTOOLS%.
|
2012-08-14 15:48:38 +08:00
|
|
|
|
2012-08-29 18:23:46 +08:00
|
|
|
::Set the directory of qtp project.
|
2012-08-14 15:48:38 +08:00
|
|
|
set qtpproj=%cd%
|
|
|
|
cd ..\..\..\..\
|
|
|
|
|
2012-08-29 18:23:46 +08:00
|
|
|
::Compile vs project.
|
2012-08-15 15:59:46 +08:00
|
|
|
"%VS100COMNTOOLS%..\IDE\devenv.com" "%cd%\cocos2d-win32.vc2010.sln" /Build "Debug|Win32"
|
2012-08-14 15:48:38 +08:00
|
|
|
|
2012-08-29 18:23:46 +08:00
|
|
|
::Set the directory of test project's resources.
|
2012-08-14 15:48:38 +08:00
|
|
|
set CC_TEST_RES=%cd%\samples\TestCpp\Resources\*.*
|
|
|
|
set CC_HELLOWORLD_RES=%cd%\samples\HelloCpp\Resources\*.*
|
|
|
|
set CC_HELLOLUA_RES=%cd%\samples\HelloLua\Resources\*.*
|
|
|
|
set CC_TESTJS_RES=%cd%\samples\TestJavascript\Resources\*.*
|
|
|
|
|
|
|
|
cd Debug.win32
|
|
|
|
|
2012-08-29 18:23:46 +08:00
|
|
|
::Copy resources to destination directory.
|
2012-08-14 15:48:38 +08:00
|
|
|
xcopy /E /Y /Q "%CC_TEST_RES%" .
|
|
|
|
xcopy /E /Y /Q "%CC_HELLOWORLD_RES%" .
|
|
|
|
xcopy /E /Y /Q "%CC_HELLOLUA_RES%" .
|
|
|
|
xcopy /E /Y /Q "%CC_TESTJS_RES%" .
|
|
|
|
|
2012-08-29 18:23:46 +08:00
|
|
|
::Run qtp test.
|
2012-08-14 15:48:38 +08:00
|
|
|
cd ..
|
|
|
|
cd %qtpproj%\qtp_win32
|
2012-08-29 18:23:46 +08:00
|
|
|
|
|
|
|
::Call automated test script.
|
2012-08-14 15:48:38 +08:00
|
|
|
cscript qtrunner.vbs
|
|
|
|
|
|
|
|
pause
|