You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(142) |
Jun
(27) |
Jul
(122) |
Aug
(36) |
Sep
(59) |
Oct
(86) |
Nov
(140) |
Dec
(80) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
(52) |
Feb
(153) |
Mar
(118) |
Apr
(143) |
May
(123) |
Jun
(64) |
Jul
(282) |
Aug
(469) |
Sep
(56) |
Oct
(201) |
Nov
(182) |
Dec
(31) |
| 2005 |
Jan
(229) |
Feb
(316) |
Mar
(187) |
Apr
(130) |
May
(190) |
Jun
(154) |
Jul
(148) |
Aug
(133) |
Sep
(209) |
Oct
(234) |
Nov
(100) |
Dec
(40) |
| 2006 |
Jan
(1) |
Feb
(87) |
Mar
(73) |
Apr
(126) |
May
(58) |
Jun
(8) |
Jul
(12) |
Aug
(14) |
Sep
(22) |
Oct
(33) |
Nov
(4) |
Dec
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
|
1
|
2
|
3
|
|
4
|
5
|
6
(1) |
7
(1) |
8
|
9
|
10
|
|
11
|
12
|
13
(34) |
14
(5) |
15
|
16
|
17
|
|
18
|
19
|
20
(6) |
21
(5) |
22
|
23
|
24
|
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
|
From: <exo...@us...> - 2004-01-21 14:43:13
|
Update of /cvsroot/ccnet/ccnet/project/core/schedule/test
In directory sc8-pr-cvs1:/tmp/cvs-serv23683/project/core/schedule/test
Added Files:
DailyScheduleTest.cs
Log Message:
added support for scheduled builds
--- NEW FILE: DailyScheduleTest.cs ---
using Exortech.NetReflector;
using NUnit.Framework;
using System;
using ThoughtWorks.CruiseControl.Remote;
using ThoughtWorks.CruiseControl.Core.Config;
namespace ThoughtWorks.CruiseControl.Core.Schedules.Test
{
[TestFixture]
public class DailyScheduleTest : Assertion
{
[Test]
public void PopulateFromConfiguration()
{
DailySchedule schedule = (DailySchedule)NetReflector.Read(@"<daily integrationTime=""23:59""/>");
AssertEquals(new TimeSpan(23, 59, 0).ToString(), schedule.IntegrationTime);
}
[Test, ExpectedException(typeof(ConfigurationException))]
public void PopulateFromConfigurationWithInvalidIntegrationTime()
{
NetReflector.Read(@"<daily integrationTime=""23b59""/>");
}
[Test]
public void ShouldRunIntegrationIfCalendarTimeIsAfterIntegrationTime()
{
DailyScheduleExtension schedule = new DailyScheduleExtension();
schedule.now = new DateTime(2004, 1, 1, 23, 25, 0, 0);
schedule.IntegrationTime = "23:30";
AssertEquals(BuildCondition.NoBuild, schedule.ShouldRunIntegration());
schedule.now = new DateTime(2004, 1, 1, 23, 31, 0, 0);
AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration());
}
[Test]
public void ShouldRunIntegrationOnTheNextDay()
{
DailyScheduleExtension schedule = new DailyScheduleExtension();
schedule.now = new DateTime(2004, 1, 1, 23, 25, 0, 0);
schedule.IntegrationTime = "23:30";
schedule.now = new DateTime(2004, 1, 2, 1, 1, 0, 0);
AssertEquals(BuildCondition.IfModificationExists, schedule.ShouldRunIntegration());
}
class DailyScheduleExtension : DailySchedule
{
public DateTime now;
protected override DateTime Now { get { return now; } }
}
}
}
|
|
From: <exo...@us...> - 2004-01-21 14:43:13
|
Update of /cvsroot/ccnet/ccnet/project/core/schedule
In directory sc8-pr-cvs1:/tmp/cvs-serv23683/project/core/schedule
Added Files:
DailySchedule.cs
Log Message:
added support for scheduled builds
--- NEW FILE: DailySchedule.cs ---
using Exortech.NetReflector;
using System;
using System.Globalization;
using ThoughtWorks.CruiseControl.Core.Config;
using ThoughtWorks.CruiseControl.Remote;
namespace ThoughtWorks.CruiseControl.Core.Schedules
{
[ReflectorType("daily")]
public class DailySchedule : ISchedule
{
private TimeSpan _integrationTime;
private DateTime _nextIntegration;
[ReflectorProperty("integrationTime")]
public string IntegrationTime
{
get { return _integrationTime.ToString(); }
set
{
try
{
_integrationTime = TimeSpan.Parse(value);
SetNextIntegration();
}
catch (Exception ex)
{
string msg = "Unable to parse daily schedule integration time: {0}. The integration time should be specified in the format: {1}.";
throw new ConfigurationException(string.Format(msg, value, CultureInfo.CurrentCulture.DateTimeFormat.ShortTimePattern), ex);
}
}
}
private void SetNextIntegration()
{
DateTime now = Now;
_nextIntegration = new DateTime(now.Year, now.Month, now.Day, _integrationTime.Hours, _integrationTime.Minutes, 0, 0);
}
public bool ShouldStopIntegration()
{
return false;
}
public void ForceBuild()
{
}
public void IntegrationCompleted()
{
}
public BuildCondition ShouldRunIntegration()
{
if (Now > _nextIntegration)
{
return BuildCondition.IfModificationExists;
}
return BuildCondition.NoBuild;
}
protected virtual DateTime Now
{
get { return DateTime.Now; }
}
}
}
|
|
From: <exo...@us...> - 2004-01-21 14:43:13
|
Update of /cvsroot/ccnet/ccnet/project/core
In directory sc8-pr-cvs1:/tmp/cvs-serv23683/project/core
Modified Files:
CruiseServer.cs core2002.csproj
Log Message:
added support for scheduled builds
Index: CruiseServer.cs
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/core/CruiseServer.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** CruiseServer.cs 7 Dec 2003 12:59:43 -0000 1.4
--- CruiseServer.cs 21 Jan 2004 14:43:09 -0000 1.5
***************
*** 59,64 ****
private void AddProjectIntegrator(IProject project)
{
! if (project.Schedule!=null)
_projectIntegrators.Add(new ProjectIntegrator(project.Schedule, project));
}
--- 59,66 ----
private void AddProjectIntegrator(IProject project)
{
! if (project.Schedule != null)
! {
_projectIntegrators.Add(new ProjectIntegrator(project.Schedule, project));
+ }
}
Index: core2002.csproj
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/core/core2002.csproj,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** core2002.csproj 20 Jan 2004 13:47:17 -0000 1.15
--- core2002.csproj 21 Jan 2004 14:43:09 -0000 1.16
***************
*** 98,101 ****
--- 98,106 ----
HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Web.dll"
/>
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "C:\WINNT\Microsoft.NET\Framework\v1.0.3705\System.Data.dll"
+ />
</References>
</Build>
***************
*** 436,439 ****
--- 441,449 ----
/>
<File
+ RelPath = "schedule\DailySchedule.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "schedule\Schedule.cs"
SubType = "Code"
***************
*** 441,444 ****
--- 451,459 ----
/>
<File
+ RelPath = "schedule\test\DailyScheduleTest.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "schedule\test\MockSchedule.cs"
SubType = "Code"
|
|
From: <exo...@us...> - 2004-01-21 14:43:12
|
Update of /cvsroot/ccnet/ccnet/project
In directory sc8-pr-cvs1:/tmp/cvs-serv23683/project
Modified Files:
ccnet2002.sln
Log Message:
added support for scheduled builds
Index: ccnet2002.sln
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/ccnet2002.sln,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** ccnet2002.sln 7 Dec 2003 12:59:43 -0000 1.5
--- ccnet2002.sln 21 Jan 2004 14:43:09 -0000 1.6
***************
*** 45,49 ****
{E14EE67D-C24E-4088-B01B-35B742E99E85}.Release.Build.0 = Release|.NET
{B57FC66E-2352-448B-89A8-E531F3E2683B}.Debug.ActiveCfg = Debug|.NET
- {B57FC66E-2352-448B-89A8-E531F3E2683B}.Debug.Build.0 = Debug|.NET
{B57FC66E-2352-448B-89A8-E531F3E2683B}.Release.ActiveCfg = Release|.NET
{B57FC66E-2352-448B-89A8-E531F3E2683B}.Release.Build.0 = Release|.NET
--- 45,48 ----
|
|
From: <exo...@us...> - 2004-01-21 14:43:12
|
Update of /cvsroot/ccnet/ccnet/lib In directory sc8-pr-cvs1:/tmp/cvs-serv23683/lib Modified Files: NetReflector.dll Log Message: added support for scheduled builds Index: NetReflector.dll =================================================================== RCS file: /cvsroot/ccnet/ccnet/lib/NetReflector.dll,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 Binary files /tmp/cvs8JgUhL and /tmp/cvsspKTCm differ |
|
From: <exo...@us...> - 2004-01-20 13:47:21
|
Update of /cvsroot/ccnet/ccnet/project/web
In directory sc8-pr-cvs1:/tmp/cvs-serv2129/project/web
Modified Files:
LogFileLister.cs
Log Message:
globalisation fixes for starteam
globalisation fixes for cvs
fixed problems in ccservice config file
fixed warnings from buildlogtransformer and logfilelister
Index: LogFileLister.cs
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/web/LogFileLister.cs,v
retrieving revision 1.8
retrieving revision 1.9
diff -C2 -d -r1.8 -r1.9
*** LogFileLister.cs 28 Nov 2003 17:36:12 -0000 1.8
--- LogFileLister.cs 20 Jan 2004 13:47:17 -0000 1.9
***************
*** 5,8 ****
--- 5,9 ----
using System.Web.UI.HtmlControls;
using System.Xml;
+ using System.Xml.XPath;
using System.Xml.Xsl;
using ThoughtWorks.CruiseControl.Core;
***************
*** 98,108 ****
try
{
- XmlDocument document = new XmlDocument();
- document.Load(logfile);
-
XslTransform transform = new XslTransform();
LoadStylesheet(transform, xslfile);
! XmlReader reader = transform.Transform(document.CreateNavigator(), null);
!
XmlDocument output = new XmlDocument();
--- 99,105 ----
try
{
XslTransform transform = new XslTransform();
LoadStylesheet(transform, xslfile);
! XmlReader reader = transform.Transform(new XPathDocument(logfile), null);
XmlDocument output = new XmlDocument();
|
|
From: <exo...@us...> - 2004-01-20 13:47:20
|
Update of /cvsroot/ccnet/ccnet/project/service In directory sc8-pr-cvs1:/tmp/cvs-serv2129/project/service Modified Files: app.config Log Message: globalisation fixes for starteam globalisation fixes for cvs fixed problems in ccservice config file fixed warnings from buildlogtransformer and logfilelister Index: app.config =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/service/app.config,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** app.config 7 Dec 2003 12:59:44 -0000 1.3 --- app.config 20 Jan 2004 13:47:17 -0000 1.4 *************** *** 17,22 **** <trace autoflush="false" indentsize="4"> <listeners> ! <add name="EventLogListener" type="System.Diagnostics.EventLogTraceListener,System" /> ! <remove type="System.Diagnostics.DefaultTraceListener,System"/> </listeners> </trace> --- 17,22 ---- <trace autoflush="false" indentsize="4"> <listeners> ! <add name="EventLogListener" type="System.Diagnostics.EventLogTraceListener" /> ! <remove name="Default"/> </listeners> </trace> |
|
From: <exo...@us...> - 2004-01-20 13:47:20
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test
In directory sc8-pr-cvs1:/tmp/cvs-serv2129/project/core/sourcecontrol/test
Modified Files:
CvsTest.cs StarTeamHistoryParserTest.cs StarTeamTest.cs
Log Message:
globalisation fixes for starteam
globalisation fixes for cvs
fixed problems in ccservice config file
fixed warnings from buildlogtransformer and logfilelister
Index: CvsTest.cs
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test/CvsTest.cs,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** CvsTest.cs 5 Nov 2003 13:47:21 -0000 1.7
--- CvsTest.cs 20 Jan 2004 13:47:17 -0000 1.8
***************
*** 94,97 ****
--- 94,104 ----
}
+ [Test]
+ public void VerifyDateIsFormatedCorrectly()
+ {
+ DateTime dt = DateTime.Parse("2003-01-01 01:01:01 GMT", CultureInfo.InvariantCulture);
+ AssertEquals("2003-01-01 01:01:01 GMT", CreateCvs().FormatCommandDate(dt));
+ }
+
private Cvs CreateCvs()
{
Index: StarTeamHistoryParserTest.cs
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test/StarTeamHistoryParserTest.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** StarTeamHistoryParserTest.cs 28 Dec 2003 20:54:21 -0000 1.4
--- StarTeamHistoryParserTest.cs 20 Jan 2004 13:47:17 -0000 1.5
***************
*** 47,50 ****
--- 47,51 ----
public void TestModificationContent()
{
+ _parser.Culture = new CultureInfo("en-US");
Modification[] actual = _parser.Parse(StarTeamHistoryParserTest.ContentReader, OLDEST_ENTRY, NEWEST_ENTRY);
Modification[] expected = getExpectedModifications();
Index: StarTeamTest.cs
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/test/StarTeamTest.cs,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** StarTeamTest.cs 5 Nov 2003 13:47:21 -0000 1.4
--- StarTeamTest.cs 20 Jan 2004 13:47:17 -0000 1.5
***************
*** 1,4 ****
--- 1,5 ----
using System;
using System.Diagnostics;
+ using System.Globalization;
using NUnit.Framework;
using ThoughtWorks.CruiseControl.Core.Util;
***************
*** 33,37 ****
public void TestCreateHistoryProcess()
{
- //AssertNotNull("StarTeam was null", _starteam);
DateTime from = new DateTime(2001, 1, 21, 20, 0, 0);
DateTime to = new DateTime(2002, 2, 22, 20, 0, 0);
--- 34,37 ----
***************
*** 50,54 ****
public void TestValuesSet()
{
- //AssertNotNull("StarTeam was null", _starteam);
AssertEquals(@"..\tools\starteam\stcmd.exe", _starteam.Executable);
AssertEquals("Admin", _starteam.Username);
--- 50,53 ----
***************
*** 64,75 ****
public void TestFormatDate()
{
! //AssertNotNull("StarTeam was null", _starteam);
DateTime date = new DateTime(2002, 2, 22, 20, 0, 0);
! string expected = "02/22/2002 08:00:00 PM";
string actual = _starteam.FormatCommandDate(date);
AssertEquals(expected, actual);
date = new DateTime(2002, 2, 22, 12, 0, 0);
! expected = "02/22/2002 12:00:00 PM";
actual = _starteam.FormatCommandDate(date);
AssertEquals(expected, actual);
--- 63,76 ----
public void TestFormatDate()
{
! _starteam.Culture = new CultureInfo("en-US");
DateTime date = new DateTime(2002, 2, 22, 20, 0, 0);
! // string expected = "02/22/2002 08:00:00 PM";
! string expected = "2/22/2002 8:00:00 PM";
string actual = _starteam.FormatCommandDate(date);
AssertEquals(expected, actual);
date = new DateTime(2002, 2, 22, 12, 0, 0);
! // expected = "02/22/2002 12:00:00 PM";
! expected = "2/22/2002 12:00:00 PM";
actual = _starteam.FormatCommandDate(date);
AssertEquals(expected, actual);
|
|
From: <exo...@us...> - 2004-01-20 13:47:20
|
Update of /cvsroot/ccnet/ccnet/project/core/sourcecontrol In directory sc8-pr-cvs1:/tmp/cvs-serv2129/project/core/sourcecontrol Modified Files: Cvs.cs StarTeam.cs StarTeamHistoryParser.cs Log Message: globalisation fixes for starteam globalisation fixes for cvs fixed problems in ccservice config file fixed warnings from buildlogtransformer and logfilelister Index: Cvs.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/Cvs.cs,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Cvs.cs 1 Nov 2003 18:53:19 -0000 1.8 --- Cvs.cs 20 Jan 2004 13:47:17 -0000 1.9 *************** *** 1,6 **** using System; using System.Diagnostics; using System.IO; - using Exortech.NetReflector; using ThoughtWorks.CruiseControl.Core.Util; --- 1,7 ---- + using Exortech.NetReflector; using System; using System.Diagnostics; + using System.Globalization; using System.IO; using ThoughtWorks.CruiseControl.Core.Util; *************** *** 65,69 **** public string FormatCommandDate(DateTime date) { ! return date.ToUniversalTime().ToString(COMMAND_DATE_FORMAT); } --- 66,70 ---- public string FormatCommandDate(DateTime date) { ! return date.ToUniversalTime().ToString(COMMAND_DATE_FORMAT, CultureInfo.InvariantCulture); } Index: StarTeam.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/StarTeam.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StarTeam.cs 1 Nov 2003 18:53:19 -0000 1.4 --- StarTeam.cs 20 Jan 2004 13:47:17 -0000 1.5 *************** *** 1,4 **** --- 1,5 ---- using System; using System.Diagnostics; + using System.Globalization; using ThoughtWorks.CruiseControl.Core.Util; using Exortech.NetReflector; *************** *** 14,19 **** //stcmd hist -nologo -x -is -filter IO -p "userid:password@host:port/project/path" "files" internal readonly static string HISTORY_COMMAND_FORMAT = "hist -nologo -x -is -filter IO -p \"{0}:{1}@{2}:{3}/{4}/{5}\" \"*\""; ! internal readonly static string DATE_FORMAT = "MM/dd/yyyy hh:mm:ss tt"; ! private string _executable; --- 15,20 ---- //stcmd hist -nologo -x -is -filter IO -p "userid:password@host:port/project/path" "files" internal readonly static string HISTORY_COMMAND_FORMAT = "hist -nologo -x -is -filter IO -p \"{0}:{1}@{2}:{3}/{4}/{5}\" \"*\""; ! // internal readonly static string DATE_FORMAT = "MM/dd/yyyy hh:mm:ss tt"; ! internal CultureInfo Culture = CultureInfo.CurrentCulture; private string _executable; *************** *** 97,101 **** internal string FormatCommandDate(DateTime date) { ! return date.ToString(DATE_FORMAT); } --- 98,103 ---- internal string FormatCommandDate(DateTime date) { ! return date.ToString(Culture.DateTimeFormat); ! // return date.ToString(DATE_FORMAT); } Index: StarTeamHistoryParser.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/sourcecontrol/StarTeamHistoryParser.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StarTeamHistoryParser.cs 28 Dec 2003 20:54:20 -0000 1.4 --- StarTeamHistoryParser.cs 20 Jan 2004 13:47:17 -0000 1.5 *************** *** 15,20 **** public class StarTeamHistoryParser : IHistoryParser { - #region Constants - internal readonly static string FolderInfoSeparator = "Folder: "; internal readonly static string FileHistorySeparator = "----------------------------"; --- 15,18 ---- *************** *** 40,51 **** Author: (?<author_name>.*?) Date: (?<date_string>\d{01,2}/\d{1,2}/\d\d \d{1,2}:\d\d:\d\d (A|P)M).*\n(?s:(?<change_comment>.*?))-{28})"; - #endregion - readonly Regex folderRegex; readonly Regex fileRegex; readonly Regex historyRegex; ! DateTimeFormatInfo dfi; ! ! #region Constructor public StarTeamHistoryParser() --- 38,46 ---- Author: (?<author_name>.*?) Date: (?<date_string>\d{01,2}/\d{1,2}/\d\d \d{1,2}:\d\d:\d\d (A|P)M).*\n(?s:(?<change_comment>.*?))-{28})"; readonly Regex folderRegex; readonly Regex fileRegex; readonly Regex historyRegex; ! // DateTimeFormatInfo dfi; ! internal CultureInfo Culture = CultureInfo.CurrentCulture; public StarTeamHistoryParser() *************** *** 58,72 **** // Create DateTimeFormatInfo ! dfi = new DateTimeFormatInfo(); ! dfi.AMDesignator = "AM"; ! dfi.PMDesignator = "PM"; ! dfi.MonthDayPattern = @"M/d/yy h:mm:ss tt"; } - - #endregion - - #region Parsing modifications from StarTeam output - /// <summary> /// Method implementaion for IHistoryParser --- 53,62 ---- // Create DateTimeFormatInfo ! // dfi = new DateTimeFormatInfo(); ! // dfi.AMDesignator = "AM"; ! // dfi.PMDesignator = "PM"; ! // dfi.MonthDayPattern = @"M/d/yy h:mm:ss tt"; } /// <summary> /// Method implementaion for IHistoryParser *************** *** 124,128 **** // ASSUMPTION: StarTeam server and this application // runs in the same TIMEZONE ! mod.ModifiedTime = DateTime.Parse(mHistory.Result("${date_string}"), dfi); mod.Comment = mHistory.Result("${change_comment}"); } --- 114,118 ---- // ASSUMPTION: StarTeam server and this application // runs in the same TIMEZONE ! mod.ModifiedTime = DateTime.Parse(mHistory.Result("${date_string}"), Culture.DateTimeFormat); mod.Comment = mHistory.Result("${change_comment}"); } *************** *** 132,137 **** return (Modification[])modList.ToArray(typeof(Modification)); } - - #endregion } } --- 122,125 ---- |
|
From: <exo...@us...> - 2004-01-20 13:47:20
|
Update of /cvsroot/ccnet/ccnet/project/core/publishers In directory sc8-pr-cvs1:/tmp/cvs-serv2129/project/core/publishers Modified Files: BuildLogTransformer.cs Log Message: globalisation fixes for starteam globalisation fixes for cvs fixed problems in ccservice config file fixed warnings from buildlogtransformer and logfilelister Index: BuildLogTransformer.cs =================================================================== RCS file: /cvsroot/ccnet/ccnet/project/core/publishers/BuildLogTransformer.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** BuildLogTransformer.cs 28 Nov 2003 17:36:12 -0000 1.9 --- BuildLogTransformer.cs 20 Jan 2004 13:47:17 -0000 1.10 *************** *** 51,55 **** LoadStylesheet(transform, xslFile); ! XmlReader reader = transform.Transform(document.CreateNavigator(), null); XmlDocument output = new XmlDocument(); --- 51,55 ---- LoadStylesheet(transform, xslFile); ! XmlReader reader = transform.Transform(document.DocumentElement, null); XmlDocument output = new XmlDocument(); |
|
From: <exo...@us...> - 2004-01-20 13:47:20
|
Update of /cvsroot/ccnet/ccnet/project/core
In directory sc8-pr-cvs1:/tmp/cvs-serv2129/project/core
Modified Files:
core2002.csproj
Log Message:
globalisation fixes for starteam
globalisation fixes for cvs
fixed problems in ccservice config file
fixed warnings from buildlogtransformer and logfilelister
Index: core2002.csproj
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/core/core2002.csproj,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -d -r1.14 -r1.15
*** core2002.csproj 13 Dec 2003 09:38:13 -0000 1.14
--- core2002.csproj 20 Jan 2004 13:47:17 -0000 1.15
***************
*** 526,529 ****
--- 526,539 ----
/>
<File
+ RelPath = "sourcecontrol\Svn.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "sourcecontrol\SvnHistoryParser.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "sourcecontrol\Vss.cs"
SubType = "Code"
***************
*** 616,619 ****
--- 626,634 ----
/>
<File
+ RelPath = "sourcecontrol\test\SvnHistoryParserTest.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
RelPath = "sourcecontrol\test\VssHistoryParserTest.cs"
SubType = "Code"
|
|
From: <exo...@us...> - 2004-01-14 19:04:44
|
Update of /cvsroot/ccnet/ccnet/doc/developer/samples
In directory sc8-pr-cvs1:/tmp/cvs-serv10330/doc/developer/samples
Added Files:
CustomBuilder.cs b.bat ccnet.bat ccnet.config sample.build
Log Message:
added documentation for building a custom builder plugin
--- NEW FILE: CustomBuilder.cs ---
using System;
using Exortech.NetReflector;
using ThoughtWorks.CruiseControl.Core;
namespace ThoughtWorks.CruiseControl.Sample.Builder
{
[ReflectorType("myBuilder")]
public class NAntBuilder : IBuilder
{
public bool ShouldRun(IntegrationResult result)
{
return result.Working;
}
public void Run(IntegrationResult result)
{
Console.WriteLine("Hello World!");
}
}
}
--- NEW FILE: b.bat ---
@echo off
cls
..\..\..\tools\nant\NAnt.exe %*
--- NEW FILE: ccnet.bat ---
@echo off
cls
..\..\..\build\ccnet.exe
--- NEW FILE: ccnet.config ---
<cruisecontrol>
<workflow name="sample">
<tasks>
<myBuilder />
</tasks>
</workflow>
</cruisecontrol>
--- NEW FILE: sample.build ---
<?xml version="1.0"?>
<project name="ccnet" default="compile">
<target name="compile">
<csc target="library" output="ccnet.sample.plugin.dll" debug="true">
<sources>
<includes name="**.cs"/>
</sources>
<references>
<includes name="../../../lib/NetReflector.dll"/>
<includes name="../../../build/ccnet.core.dll"/>
</references>
</csc>
</target>
</project>
|
|
From: <exo...@us...> - 2004-01-14 19:04:44
|
Update of /cvsroot/ccnet/ccnet/doc/developer In directory sc8-pr-cvs1:/tmp/cvs-serv10330/doc/developer Added Files: builder-plugin.html Log Message: added documentation for building a custom builder plugin --- NEW FILE: builder-plugin.html --- <html> <head> <title>How to build a custom CruiseControl.NET Builder Plug-in</title> <link type="text/css" rel="stylesheet" href="../cruisecontrol.css"/> </head> <body> <div style="float:right"><img src="../images/ccnet_logo_onwhite.gif"/></div> <h1>How to build a custom CruiseControl.NET Builder Plug-in</h1> <p/> <h2>Steps:</h2> <ol> <li>Create a Class Library project to build the assembly that will contain your custom builder plug-in. The assembly that it produces should be named: 'ccnet.*.plugin.dll' (where the star represents the name you choose).</li> <li>Add your new customer builder class.</li> <li>The class must implement the <code>ThoughtWorks.CruiseControl.Core.IBuilder</code> interface (found in the ccnet.core assembly)</li> <li>Mark up your class with the NetReflector ReflectorType attribute. The <code>name</code> argument supplied to the attribute is the name of the element/attribute that will appear in the configuration file</li> <li>Add whatever configuration properties you need, marking them up with NetRefelctor ReflectorProperty attributes accordingly.</li> <li>Implement the <code>Run</code> and the <code>ShouldRun</code> methods. <li>Compile the assembly.</li> <li>Copy the assembly into the folder containing the CruiseControl.NET assemblies (or the current directory that you are running the ccnet server from).</li> <li>Modify your <code>ccnet.config</code> file in accordance with the sample config file below.</li> </ol> For more information, please take a look at the sample code contained in the folder <code>/docs/developer/samples.</code> <h2>Sample Builder Class:</h2> <pre> using System; using Exortech.NetReflector; using ThoughtWorks.CruiseControl.Core; namespace ThoughtWorks.CruiseControl.Sample.Builder { [ReflectorType("myBuilder")] public class NAntBuilder : IBuilder { public bool ShouldRun(IntegrationResult result) { return result.Working; } public void Run(IntegrationResult result) { Console.WriteLine("Hello World!"); } } } </pre> <h2>Sample Config File:</h2> <pre> <cruisecontrol> <project name="myproject"> <builder type="mybuilder"> <span class="comment"><!-- include custom builder properties here --></span> </builder> <span class="comment"><!-- include other project elements here --></span> </project> </cruisecontrol> </pre> </body> </html> |
|
From: <exo...@us...> - 2004-01-14 19:04:44
|
Update of /cvsroot/ccnet/ccnet/doc/server In directory sc8-pr-cvs1:/tmp/cvs-serv10330/doc/server Modified Files: index.html Log Message: added documentation for building a custom builder plugin Index: index.html =================================================================== RCS file: /cvsroot/ccnet/ccnet/doc/server/index.html,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** index.html 16 Nov 2003 14:59:33 -0000 1.1 --- index.html 14 Jan 2004 19:04:41 -0000 1.2 *************** *** 14,18 **** Setup your Server environment <LI> ! Setup your Web Environment, if you are going to use any of the CCNet Web Applications <li> --- 14,18 ---- Setup your Server environment <LI> ! Setup your Web Environment, if you are going to use any of the CCNet Web Applications <li> *************** *** 24,30 **** <h3>Create a bootstrap build file<br> </h3> ! First you need to create a 'bootstrap' build file that is used to get the ! latest changes to your source tree whenever an update is comitted. A good place ! to put this build file is in the same directory as your project's normal buildfile. This bootstrap file should do 2 things:<br> <ol> --- 24,30 ---- <h3>Create a bootstrap build file<br> </h3> ! First you need to create a 'bootstrap' build file that is used to get the ! latest changes to your source tree whenever an update is comitted. A good place ! to put this build file is in the same directory as your project's normal buildfile. This bootstrap file should do 2 things:<br> <ol> *************** *** 35,68 **** </li> </ol> ! The following is an example for a project under CVS control (it assumes that a ! propery called 'cvs.executable' is passed in from CruiseControl.NET - you can do this in the build/buildArgs section of the ccnet.config file):<br> <br> ! <pre><project name="ccnetlaunch" default="go"></pre> ! <pre> <target name="go" depends="update,build"/></pre> ! <pre> <target name="update"></pre> ! <pre> <ifnot propertyexists="cvs.executable"></pre> ! <pre> <fail message="cvs.executable property not set, so can't update" /></pre> ! <pre> </ifnot></pre> ! <pre> <echo message="CVS Executable at [${cvs.executable}]" /></pre> ! <pre> <exec </pre> ! <pre> basedir="." </pre> ! <pre> program="${cvs.executable}" </pre> ! <pre> commandline="-q update -P -d" </pre> ! <pre> /></pre> ! <pre> </target></pre> ! <pre> <target name="build"></pre> ! <pre> <nant </pre> ! <pre> buildfile="myproject.build" </pre> ! <pre> target="ContinuousIntegration" </pre> ! <pre> inheritall="true"</pre> ! <pre> /></pre> ! <pre> </target></pre> ! <pre></project><br><br></pre> <h3>Perform Initial Checkout</h3> The bootstrap buildfile above only <span style="FONT-STYLE: italic">updates</span> ! the buildserver's local copy of your project's source. Before you even run ! CruiseControl.NET for the first time you need to checkout your project to the location on your machine where CruiseControl.NET will build it.<br> <br> --- 35,64 ---- </li> </ol> ! The following is an example for a project under CVS control (it assumes that a ! propery called 'cvs.executable' is passed in from CruiseControl.NET - you can do this in the build/buildArgs section of the ccnet.config file):<br> <br> ! <pre> ! <project name="ccnetlaunch" default="go"> ! <target name="go" depends="update,build"/> ! <target name="update"> ! <ifnot propertyexists="cvs.executable"> ! <fail message="cvs.executable property not set, so can't update" /> ! </ifnot> ! <echo message="CVS Executable at [${cvs.executable}]" /> ! <exec basedir="." program="${cvs.executable}" commandline="-q update -P -d"/> ! </target> ! <target name="build"> ! <nant buildfile="myproject.build" target="ContinuousIntegration" inheritall="true"/> ! </target> ! </target> ! </project> ! </pre> ! <br><br> <h3>Perform Initial Checkout</h3> The bootstrap buildfile above only <span style="FONT-STYLE: italic">updates</span> ! the buildserver's local copy of your project's source. Before you even run ! CruiseControl.NET for the first time you need to checkout your project to the location on your machine where CruiseControl.NET will build it.<br> <br> *************** *** 72,76 **** <ol> <li> ! Unzip the distribution as described in <a href="../basicinstallation.html">Basic Installation</a> <li> --- 68,72 ---- <ol> <li> ! Unzip the distribution as described in <a href="../basicinstallation.html">Basic Installation</a> <li> *************** *** 78,82 **** here</a>. (There is an example in the 'server' folder to help you out.) <li> ! Try starting the Server by executing the 'StartCCNet.bat' file from a command line. If you have setup your config file correctly your build should run. </li> --- 74,78 ---- here</a>. (There is an example in the 'server' folder to help you out.) <li> ! Try starting the Server by executing the 'StartCCNet.bat' file from a command line. If you have setup your config file correctly your build should run. </li> |
|
From: <exo...@us...> - 2004-01-14 19:04:44
|
Update of /cvsroot/ccnet/ccnet/doc
In directory sc8-pr-cvs1:/tmp/cvs-serv10330/doc
Modified Files:
cruisecontrol.css index.html
Log Message:
added documentation for building a custom builder plugin
Index: cruisecontrol.css
===================================================================
RCS file: /cvsroot/ccnet/ccnet/doc/cruisecontrol.css,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** cruisecontrol.css 22 Apr 2003 17:34:51 -0000 1.1
--- cruisecontrol.css 14 Jan 2004 19:04:41 -0000 1.2
***************
*** 1,4 ****
--- 1,8 ----
body, table, form, input, td, th, p, textarea, select {font-family: verdana, helvetica, arial; font-size: 11px;}
+ h1 { color: #33F; font-size: large }
+ h2 { font-size: medium }
+ h3 { font-size: small; margin-top: 4px; margin-bottom: 4px}
+
.link { color:#FFFFFF; text-decoration:none; }
***************
*** 32,34 ****
.unittests-oddrow { background-color:#CCCCCC }
.unittests-data { font-size:9px; color:#000000; }
! .unittests-error { font-size:9px; color:#FF0000; }
\ No newline at end of file
--- 36,40 ----
.unittests-oddrow { background-color:#CCCCCC }
.unittests-data { font-size:9px; color:#000000; }
! .unittests-error { font-size:9px; color:#FF0000; }
!
! .comment { color: green }
\ No newline at end of file
Index: index.html
===================================================================
RCS file: /cvsroot/ccnet/ccnet/doc/index.html,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** index.html 29 Dec 2003 09:00:33 -0000 1.9
--- index.html 14 Jan 2004 19:04:41 -0000 1.10
***************
*** 70,73 ****
--- 70,75 ----
</li>
</UL>
+ </li>
+ <li>
<h3>The Project Web Application</h3>
<ul>
***************
*** 79,82 ****
--- 81,86 ----
</li>
</ul>
+ </li>
+ <li>
<h3>The Dashboard Web Application</h3>
<ul>
***************
*** 85,88 ****
--- 89,94 ----
</li>
</ul>
+ </li>
+ <li>
<h3>CCTray</h3>
<ul>
***************
*** 100,103 ****
--- 106,112 ----
<A href="developer/developer-guidelines.html">CruiseControl.NET Developer Guidelines</A>
</li>
+ <li>
+ <a href="developer/builder-plugin.html">Create a custom CruiseControl.NET Builder plug-in</a>
+ </li>
</ul>
<h2>Further help</h2>
|
|
From: <exo...@us...> - 2004-01-14 19:03:49
|
Update of /cvsroot/ccnet/ccnet/doc/developer/samples In directory sc8-pr-cvs1:/tmp/cvs-serv10116/samples Log Message: Directory /cvsroot/ccnet/ccnet/doc/developer/samples added to the repository |
|
From: <mik...@us...> - 2004-01-13 17:32:19
|
Update of /cvsroot/ccnet/website/site In directory sc8-pr-cvs1:/tmp/cvs-serv2712/site Modified Files: download.html default.html Log Message: Updates for 0.4.2 release Index: download.html =================================================================== RCS file: /cvsroot/ccnet/website/site/download.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** download.html 28 Dec 2003 23:13:49 -0000 1.3 --- download.html 13 Jan 2004 17:32:15 -0000 1.4 *************** *** 6,9 **** --- 6,20 ---- on how to setup your ccnet.config file are available in the documentation included in the distributions.</b></p> + <h4>CruiseControl.NET 0.4.2 (<a href="http://ccnetlive.thoughtworks.com/ccnet">CCNetLive</a> <a href="http://ccnetlive.thoughtworks.com/CCNet-builds/85/">build 85</a>)</h4> + <ul> + <li><a href="releases/0.4.2/CruiseControl.NET.zip">Binary distribution</a></li> + <li><a href="releases/0.4.2/CruiseControl.NET.source.zip">Source Distribution</a></li> + </ul> + <p>Release 0.4.2 contains the following change over 0.4.1: + <ul> + <li>CCNet service executable now included</li> + </ul> + </p> + <br /> <h4>CruiseControl.NET 0.4.1 (<a href="http://ccnetlive.thoughtworks.com/ccnet">CCNetLive</a> <a href="http://ccnetlive.thoughtworks.com/CCNet-builds/81/">build 81</a>)</h4> <ul> Index: default.html =================================================================== RCS file: /cvsroot/ccnet/website/site/default.html,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** default.html 28 Dec 2003 23:13:49 -0000 1.3 --- default.html 13 Jan 2004 17:32:15 -0000 1.4 *************** *** 55,58 **** --- 55,65 ---- <br> <h2>News</h2> + <H4>13th January 2004</H4> + <p> + CruiseControl.NET 0.4.2 now available - check the <a href="?page=download.html"> Download</a> page. + This is <a href="http://ccnetlive.thoughtworks.com/CCNet-builds/85/">build 85</a> + from <a href="http://ccnetlive.thoughtworks.com/ccnet">CCNetLive</a>, and a distribution fix for 0.4.1. + Please feedback any bugs / documentation problems to the ccnet-user mailing list. + </p> <H4>28th December 2003</H4> <p> *************** *** 72,81 **** distributions for every successful build. Check it out at <a href="http://ccnetlive.thoughtworks.com/"> http://ccnetlive.thoughtworks.com/</a></p> - <h4>28th July 2003</h4> - <p>CruiseControl.NET 0.4 pre-release is now available - check the <a href="?page=download.html"> - Download</a> page</p> - <h4>8th June 2003</h4> - <p>Website and documentation updates - documentation is now available <a href="docs/"> - online</a>.</p> <br> <h2>ThoughtWorks powered</h2> --- 79,82 ---- |
|
From: <mik...@us...> - 2004-01-13 10:27:12
|
Update of /cvsroot/ccnet/ccnet/project/Shared/Client/Services
In directory sc8-pr-cvs1:/tmp/cvs-serv30812/project/Shared/Client/Services
Modified Files:
LocalLogFileService.cs CompositeService.cs
Log Message:
already deleting code. :)
Changing it so all services can return 'NoValidService' result
Index: LocalLogFileService.cs
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/Shared/Client/Services/LocalLogFileService.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LocalLogFileService.cs 13 Jan 2004 00:46:17 -0000 1.1
--- LocalLogFileService.cs 13 Jan 2004 10:27:09 -0000 1.2
***************
*** 8,15 ****
namespace ThoughtWorks.CruiseControl.Shared.Client.Services
{
! public class LocalLogFileService : ISpecializedCruiseService
{
- protected static readonly Type[] SUPPORTED_TYPES = new Type[] { typeof(GetProjectLogCommand) };
-
private LocalLogFileServiceConfig _config;
--- 8,13 ----
namespace ThoughtWorks.CruiseControl.Shared.Client.Services
{
! public class LocalLogFileService : ICruiseService
{
private LocalLogFileServiceConfig _config;
***************
*** 23,28 ****
if (!(command is GetProjectLogCommand))
{
! throw new InvalidCommandException(command);
}
GetProjectLogCommand cmd = command as GetProjectLogCommand;
--- 21,27 ----
if (!(command is GetProjectLogCommand))
{
! return new NoValidServiceFoundResult();
}
+
GetProjectLogCommand cmd = command as GetProjectLogCommand;
***************
*** 37,48 ****
return new GetProjectLogResult(log);
}
-
- public Type[] SupportedCommandTypes
- {
- get
- {
- return SUPPORTED_TYPES;
- }
- }
}
}
--- 36,39 ----
Index: CompositeService.cs
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/Shared/Client/Services/CompositeService.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CompositeService.cs 13 Jan 2004 00:46:17 -0000 1.1
--- CompositeService.cs 13 Jan 2004 10:27:09 -0000 1.2
***************
*** 18,35 ****
foreach (ICruiseService service in _services)
{
! if (service is ISpecializedCruiseService)
! {
! if (ServiceSupportsCommand((ISpecializedCruiseService) service, command))
! {
! return service.Run(command);
! }
! }
! else
{
! ICruiseResult result = service.Run(command);
! if (result != null && !(result is NoValidServiceFoundResult))
! {
! return result;
! }
}
}
--- 18,25 ----
foreach (ICruiseService service in _services)
{
! ICruiseResult result = service.Run(command);
! if ( !(result is NoValidServiceFoundResult))
{
! return result;
}
}
***************
*** 37,52 ****
return new NoValidServiceFoundResult();
}
-
- private bool ServiceSupportsCommand(ISpecializedCruiseService service, ICruiseCommand command)
- {
- foreach (Type type in service.SupportedCommandTypes)
- {
- if (type.Equals(command.GetType()))
- {
- return true;
- }
- }
- return false;
- }
}
}
--- 27,30 ----
|
|
From: <mik...@us...> - 2004-01-13 10:27:12
|
Update of /cvsroot/ccnet/ccnet/project/Shared
In directory sc8-pr-cvs1:/tmp/cvs-serv30812/project/Shared
Modified Files:
Shared.csproj
Log Message:
already deleting code. :)
Changing it so all services can return 'NoValidService' result
Index: Shared.csproj
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/Shared/Shared.csproj,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Shared.csproj 13 Jan 2004 00:46:18 -0000 1.1
--- Shared.csproj 13 Jan 2004 10:27:09 -0000 1.2
***************
*** 140,153 ****
/>
<File
- RelPath = "Services\InvalidCommandException.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
- RelPath = "Services\ISpecializedCruiseService.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
- <File
RelPath = "Services\NoValidServiceFoundResult.cs"
SubType = "Code"
--- 140,143 ----
|
|
From: <mik...@us...> - 2004-01-13 10:27:12
|
Update of /cvsroot/ccnet/ccnet/project/UnitTests/Shared/Client/Services
In directory sc8-pr-cvs1:/tmp/cvs-serv30812/project/UnitTests/Shared/Client/Services
Modified Files:
LocalLogFileServiceTest.cs CompositeServiceTest.cs
Log Message:
already deleting code. :)
Changing it so all services can return 'NoValidService' result
Index: LocalLogFileServiceTest.cs
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/UnitTests/Shared/Client/Services/LocalLogFileServiceTest.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** LocalLogFileServiceTest.cs 13 Jan 2004 00:46:17 -0000 1.1
--- LocalLogFileServiceTest.cs 13 Jan 2004 10:27:08 -0000 1.2
***************
*** 42,74 ****
[Test]
! public void SupportsCorrectCommands()
{
LocalLogFileService service = new LocalLogFileService(_config);
! ArrayList expectedTypes = new ArrayList( new Type[] { typeof(GetProjectLogCommand) } );
! ArrayList supportedTypes = new ArrayList (service.SupportedCommandTypes);
!
! AssertEquals(expectedTypes.Count, supportedTypes.Count);
! foreach (Type expectedType in expectedTypes)
! {
! Assert(supportedTypes.Contains(expectedType));
! }
!
! _configMock.Verify();
! }
!
! [Test]
! public void ThrowsCorrectExceptionIfInvalidCommandRequested()
! {
! DynamicMock commandMock = new DynamicMock(typeof(ICruiseCommand));
! try
! {
! new LocalLogFileService(_config).Run( (ICruiseCommand) commandMock.MockInstance);
! Fail();
! }
! catch (InvalidCommandException)
! {
! // Expected
! }
}
--- 42,51 ----
[Test]
! public void ReturnsNoValidServiceFoudnResultIfInvalidCommandRequested()
{
LocalLogFileService service = new LocalLogFileService(_config);
+ ICruiseCommand command = (ICruiseCommand) new DynamicMock(typeof(ICruiseCommand)).MockInstance;
! AssertEquals(typeof(NoValidServiceFoundResult), service.Run(command).GetType());
}
Index: CompositeServiceTest.cs
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/UnitTests/Shared/Client/Services/CompositeServiceTest.cs,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** CompositeServiceTest.cs 13 Jan 2004 00:46:17 -0000 1.1
--- CompositeServiceTest.cs 13 Jan 2004 10:27:08 -0000 1.2
***************
*** 26,37 ****
[Test]
! public void ReturnsResultFromFirstSpecializedServiceThatSupportsCommand()
{
! DynamicMock service1Mock = new DynamicMock(typeof(ISpecializedCruiseService));
! DynamicMock service2Mock = new DynamicMock(typeof(ISpecializedCruiseService));
! ISpecializedCruiseService service1 = (ISpecializedCruiseService) service1Mock.MockInstance;
! ISpecializedCruiseService service2 = (ISpecializedCruiseService) service2Mock.MockInstance;
- service1Mock.SetupResult("SupportedCommandTypes", new Type[] { _command.GetType() });
service1Mock.ExpectAndReturn("Run", _result, _command);
service2Mock.ExpectNoCall("Run");
--- 26,36 ----
[Test]
! public void ReturnsResultFromFirstServiceIfItSupportsCommand()
{
! DynamicMock service1Mock = new DynamicMock(typeof(ICruiseService));
! DynamicMock service2Mock = new DynamicMock(typeof(ICruiseService));
! ICruiseService service1 = (ICruiseService) service1Mock.MockInstance;
! ICruiseService service2 = (ICruiseService) service2Mock.MockInstance;
service1Mock.ExpectAndReturn("Run", _result, _command);
service2Mock.ExpectNoCall("Run");
***************
*** 40,107 ****
AssertEquals(_result, service.Run(_command));
! // Bug in our old version of NMock? this fails on setup result
! //service1Mock.Verify();
service2Mock.Verify();
}
[Test]
! public void ReturnsNoValidServiceFoundResultIfNoServicesAvailable()
! {
! CompositeService service = new CompositeService(new ICruiseService[0] );
! AssertEquals(typeof(NoValidServiceFoundResult), service.Run(_command).GetType());
! }
!
! [Test]
! public void ReturnsNoValidServiceFoundResultIfNoValidSpecializedServiceAvailable()
! {
! DynamicMock service1Mock = new DynamicMock(typeof(ISpecializedCruiseService));
! ISpecializedCruiseService service1 = (ISpecializedCruiseService) service1Mock.MockInstance;
! service1Mock.SetupResult("SupportedCommandTypes", new Type[0]);
! service1Mock.ExpectNoCall("Run");
!
! CompositeService service = new CompositeService(new ICruiseService[] {service1} );
! AssertEquals(typeof(NoValidServiceFoundResult), service.Run(_command).GetType());
!
! // Bug in our old version of NMock? this fails on setup result
! //service1Mock.Verify();
! }
!
! [Test]
! public void DelegatesThroughToNonSpecializedServicesAndReturnsResultIfProcessed()
{
DynamicMock service1Mock = new DynamicMock(typeof(ICruiseService));
! DynamicMock service2Mock = new DynamicMock(typeof(ISpecializedCruiseService));
ICruiseService service1 = (ICruiseService) service1Mock.MockInstance;
! ISpecializedCruiseService service2 = (ISpecializedCruiseService) service2Mock.MockInstance;
! service1Mock.ExpectAndReturn("Run", _result, _command);
! service2Mock.ExpectNoCall("Run");
CompositeService service = new CompositeService(new ICruiseService[] {service1, service2} );
AssertEquals(_result, service.Run(_command));
! // Bug in our old version of NMock? this fails on setup result
! //service1Mock.Verify();
service2Mock.Verify();
}
[Test]
! public void DelegatesThroughToNonSpecializedServicesAndTriesAnotherIfNoServiceFound()
{
DynamicMock service1Mock = new DynamicMock(typeof(ICruiseService));
- DynamicMock service2Mock = new DynamicMock(typeof(ISpecializedCruiseService));
ICruiseService service1 = (ICruiseService) service1Mock.MockInstance;
- ISpecializedCruiseService service2 = (ISpecializedCruiseService) service2Mock.MockInstance;
-
- service2Mock.SetupResult("SupportedCommandTypes", new Type[] { _command.GetType() });
service1Mock.ExpectAndReturn("Run", new NoValidServiceFoundResult(), _command);
- service2Mock.ExpectAndReturn("Run", _result, _command);
! CompositeService service = new CompositeService(new ICruiseService[] {service1, service2} );
! AssertEquals(_result, service.Run(_command));
! // Bug in our old version of NMock? this fails on setup result
! //service1Mock.Verify();
! //service2Mock.Verify();
}
}
--- 39,83 ----
AssertEquals(_result, service.Run(_command));
! service1Mock.Verify();
service2Mock.Verify();
}
[Test]
! public void ReturnsResultFromSecondServiceIfFirstDoesntSupportCommand()
{
DynamicMock service1Mock = new DynamicMock(typeof(ICruiseService));
! DynamicMock service2Mock = new DynamicMock(typeof(ICruiseService));
ICruiseService service1 = (ICruiseService) service1Mock.MockInstance;
! ICruiseService service2 = (ICruiseService) service2Mock.MockInstance;
! service1Mock.ExpectAndReturn("Run", new NoValidServiceFoundResult(), _command);
! service2Mock.ExpectAndReturn("Run", _result, _command);
CompositeService service = new CompositeService(new ICruiseService[] {service1, service2} );
AssertEquals(_result, service.Run(_command));
! service1Mock.Verify();
service2Mock.Verify();
}
+
[Test]
! public void ReturnsNoValidServiceFoundResultIfNoServicesAvailable()
! {
! CompositeService service = new CompositeService(new ICruiseService[0] );
! AssertEquals(typeof(NoValidServiceFoundResult), service.Run(_command).GetType());
! }
!
! [Test]
! public void ReturnsNoValidServiceFoundResultIfNoValidServiceAvailable()
{
DynamicMock service1Mock = new DynamicMock(typeof(ICruiseService));
ICruiseService service1 = (ICruiseService) service1Mock.MockInstance;
service1Mock.ExpectAndReturn("Run", new NoValidServiceFoundResult(), _command);
! CompositeService service = new CompositeService(new ICruiseService[] {service1} );
! AssertEquals(typeof(NoValidServiceFoundResult), service.Run(_command).GetType());
! service1Mock.Verify();
}
}
|
|
From: <mik...@us...> - 2004-01-13 10:27:11
|
Update of /cvsroot/ccnet/ccnet/project/Shared/Services In directory sc8-pr-cvs1:/tmp/cvs-serv30812/project/Shared/Services Removed Files: InvalidCommandException.cs ISpecializedCruiseService.cs Log Message: already deleting code. :) Changing it so all services can return 'NoValidService' result --- InvalidCommandException.cs DELETED --- --- ISpecializedCruiseService.cs DELETED --- |
|
From: <mik...@us...> - 2004-01-13 00:46:22
|
Update of /cvsroot/ccnet/ccnet/project/Shared/Entities/Logging In directory sc8-pr-cvs1:/tmp/cvs-serv6183/project/Shared/Entities/Logging Added Files: LogFile.cs Log Message: Starting off some new architectural stuff. I'm going to try using this to get client apps working with multi-project instances, etc. Not much to see right now, and doesn't get published --- NEW FILE: LogFile.cs --- using System; using System.Collections; using System.Globalization; using System.IO; using System.Text.RegularExpressions; using ThoughtWorks.CruiseControl.Shared.Util; namespace ThoughtWorks.CruiseControl.Shared.Entities.Logging { /// <summary> /// Provides utility methods for dealing with log files. /// </summary> // TODO copied from core, need to sort out unit test // TODO commented out references to remote stuff - need to fix public class LogFileUtil { #region Constants public const string FilenamePrefix ="log"; public const string LogQueryString = "log"; public const string DateFormat = "yyyyMMddHHmmss"; public static readonly Regex BuildNumber = new Regex(@"Lbuild\.(\d+)\.xml"); #endregion #region Private constructor /// <summary> /// Utility class, not intended for instantiation. /// </summary> private LogFileUtil() { } #endregion #region Extracting data from log filename public static string GetFormattedDateString(string filename) { return DateUtil.FormatDate(ParseForDate(ParseForDateString(filename))); } public static DateTime ParseForDate(string dateString) { return DateTime.ParseExact(dateString, DateFormat, DateTimeFormatInfo.GetInstance(CultureInfo.InvariantCulture)); } public static string ParseForDateString(string filename) { ValidateFilename(filename); return filename.Substring(FilenamePrefix.Length, DateFormat.Length); } public static bool IsSuccessful(string filename) { int characterIndex = FilenamePrefix.Length + DateFormat.Length; return filename[characterIndex] == 'L'; } public static int ParseBuildNumber(string filename) { string value = BuildNumber.Match(filename).Groups[1].Value; if (value==null || value.Length==0) return 0; return Int32.Parse(value); } #endregion #region Creating log file names public static string CreateFailedBuildLogFileName(DateTime date) { return string.Format("{0}{1}.xml", FilenamePrefix,date.ToString(DateFormat)); } public static string CreateSuccessfulBuildLogFileName(DateTime date, string label) { return string.Format("{0}{1}Lbuild.{2}.xml", FilenamePrefix, date.ToString(DateFormat), label ); } #endregion #region Getting all log filenames at a particular path public static string[] GetLogFileNames(string path) { DirectoryInfo dir = new DirectoryInfo(path); FileInfo[] files = dir.GetFiles("log*.xml"); string[] filenames = new string[files.Length]; for (int i = 0; i < filenames.Length; i++) { filenames[i] = files[i].Name; } return filenames; } #endregion #region Getting data about the latest build public static int GetLatestBuildNumber(string path) { if (Directory.Exists(path)) return GetLatestBuildNumber(GetLogFileNames(path)); else return 0; } public static int GetLatestBuildNumber(string[] filenames) { int result = 0; foreach(string filename in filenames) { result = Math.Max(result, ParseBuildNumber(filename)); } return result; } public static DateTime GetLastBuildDate(string[] filenames, DateTime defaultValue) { if (filenames.Length == 0) return defaultValue; ArrayList.Adapter(filenames).Sort(); string filename = filenames[filenames.Length-1]; return ParseForDate(ParseForDateString(filename)); } public static DateTime GetLastBuildDate(string path, DateTime defaultValue) { if (Directory.Exists(path)) return GetLastBuildDate(GetLogFileNames(path), defaultValue); else return defaultValue; } // TODO refactor other GetLatest methods to use this one public static string GetLatestLogFileName(string path) { if (!Directory.Exists(path)) return null; string[] filenames = GetLogFileNames(path); return GetLatestLogFileName(filenames); } // TODO refactor other GetLatest methods to use this one public static string GetLatestLogFileName(string[] filenames) { if (filenames.Length==0) return null; ArrayList.Adapter(filenames).Sort(); return filenames[filenames.Length-1]; } #endregion #region Creating URLs from filenames public static string CreateUrl(string filename) { return string.Format("?{0}={1}", LogQueryString, filename); } /* public static string CreateUrl(IntegrationResult result) { if (result.Status == IntegrationStatus.Success) return CreateUrl(CreateSuccessfulBuildLogFileName(result.StartTime, result.Label)); else return CreateUrl(CreateFailedBuildLogFileName(result.StartTime)); } public static string CreateUrl(string urlRoot, IntegrationResult result) { return String.Concat(urlRoot, CreateUrl(result)); } */ #endregion #region Private helper methods /// <summary> /// Validates filename structure, throwing exceptions if badly formed. /// </summary> /// <param name="filename">The filename to validate.</param> /// <exception cref="ArgumentNullException">If <see cref="filename"/> is null</exception> /// <exception cref="ArgumentException">If <see cref="filename"/> is badly formed</exception> private static void ValidateFilename(string filename) { if (filename==null) throw new ArgumentNullException("filename"); if (!filename.StartsWith(FilenamePrefix)) throw new ArgumentException(string.Format( "{0} does not start with {1}.", filename, FilenamePrefix)); if (filename.Length < FilenamePrefix.Length + DateFormat.Length) throw new ArgumentException(string.Format( "{0} does not start with {1} followed by a date in {2} format", filename, FilenamePrefix, DateFormat)); } #endregion } } |
|
From: <mik...@us...> - 2004-01-13 00:46:21
|
Update of /cvsroot/ccnet/ccnet/project/UnitTests
In directory sc8-pr-cvs1:/tmp/cvs-serv6183/project/UnitTests
Added Files:
AssemblyInfo.cs CustomAssertion.cs .cvsignore UnitTests.csproj
Log Message:
Starting off some new architectural stuff. I'm going to try using this to get client apps working with multi-project instances, etc.
Not much to see right now, and doesn't get published
--- NEW FILE: AssemblyInfo.cs ---
using System.Reflection;
using System.Runtime.CompilerServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright("")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("1.0.*")]
//
// In order to sign your assembly you must specify a key to use. Refer to the
// Microsoft .NET Framework documentation for more information on assembly signing.
//
// Use the attributes below to control which key is used for signing.
//
// Notes:
// (*) If no key is specified, the assembly is not signed.
// (*) KeyName refers to a key that has been installed in the Crypto Service
// Provider (CSP) on your machine. KeyFile refers to a file which contains
// a key.
// (*) If the KeyFile and the KeyName values are both specified, the
// following processing occurs:
// (1) If the KeyName can be found in the CSP, that key is used.
// (2) If the KeyName does not exist and the KeyFile does exist, the key
// in the KeyFile is installed into the CSP and used.
// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility.
// When specifying the KeyFile, the location of the KeyFile should be
// relative to the project output directory which is
// %Project Directory%\obj\<configuration>. For example, if your KeyFile is
// located in the project directory, you would specify the AssemblyKeyFile
// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework
// documentation for more information on this.
//
[assembly: AssemblyDelaySign(false)]
[assembly: AssemblyKeyFile("")]
[assembly: AssemblyKeyName("")]
--- NEW FILE: CustomAssertion.cs ---
using System;
using NUnit.Framework;
namespace ThoughtWorks.CruiseControl.UnitTests
{
public class CustomAssertion : Assertion
{
public static void AssertContains(string search, string target)
{
string message = string.Format("Search substring: {0} is not contained in target: {1}", search, target);
Assert(message, target.IndexOf(search) > 0);
}
public static void AssertFalse(bool assert)
{
Assert(!assert);
}
public static void AssertFalse(string message, bool assert)
{
Assert(message, !assert);
}
public static void AssertNotEquals(object expected, object actual)
{
string message = string.Format("Values ({0}) and ({1}) should not be equal", expected, actual);
Assert(message, !expected.Equals(actual));
Assert(message, !actual.Equals(expected));
}
public static void AssertApproximatelyEqual(double expected, double actual, double tolerance)
{
AssertApproximatelyEqual(string.Empty, expected, actual, tolerance);
}
public static void AssertApproximatelyEqual(string message, double expected, double actual, double tolerance)
{
string expectation = string.Format("Expected {0}, but was {1}", expected, actual);
Assert(message + expectation, Math.Abs(expected - actual) < tolerance);
}
public static void AssertEqualArrays(Array expected, Array actual)
{
AssertEquals("Arrays should have same length", actual.Length, expected.Length);
for (int i=0; i<expected.Length; i++)
{
AssertEquals("Comparing array index " + i, expected.GetValue(i), actual.GetValue(i));
}
}
}
}
--- NEW FILE: .cvsignore ---
bin
obj
UnitTests.csproj.user
--- NEW FILE: UnitTests.csproj ---
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{2BE0F646-12F8-4A7C-BB51-31EE6B32B650}"
>
<Build>
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
AssemblyName = "ThoughtWorks.CruiseControl.UnitTests"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Library"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "ThoughtWorks.CruiseControl.UnitTests"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "..\..\..\..\..\..\WINNT\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "Shared"
Project = "{FA6F61A0-6332-4236-B861-FEA43B74A092}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
<Reference
Name = "nunit.framework"
AssemblyName = "nunit.framework"
HintPath = "..\..\lib\nunit.framework.dll"
/>
<Reference
Name = "nmock"
AssemblyName = "nmock"
HintPath = "..\..\lib\nmock.dll"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "CustomAssertion.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Shared\Client\Services\CompositeServiceTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Shared\Client\Services\LocalLogFileServiceConfigTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Shared\Client\Services\LocalLogFileServiceTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Shared\Services\Commands\Reporting\GetProjectLogCommandTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Shared\Services\Commands\Reporting\GetProjectLogResultTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "Shared\Util\TempFileUtilTest.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>
|
|
From: <mik...@us...> - 2004-01-13 00:46:21
|
Update of /cvsroot/ccnet/ccnet/project
In directory sc8-pr-cvs1:/tmp/cvs-serv6183/project
Modified Files:
ccnet.sln
Log Message:
Starting off some new architectural stuff. I'm going to try using this to get client apps working with multi-project instances, etc.
Not much to see right now, and doesn't get published
Index: ccnet.sln
===================================================================
RCS file: /cvsroot/ccnet/ccnet/project/ccnet.sln,v
retrieving revision 1.12
retrieving revision 1.13
diff -C2 -d -r1.12 -r1.13
*** ccnet.sln 1 Nov 2003 18:39:07 -0000 1.12
--- ccnet.sln 13 Jan 2004 00:46:18 -0000 1.13
***************
*** 36,39 ****
--- 36,47 ----
EndProjectSection
EndProject
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{FA6F61A0-6332-4236-B861-FEA43B74A092}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+ EndProject
+ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "UnitTests", "UnitTests\UnitTests.csproj", "{2BE0F646-12F8-4A7C-BB51-31EE6B32B650}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+ EndProject
Global
GlobalSection(SolutionConfiguration) = preSolution
***************
*** 78,81 ****
--- 86,97 ----
{19C24DF5-7EE8-4325-AFD6-C18D6C85DD9B}.Release.ActiveCfg = Release|.NET
{19C24DF5-7EE8-4325-AFD6-C18D6C85DD9B}.Release.Build.0 = Release|.NET
+ {FA6F61A0-6332-4236-B861-FEA43B74A092}.Debug.ActiveCfg = Debug|.NET
+ {FA6F61A0-6332-4236-B861-FEA43B74A092}.Debug.Build.0 = Debug|.NET
+ {FA6F61A0-6332-4236-B861-FEA43B74A092}.Release.ActiveCfg = Release|.NET
+ {FA6F61A0-6332-4236-B861-FEA43B74A092}.Release.Build.0 = Release|.NET
+ {2BE0F646-12F8-4A7C-BB51-31EE6B32B650}.Debug.ActiveCfg = Debug|.NET
+ {2BE0F646-12F8-4A7C-BB51-31EE6B32B650}.Debug.Build.0 = Debug|.NET
+ {2BE0F646-12F8-4A7C-BB51-31EE6B32B650}.Release.ActiveCfg = Release|.NET
+ {2BE0F646-12F8-4A7C-BB51-31EE6B32B650}.Release.Build.0 = Release|.NET
EndGlobalSection
GlobalSection(SolutionItems) = postSolution
|
|
From: <mik...@us...> - 2004-01-13 00:46:21
|
Update of /cvsroot/ccnet/ccnet
In directory sc8-pr-cvs1:/tmp/cvs-serv6183
Modified Files:
ccnet.build
Log Message:
Starting off some new architectural stuff. I'm going to try using this to get client apps working with multi-project instances, etc.
Not much to see right now, and doesn't get published
Index: ccnet.build
===================================================================
RCS file: /cvsroot/ccnet/ccnet/ccnet.build,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** ccnet.build 6 Jan 2004 14:03:05 -0000 1.29
--- ccnet.build 13 Jan 2004 00:46:18 -0000 1.30
***************
*** 19,22 ****
--- 19,23 ----
<property name="interfaces.dll" value="ccnet.remote.dll" />
<property name="core.dll" value="ccnet.core.dll"/>
+ <property name="unittests.dll" value="ThoughtWorks.CruiseControl.UnitTests.dll"/>
<property name="console.exe" value="ccnet.exe"/>
<property name="service.exe" value="ccnet.service.exe"/>
***************
*** 98,101 ****
--- 99,107 ----
commandline="${web.dll} /xml:ccnet-web-results.xml"/>
+ <exec basedir="${build.dir}"
+ workingdir="${build.dir}"
+ program="..\tools\nunit\nunit-console.exe"
+ commandline="${unittests.dll} /xml:ccnet-unittest-results.xml"/>
+
</target>
|