Skip to content

Instantly share code, notes, and snippets.

@drusellers
Created December 30, 2010 05:27
Show Gist options
  • Save drusellers/759500 to your computer and use it in GitHub Desktop.
Save drusellers/759500 to your computer and use it in GitHub Desktop.
nixon: a simple script to build and test code in mono
#!/bin/bash
NAME=`basename $(pwd)`
CORE=./bin/$NAME.dll
TEST=./bin/$NAME.specs.dll
find lib -name '*.dll' > refs
ref=`paste -sd, refs`
rm refs
dmcs ./src/*.cs -out:$CORE -target:library -r:$ref
#now build the tests
xunit=./tools/xunit-1/xunit.dll
dmcs ./tests/*.cs -out:$TEST -target:library -r:$ref,$CORE,$xunit
find ./lib/ -iname '*.dll' -exec cp \{\} bin/ \;
cp ./tools/xunit-1/xunit.dll ./bin
#now run the tests
mono ./tools/xunit-1/xunit.console.exe $TEST ./tools/xunit-1/xunit.console.exe.config /silent /html bob.html
@phatboyg
Copy link

I applaud your mad skillz.

Of course, if the folders is /tests/, why not just make the test binary basename.tests.dll instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment