Author: gert
Date: 2008-01-12 08:55:23 -0500 (Sat, 12 Jan 2008)
New Revision: 92731
Added:
trunk/gert/standalone/bug349680/
trunk/gert/standalone/bug349680/default.build
trunk/gert/standalone/bug349680/test.cs
Log:
Added test for bug #349680.
Added: trunk/gert/standalone/bug349680/default.build
===================================================================
--- trunk/gert/standalone/bug349680/default.build 2008-01-12 13:55:03 UTC
(rev 92730)
+++ trunk/gert/standalone/bug349680/default.build 2008-01-12 13:55:23 UTC
(rev 92731)
@@ -0,0 +1,45 @@
+<project name="bug349680" default="rebuild">
+ <include buildfile="../../build/common.build" />
+
+ <property name="frameworks" value="mono-1.0,mono-2.0,net-1.1,net-2.0" />
+
+ <target name="clean">
+ <delete>
+ <fileset>
+ <include name="out" />
+ <include name="test.exe" />
+ </fileset>
+ </delete>
+ </target>
+
+ <target name="compile" depends="init">
+ <csc target="exe" define="${csc.defines}" output="test.exe"
warnaserror="true" warninglevel="4">
+ <sources>
+ <include name="test.cs" />
+ </sources>
+ </csc>
+ </target>
+
+ <target name="run-test" depends="compile">
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ <exec program="test.exe" managed="true" output="out" />
+ <fail if="${file::exists('out')}" />
+ </target>
+</project>
Property changes on: trunk/gert/standalone/bug349680/default.build
___________________________________________________________________
Name: svn:eol-style
+ native
Added: trunk/gert/standalone/bug349680/test.cs
===================================================================
--- trunk/gert/standalone/bug349680/test.cs 2008-01-12 13:55:03 UTC (rev
92730)
+++ trunk/gert/standalone/bug349680/test.cs 2008-01-12 13:55:23 UTC (rev
92731)
@@ -0,0 +1,25 @@
+using System.Diagnostics;
+using System.Threading;
+
+class Program
+{
+ public Program ()
+ {
+ Thread.Sleep (1000);
+ }
+
+ static void Main ()
+ {
+ // allow only one instance of the process
+ Mutex onlyOne = new Mutex (true, Process.GetCurrentProcess
().ProcessName);
+
+ if (onlyOne.WaitOne (0, false)) {
+ try {
+ new Program ();
+ } finally {
+ onlyOne.Close ();
+ onlyOne = null;
+ }
+ }
+ }
+}
Property changes on: trunk/gert/standalone/bug349680/test.cs
___________________________________________________________________
Name: svn:eol-style
+ native
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches