Yeah I think it is at least hard coding that the db server is the
local machine:

protected virtual string ConnectionStringFor(string databaseName)
{
    return string.Format("Server=(local);initial
catalog={0};Integrated Security=SSPI", databaseName);
}

protected virtual string GetSqlServerDataDirectory()
{
    string sqlServerRegKey = @"SOFTWARE\Microsoft\Microsoft SQL Server
\";
    string sqlServerInstanceName =
Registry64.LocalMachine.GetValue(sqlServerRegKey + @"Instance Names
\SQL",
 
"MSSQLSERVER");
    string sqlServerInstanceSetupRegKey = sqlServerRegKey +
sqlServerInstanceName + @"\Setup";
    return
Registry64.LocalMachine.GetValue(sqlServerInstanceSetupRegKey,
"SQLDataRoot");
}


I guess I don't mind if I don't run the tests for Rhino.Commons. I'll
see if I can remove that from the build script to get past it. Thanks,
Ayende.


Dan Lash


On Nov 11, 11:37 am, "Ayende Rahien" <[EMAIL PROTECTED]> wrote:
> I think that this is in the commons test config file, although it may even
> be hard coded in the tests somewhere
>
> On Tue, Nov 11, 2008 at 5:11 PM, Dan Lash <[EMAIL PROTECTED]> wrote:
>
> > I have never built the suite of tools before, so I may be missing
> > something. I am getting BUILD FAILED when it comes to running the
> > tests for Rhino.Commons. Any advice would be appreciated. Here's what
> > I did:
>
> > 1) I checked out the entire folder structure from svn
> > 2) Read the how to build.txt and created 2 databases
> >   a) I had to put them on a seperate server and name them differently
> > because of work policy
> > 3) Did a find-in-files for 'catalog=test' and edited all files to have
> > a correct connection string
> > 4) Ran SharedLobs\Tools\Nant\nant from the trunk directory
>
> > It works fine for a while then I get this error:
>
> >                        common.compile-dll:
>
> >                              [csc] Compiling 68 files to 'C:\Lash
> > \rhino-tools\trunk\build\net-3.5\debug\Rhino.Commons.Test.dll'.
> >                             [copy] Copying 1 file to 'C:\Lash\rhino-
> > tools\trunk\build\net-3.5\debug\Rhino.Commons.Test.dll.config'.
>
> >                        common.configure-tests:
>
> >                           [attrib] Setting file attributes for 1
> > files to Normal.
>
> > ***** THIS IS THE ERROR IN THE COMMAND LINE *****
> >                          [xmlpoke] No matching nodes were found with
> > XPath expression '/configuration/appSettings/[EMAIL PROTECTED]'tests.src']/
> > @value'.
> >                          [xmlpoke] No matching nodes were found with
> > XPath expression '/configuration/connectionStrings/[EMAIL PROTECTED]'test']/
> > @connectionString'.
>
> >                        common.run-tests:
>
> >                             [echo] Running tests in
> > 'Rhino.Commons.Test'
> >                             [exec] Parsed arguments:
> >                             [exec] -- Parsed Arguments
> >                             [exec] Files:
> >                             [exec]  Rhino.Commons.Test.dll
> >                             [exec] Assembly paths:
> >                             [exec] Report folder: C:\Lash\rhino-tools
> > \trunk\build\net-3.5\debug/test-results
> >                             [exec] Report Name Format:
> > Rhino.Commons.Test.dll-results
> >                             [exec] Report types:
> >                             [exec]  Html
> >                             [exec]  Xml
> >                             [exec] Show reports: False
> >                             [exec] Filter Category:
> >                             [exec] Exclude Category:
> >                             [exec] Filter Author:
> >                             [exec] Filter Namespace:
> >                             [exec] Filter Type:
> >                             [exec] Verbose: False
> >                             [exec] ShadowCopyFiles: False
> >                             [exec]
> >                             [exec] Start time: 9:48 AM
> >                             [exec] [info] Loading test assemblies
> >                             [exec] [info] Starting execution
> >                             [exec] [info] Sorting assemblies by
> > dependencies
> >                             [exec] [info] Setting up fixture colors
> >                             [exec] [info] Loading Rhino.Commons.Test
> >                             [exec] [info] Found  309 tests
> >                             [exec] [info] Running fixtures.
> >                             [exec] [info] Tests finished: 309 tests,
> > 303 success, 5 failures, 1 ignored
> >                             [exec] [info] All Tests finished: 309
> > tests, 303 success, 5 failures, 1 ignored in 32.984375 seconds
> >                             [exec] [info] Creating reports in C:\Lash
> > \rhino-tools\trunk\build\net-3.5\debug\test-results
> >                             [exec] [info] Created Html report C:\Lash
> > \rhino-tools\trunk\build\net-3.5\debug/test-results
> > \Rhino.Commons.Test.dll-results.html
> >                             [exec] [info] Created xml report C:\Lash
> > \rhino-tools\trunk\build\net-3.5\debug/test-results
> > \Rhino.Commons.Test.dll-results.xml
> >                             [exec] [info] MbUnit execution finished
> > in 37.953125s.
>
> >                        BUILD FAILED - 0 non-fatal error(s), 2
> > warning(s)
>
> > I opened the app.config in the Rhino.Commons.Test folder and found it
> > doesn't have a key called Test, not sure if that would matter:
>
> >    <connectionStrings>
> >        <add
> > name="Rhino.Commons.Test.Properties.Settings.TestDatabase"
> >            connectionString="Data Source=mssql;Initial
> > Catalog=DLash_Test;Integrated Security=True"
> >            providerName="System.Data.SqlClient" />
> >    </connectionStrings>
>
> > **** THIS IS ERROR IN THE REPORT *****
> > Console Error
> > Created another UnitOfWorkContext for: Framework: NHibernate;
> > DatabaseEngine: MsSql2005; DatabaseName: Test; RhinoContainerPath: C:
> > \Lash\rhino-tools\trunk\build\net-3.5\debug\ForTesting\Windsor-
> > NH.config
> > CurrentContext is: Framework: NHibernate; DatabaseEngine: MsSql2005;
> > DatabaseName: Test; RhinoContainerPath: C:\Lash\rhino-tools\trunk\build
> > \net-3.5\debug\ForTesting\Windsor-NH.config
>
> > It's interesting that it's looking for DatabaseName: Test even though
> > I changed that in all of the connection strings I could find. Maybe
> > that's the key name, or internal name though. I've tried looking the
> > different config files and build files and don't see anything that
> > seems immediately wrong.
>
> > TIA,
>
> > Dan Lash
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to