-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tf/LH-25v7/introduce-hudson-build-script'
* tf/LH-25v7/introduce-hudson-build-script: NPPCR-HUDSON-BUILD-TESTS.bat: add leakdetect switch hudson: introduce Hudson job and build script
- Loading branch information
Showing
4 changed files
with
196 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ Thumbs.db | |
*.suo | ||
*.tlb | ||
*.tlh | ||
*.tmp_* | ||
*.bak | ||
*.cache | ||
*.ilk | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
ECHO off | ||
REM Hudson to MSBuild script for N++CR | ||
|
||
:: Google TEST and Mock paths | ||
if NOT [%NPPCR_GTEST_STYLE%]==[ENVIRONMENT] ( | ||
set GOOGLE_TEST_DIR= | ||
set GOOGLE_MOCK_DIR= | ||
) else ( | ||
if NOT [%GOOGLE_TEST_DIR:~-1%]==[\] set GOOGLE_TEST_DIR = %GOOGLE_TEST_DIR%\ | ||
if NOT [%GOOGLE_MOCK_DIR:~-1%]==[\] set GOOGLE_MOCK_DIR = %GOOGLE_MOCK_DIR%\ | ||
) | ||
|
||
:: Target solution name from the build's VC version | ||
set VER_MINOR=%NPPCR_BUILD_VC_VER:*.=% | ||
set VER_MINOR=.%VER_MINOR% | ||
call set VER_MAJOR=%%NPPCR_BUILD_VC_VER:%VER_MINOR%=%% | ||
set SOLUTION=notepadPlus.%VER_MAJOR%.sln | ||
echo Build test target solution:: %SOLUTION% | ||
|
||
:: VC environment from the build's VC version | ||
set VC_PATH_VER=%NPPCR_BUILD_VC_VER:.=% | ||
set VC_VARS=VS%VC_PATH_VER%COMNTOOLS | ||
call set VC_VARS=%%%VC_VARS%%%..\..\VC\vcvarsall.bat | ||
echo Build test VC variable target:: %VC_VARS% | ||
|
||
:: MSBuild command | ||
set MSBUILD_OPTS=/v:detailed /t:rebuild /p:Configuration | ||
set MSBUILD_OPTS=%MSBUILD_OPTS%=%NPPCR_BUILD_CONFIGURATION% | ||
echo Build test MSBuild target:: %MSBUILD_OPTS% | ||
|
||
:: Console debugger command | ||
set NPPCR_BIN_PATH=%NPPCR_ROOT_PATH%PowerEditor\bin | ||
set NPPCR_BIN=%NPPCR_BIN_PATH%\notepad++Debug.exe | ||
set CDB_PATH=%MS_DBGTOOLS_PATH%cdb.exe | ||
set CDB_ARGS=-kqm -g -G -y | ||
set NPPCR_DBG_CMD="%CDB_PATH%" %CDB_ARGS% "%NPPCR_BIN_PATH%" "%NPPCR_BIN%" -leakdetect | ||
echo Build test Mem leak target:: %NPPCR_DBG_CMD% | ||
|
||
:: Main routine | ||
if NOT EXIST "%NPPCR_ROOT_PATH%%SOLUTION%" exit 1 | ||
call "%VC_VARS%" %NPPCR_BUILD_ARCH% | ||
if %ERRORLEVEL% EQU 0 call msbuild %%MSBUILD_OPTS%% "%NPPCR_ROOT_PATH%%SOLUTION%" | ||
if NOT [%NPPCR_BUILD_CONFIGURATION%]==[Debug] EXIT %ERRORLEVEL% | ||
if NOT %ERRORLEVEL% EQU 0 ( | ||
call :CLEAN_UP | ||
exit 1 | ||
) | ||
|
||
call %NPPCR_DBG_CMD% | ||
if NOT %ERRORLEVEL% EQU 0 ( | ||
call :CLEAN_UP | ||
exit 1 | ||
) | ||
|
||
call %NPPCR_DBG_CMD%|FINDSTR /C:"Detected memory leaks" | ||
if %ERRORLEVEL% EQU 1 ( | ||
call :CLEAN_UP | ||
exit 0 | ||
) else ( | ||
call :CLEAN_UP | ||
exit 1 | ||
) | ||
|
||
:CLEAN_UP | ||
call msbuild /t:clean "%NPPCR_ROOT_PATH%%SOLUTION%" | ||
goto :EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
Notepad++ Community Release Hudson Build Testing | ||
================================================ | ||
N++CR Support | ||
------------- | ||
Project page: http://github.com/npp-community/npp-community | ||
IRC Support: irc://irc.freenode.net:6667/notepad++ | ||
Issue Tracking: http://nppcommunity.lighthouseapp.com | ||
|
||
Overview | ||
-------- | ||
N++CR Hudson Build Testing is a simple to setup and use build test | ||
config used by the repo maintainer to test branches prior to pushing | ||
any new commits to the public source repo. Using Hudson and the | ||
following setup reduced build testing times from an 8 hour manual | ||
job to about 40 minutes and one click. | ||
|
||
Thank you to the Hudson team! | ||
|
||
|
||
Requirements | ||
------------ | ||
* N++CR source repository | ||
* Java Runtime Environment 1.5 or later | ||
* Hudson Continuous Integration .war file | ||
* Visual Studio 2005 and 2008 | ||
* Boost TR1 for VS 2005 | ||
* Microsoft Debugging Tools for Windows | ||
(x86 version is all that is being used at this time) | ||
* Google Testing Framework | ||
(both as git sub-module and stand-alone) | ||
* Google Mock | ||
(both as a git sub-module and stand-alone) | ||
|
||
Setup | ||
------------------ | ||
* The N++CR dev environment should already be setup and you should | ||
be able to successfully build using both notepadPlus solution | ||
files using GTest/Mock from the git submodules and stand-alone | ||
installs. | ||
* Download hudson.war from http://hudson-ci.org/ and launch it by | ||
executing java -jar hudson.war then visit http://localhost:8080/ | ||
* Follow the 'Manage Hudson' link to 'Manage Plugins' -> 'Available' | ||
and select the 'Setenv Plugin' for installation. Click the | ||
'install' button at the bottom of the page. | ||
* Close down Hudson and restart. (ctrl-c in the console running the .war) | ||
* On the Hudson main dashboard select 'New Job', select the 'Build multi- | ||
configuration project', name it N++CR Matrix, and click 'Ok'. | ||
* Close down Hudson again. | ||
* Copy the contrib\Hudson-ci\config.xml file to .hudson\jobs\N++CR Matrix\ in | ||
your home directory. | ||
* Restart Hudson | ||
* From the main dashboard select the N++CR Matrix job then 'Configure' | ||
* Scroll down to the 'Build Environment' section and set the NPPCR_ROOT_PATH | ||
to the path containing the notepadPlus solution files. | ||
|
||
Notes | ||
------------------- | ||
If you do not have or do not want to run all the tests you can alter the values | ||
that are listed in the matrix build. | ||
|
||
Enjoy, and don't forget to visit the irc channel! | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
<?xml version='1.0' encoding='UTF-8'?> | ||
<matrix-project> | ||
<actions/> | ||
<description>Multiple configuration build testing for Notepad++ Community Release.</description> | ||
<logRotator> | ||
<daysToKeep>-1</daysToKeep> | ||
<numToKeep>10</numToKeep> | ||
</logRotator> | ||
<keepDependencies>false</keepDependencies> | ||
<properties/> | ||
<scm class="hudson.scm.NullSCM"/> | ||
<canRoam>true</canRoam> | ||
<disabled>false</disabled> | ||
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding> | ||
<triggers class="vector"/> | ||
<concurrentBuild>false</concurrentBuild> | ||
<axes> | ||
<axis> | ||
<name>NPPCR_BUILD_CONFIGURATION</name> | ||
<values> | ||
<string>Debug</string> | ||
<string>Release</string> | ||
<string>Shipping</string> | ||
</values> | ||
</axis> | ||
<axis> | ||
<name>NPPCR_BUILD_VC_VER</name> | ||
<values> | ||
<string>8.0</string> | ||
<string>9.0</string> | ||
</values> | ||
</axis> | ||
<axis> | ||
<name>NPPCR_GTEST_STYLE</name> | ||
<values> | ||
<string>ENVIRONMENT</string> | ||
<string>SUB_MODULE</string> | ||
<string>NONE</string> | ||
</values> | ||
</axis> | ||
<axis> | ||
<name>NPPCR_BUILD_ARCH</name> | ||
<values> | ||
<string>x86</string> | ||
</values> | ||
</axis> | ||
</axes> | ||
<combinationFilter>!( (NPPCR_BUILD_CONFIGURATION=="Shipping" && NPPCR_GTEST_STYLE!="NONE") || (NPPCR_BUILD_CONFIGURATION!="Shipping" && NPPCR_GTEST_STYLE=="NONE") )</combinationFilter> | ||
<builders> | ||
<hudson.tasks.BatchFile> | ||
<command>"%NPPCR_ROOT_PATH%contrib\hudson-ci\NPPCR-HUDSON-BUILD-TESTS.bat" && exit %%ERRORLEVEL%%</command> | ||
</hudson.tasks.BatchFile> | ||
</builders> | ||
<publishers/> | ||
<buildWrappers> | ||
<hudson.plugins.setenv.SetEnvBuildWrapper> | ||
<localVarText>NPPCR_ROOT_PATH=C:\\Users\\almostautomated\\datastore\\repos\\git\\npp-community-setup\\ | ||
MS_DBGTOOLS_PATH=C:\\Program Files\\Debugging Tools for Windows (x86)\\</localVarText> | ||
</hudson.plugins.setenv.SetEnvBuildWrapper> | ||
</buildWrappers> | ||
<runSequentially>true</runSequentially> | ||
<touchStoneResultCondition> | ||
<name>SUCCESS</name> | ||
<ordinal>0</ordinal> | ||
<color>BLUE</color> | ||
</touchStoneResultCondition> | ||
</matrix-project> |