[107711] branches/gsoc13-tests/tests/test/library.tcl

marius at macports.org marius at macports.org
Thu Jul 4 08:28:06 PDT 2013


Revision: 107711
          https://trac.macports.org/changeset/107711
Author:   marius at macports.org
Date:     2013-07-04 08:28:06 -0700 (Thu, 04 Jul 2013)
Log Message:
-----------
Added initial_setup proc to library.

Modified Paths:
--------------
    branches/gsoc13-tests/tests/test/library.tcl

Modified: branches/gsoc13-tests/tests/test/library.tcl
===================================================================
--- branches/gsoc13-tests/tests/test/library.tcl	2013-07-04 15:25:20 UTC (rev 107710)
+++ branches/gsoc13-tests/tests/test/library.tcl	2013-07-04 15:28:06 UTC (rev 107711)
@@ -2,6 +2,9 @@
 
 eval ::tcltest::configure $::argv
 
+set output_file "output"
+set work_dir "work"
+
 # Set of procs used for testing.
 
 # Sets $bindir variable from macports.autoconf.mk
@@ -18,7 +21,7 @@
         exit 1
     }
 
-    set cpwd [file join {*}[lrange [file split $pwd] 0 end-2]]/
+    set cpwd [eval file join {*}[lrange [file split $pwd] 0 end-2]]/
 
     set line [get_line $autoconf "prefix*"]
     set prefix [lrange [split $line " "] 1 1]
@@ -152,3 +155,21 @@
     }
     return -1
 }
+
+# This proc contains all the steps necesary
+# to install a port and save the output to a file.
+# Needed for the majority of regression tests.
+proc initial_setup {} {
+    global output_file
+    global work_dir
+    global path
+
+    makeFile "" $output_file
+    makeDirectory $work_dir
+
+    load_variables $path
+    set_dir
+    port_index
+    port_clean $path
+    port_run $path
+}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130704/86e1b384/attachment-0001.html>


More information about the macports-changes mailing list