buildall.sh 1.6 KB

123456789101112131415161718192021222324252627282930313233343536
  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. rm -rf bin
  10. mkdir bin
  11. # Running the unit tests requires the dependencies are
  12. # in the bin directory too
  13. cp -f $LIB/{Rhino.Mocks.dll,nunit.framework.dll} bin
  14. echo Building main library
  15. gmcs -target:library -out:bin/Google.ProtocolBuffers.dll `find $SRC/ProtocolBuffers -name '*.cs'` -keyfile:$SRC/ProtocolBuffers/Properties/Google.ProtocolBuffers.snk
  16. echo Building main library tests
  17. gmcs -target:library -out:bin/Google.ProtocolBuffers.Test.dll `find $SRC/ProtocolBuffers.Test -name '*.cs'` -keyfile:$SRC/ProtocolBuffers.Test/Properties/Google.ProtocolBuffers.Test.snk -r:bin/Google.ProtocolBuffers.dll -r:$LIB/nunit.framework.dll -r:$LIB/Rhino.Mocks.dll
  18. echo Running main library tests
  19. mono $NUNIT bin/Google.ProtocolBuffers.Test.dll $NUNIT_OPTIONS
  20. echo Building ProtoGen
  21. gmcs -target:exe -out:bin/ProtoGen.exe `find $SRC/ProtoGen -name '*.cs'` -keyfile:$SRC/ProtoGen/Properties/Google.ProtocolBuffers.ProtoGen.snk -r:bin/Google.ProtocolBuffers.dll
  22. echo Building ProtoGen tests
  23. gmcs -target:library -out:bin/Google.ProtocolBuffers.ProtoGen.Test.dll `find $SRC/ProtoGen.Test -name '*.cs'` -keyfile:$SRC/ProtoGen.Test/Properties/Google.ProtocolBuffers.ProtoGen.Test.snk -r:bin/Google.ProtocolBuffers.dll -r:$LIB/nunit.framework.dll -r:bin/ProtoGen.exe
  24. echo Running ProtoGen tests
  25. mono $NUNIT bin/Google.ProtocolBuffers.ProtoGen.Test.dll $NUNIT_OPTIONS