Commit 52a035a4 authored by Jon Skeet's avatar Jon Skeet

A few tweaks

parent 87d6a3b8
...@@ -9,6 +9,7 @@ src/ProtoGen/obj/ ...@@ -9,6 +9,7 @@ src/ProtoGen/obj/
src/ProtoGen.Test/bin/ src/ProtoGen.Test/bin/
src/ProtoGen.Test/obj/ src/ProtoGen.Test/obj/
tmp/ tmp/
dist/
*.user *.user
*.suo *.suo
_ReSharper.* _ReSharper.*
......
...@@ -19,7 +19,12 @@ ...@@ -19,7 +19,12 @@
<property name="tools-protoc" <property name="tools-protoc"
value="${project::get-base-directory()}/lib/protoc.exe" value="${project::get-base-directory()}/lib/protoc.exe"
overwrite="false" /> overwrite="false" />
<!-- Output directory for copying generated binaries -->
<property name="output-dir"
value="${path::combine(project::get-base-directory(), 'dist')}"
overwrite="false" />
<!-- Base directory to find protos (core, C# options, tests) --> <!-- Base directory to find protos (core, C# options, tests) -->
<property name="protos-dir" <property name="protos-dir"
value="${path::combine(project::get-base-directory(), 'protos')}" value="${path::combine(project::get-base-directory(), 'protos')}"
...@@ -52,6 +57,7 @@ ...@@ -52,6 +57,7 @@
<include name="${src}/ProtocolBuffers.Test/bin/**" /> <include name="${src}/ProtocolBuffers.Test/bin/**" />
<include name="${src}/ProtocolBuffers.Test/obj/**" /> <include name="${src}/ProtocolBuffers.Test/obj/**" />
<include name="${tmp-dir}" /> <include name="${tmp-dir}" />
<include name="${output-dir}" />
</fileset> </fileset>
</delete> </delete>
</target> </target>
...@@ -103,14 +109,16 @@ ...@@ -103,14 +109,16 @@
</copy> </copy>
</target> </target>
<target name="build" description="Builds all C# code"> <target name="build"
description="Builds all C# code">
<msbuild project="${src}/ProtocolBuffers.sln"> <msbuild project="${src}/ProtocolBuffers.sln">
<property name="Configuration" <property name="Configuration"
value="${build-configuration}" /> value="${build-configuration}" />
</msbuild> </msbuild>
</target> </target>
<target name="test" description="Runs all unit tests"> <target name="test"
description="Runs all unit tests">
<nunit2> <nunit2>
<formatter type="Plain" /> <formatter type="Plain" />
<test assemblyname="${src}/ProtocolBuffers.Test/bin/${build-configuration}/Google.ProtocolBuffers.Test.dll" /> <test assemblyname="${src}/ProtocolBuffers.Test/bin/${build-configuration}/Google.ProtocolBuffers.Test.dll" />
...@@ -118,9 +126,24 @@ ...@@ -118,9 +126,24 @@
</nunit2> </nunit2>
</target> </target>
<target name="perf-test" description="Runs all performance tests"> <target name="perf-test"
description="Runs all performance tests">
<fail message="Performance tests not implemented yet" /> <fail message="Performance tests not implemented yet" />
</target> </target>
<target name="dist"
description="Copies compiled binaries into the output directory">
<delete dir="${output-dir}" />
<mkdir dir="${output-dir}" />
<copy todir="${output-dir}"
flatten="true">
<fileset basedir="${src}">
<include name="ProtocolBuffers/bin/${build-configuration}/Google.ProtocolBuffers.dll" />
<include name="ProtoGen/bin/${build-configuration}/ProtoGen.exe" />
</fileset>
</copy>
</target>
</project> </project>
...@@ -37,6 +37,7 @@ namespace Google.ProtocolBuffers { ...@@ -37,6 +37,7 @@ namespace Google.ProtocolBuffers {
while (ancestor != null) { while (ancestor != null) {
string candidate = Path.Combine(ancestor.FullName, "testdata"); string candidate = Path.Combine(ancestor.FullName, "testdata");
if (Directory.Exists(candidate)) { if (Directory.Exists(candidate)) {
testDataDirectory = candidate;
return candidate; return candidate;
} }
ancestor = ancestor.Parent; ancestor = ancestor.Parent;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment