buildall.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/bin/bash
  2. # Adjust these to reflect the location of NUnit in your system,
  3. # and how you want NUnit to run
  4. NUNIT=~/protobuf/NUnit-2.5.0.9122/bin/net-2.0/nunit-console.exe
  5. NUNIT_OPTIONS=-noshadow
  6. # The rest should be okay.
  7. SRC=../src
  8. LIB=../lib
  9. KEYFILE=../keys/Google.ProtocolBuffers.snk
  10. rm -rf bin
  11. mkdir bin
  12. # Running the unit tests requires the dependencies are
  13. # in the bin directory too
  14. cp -f $LIB/{Rhino.Mocks.dll,nunit.framework.dll} bin
  15. echo Building main library
  16. gmcs -target:library -out:bin/Google.ProtocolBuffers.dll `find $SRC/ProtocolBuffers -name '*.cs'` -keyfile:$KEYFILE
  17. echo Building main library tests
  18. gmcs -target:library -out:bin/Google.ProtocolBuffers.Test.dll `find $SRC/ProtocolBuffers.Test -name '*.cs'` -keyfile:$KEYFILE -r:bin/Google.ProtocolBuffers.dll -r:$LIB/nunit.framework.dll -r:$LIB/Rhino.Mocks.dll
  19. echo Running main library tests
  20. mono $NUNIT bin/Google.ProtocolBuffers.Test.dll $NUNIT_OPTIONS
  21. echo Building ProtoGen
  22. gmcs -target:exe -out:bin/ProtoGen.exe `find $SRC/ProtoGen -name '*.cs'` -keyfile:$KEYFILE -r:bin/Google.ProtocolBuffers.dll
  23. echo Building ProtoGen tests
  24. gmcs -target:library -out:bin/Google.ProtocolBuffers.ProtoGen.Test.dll `find $SRC/ProtoGen.Test -name '*.cs'` -keyfile:$KEYFILE -r:bin/Google.ProtocolBuffers.dll -r:$LIB/nunit.framework.dll -r:bin/ProtoGen.exe
  25. echo Running ProtoGen tests
  26. mono $NUNIT bin/Google.ProtocolBuffers.ProtoGen.Test.dll $NUNIT_OPTIONS