I must say I’m quite impressed.
Today, I was watching a conversation on the TDD list about how “bugs” got into NUnit if it was built using TDD. Charlie Poole gave a great rebuttal, but one of his responses caught my attention:
>>>* NAnt build script failing under Linux due to use of
>>> backslash as a
>>> file separator.
>> That’s not a bug, it’s a build issue.Sure, and it would be better to catch it. The problem is, nobody actually builds NUnit under Linux until after we release it. There’s someone out there who could solve that problem for us. You know who you are. You know what to do. :-)
Well, heck, I love NUnit. I also run Linux. So I shot an email off to Charlie, and it turned out that no one was running builds of NUnit on Linux until after it was released. I offered to fill that role, and he suggested I grab the latest version and try to build it.
Build it? Surely it uses csc.exe
or at least NAnt
? And indeed, upon getting the source, it has a nunit.build. Undeterred, and knowing that they are running NUnit on Linux, I decided to give it a go with Mono.
First, I headed over to the Mono projects downloads page and found they had a universal installer. Gentoo had Mono in Portage, but it didn’t seem to be the latest version yet. I downloaded the installer, followed the Simple instructions, and whammo, had Mono on the system.
Feeling particularly good, I Googled for “NAnt Mono” and sure enough, came across an excellent reference on the Mono site. So I grabbed the latest NAnt source tarball, ran make
and make install
, and noticed that suddenly I could type in nant -help
and, sure enough, had the NAnt help screen.
Feeling inspired by the Olympics streaming from the TV in the living room, I decided to go for gold. I changed over to the NUnit src directory, and ran NAnt. And it died. It was having problems with mcs
, the mono C# compiler. Actually, it couldn’t find it. Luckily the error was enough to make me realize that somewhere there was a symbolic link reference to it that was being used by bash, and sure enough, in my ~/.bashrc file I had a reference to the mono-1.1.6 bin directory as I had deleted it (and not uninstalled it). Cleaning that up, I reran the NUnit build with:
foyc@dilbert ~/apps/nunit/2.3.6050/build/mono/1.0/release $ ~/apps/nant/bin/nant mono-1.0 release build test
And it worked.
Well, some of the tests failed. But, I had a build/mono/1.0/release directory that contained (among others) nunit-console.exe. And running it nunit-console nunit-console.tests.dll
worked.
So, I must say that I am quite impressed. Even the MonoDevelop IDE seemed like a decent IDE (though I didn’t spend much time with it). And I think I’ll be playing with it some more.
Great job Mono, NAnt and NUnit teams, and all the developers that work to make this possible.