You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by br...@apache.org on 2010/05/29 01:35:56 UTC

svn commit: r949320 - /ant/sandbox/antlibs/vss/src/etc/testcases/msvss.xml

Author: bruce
Date: Fri May 28 23:35:56 2010
New Revision: 949320

URL: http://svn.apache.org/viewvc?rev=949320&view=rev
Log:
create-tempfile macro, change add to use it (no more marking the build file readonly)

Modified:
    ant/sandbox/antlibs/vss/src/etc/testcases/msvss.xml

Modified: ant/sandbox/antlibs/vss/src/etc/testcases/msvss.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/vss/src/etc/testcases/msvss.xml?rev=949320&r1=949319&r2=949320&view=diff
==============================================================================
--- ant/sandbox/antlibs/vss/src/etc/testcases/msvss.xml (original)
+++ ant/sandbox/antlibs/vss/src/etc/testcases/msvss.xml Fri May 28 23:35:56 2010
@@ -50,6 +50,18 @@
     />
   </presetdef>
 
+  <macrodef name="create-tempfile">
+    <attribute name="property" />
+    <attribute name="directory" default="${testing-dir}" />
+    <attribute name="message" default="Testing VSS"/>
+    <sequential>
+      <mkdir dir="@{directory}" />
+      <tempfile property="@{property}" destdir="@{directory}"
+          suffix=".java" />
+      <echo file="${@{property}}" message="// @{message}" />
+    </sequential>
+  </macrodef>
+
   <target name="setup" depends="find-ss-server-dir, find-ss-dir">
     <fail unless="vss-ss-dir">Could not find ss.exe.
         Add to Path environment variable
@@ -62,6 +74,9 @@
     <sscreate
       vsspath="$/${vss-project}"
     />
+    <sscp
+      vsspath="$/${vss-project}"
+    />
   </target>
 
   <target name="find-ss-server-dir" unless="vss-server-dir">
@@ -89,23 +104,19 @@
         value="C:\Program Files (x86)\Microsoft Visual Sourcesafe\ss.exe"/>
   </target>
 
+
   <target name="test-all" depends="setup, test-add, test-move,
       test-cloak, test-delete-recover, test-locate, test-status"
       description="Test all VSS tasks other than destroy (use cleanup for that)"
   />
 
   <target name="test-add" depends="setup">
-
-    <sscp
-      vsspath="$/${vss-project}"
-    />
-
+    <create-tempfile property="vss-temp-file" message="Testing Add for VSS" />
     <ssadd
       vsspath="$/${vss-project}"
-      localpath="${testcase-dir}/msvss.xml"
-      comment="adding antlib file to vss"
+      localpath="${vss-temp-file}"
+      comment="Testing Add for VSS"
     />
-
   </target>
 
   <target name="test-move" depends="setup">
@@ -192,5 +203,6 @@
       ssdir="${vss-ss-dir}"
       serverPath="${vss-server-dir}"
     />
+    <delete dir="${testing-dir}" />
   </target>
 </project>
\ No newline at end of file