<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[120187] trunk/base</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/120187">120187</a></dd>
<dt>Author</dt> <dd>jmr@macports.org</dd>
<dt>Date</dt> <dd>2014-05-18 17:29:11 -0700 (Sun, 18 May 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>autoconf runusr value into trace mode test, add darwin constraint to _is_valid_developer_dir test</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkbaseconfigure">trunk/base/configure</a></li>
<li><a href="#trunkbaseconfigureac">trunk/base/configure.ac</a></li>
<li><a href="#trunkbasesrcmacports10macports_test_autoconftclin">trunk/base/src/macports1.0/macports_test_autoconf.tcl.in</a></li>
<li><a href="#trunkbasesrcmacports10testsmacportstest">trunk/base/src/macports1.0/tests/macports.test</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkbaseteststesttracetesttclin">trunk/base/tests/test/trace/test.tcl.in</a></li>
</ul>

<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkbaseteststesttracetesttcl">trunk/base/tests/test/trace/test.tcl</a></li>
</ul>

<h3>Property Changed</h3>
<ul>
<li><a href="#trunkbaseteststesttrace">trunk/base/tests/test/trace/</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkbaseconfigure"></a>
<div class="modfile"><h4>Modified: trunk/base/configure (120186 => 120187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/configure        2014-05-19 00:05:16 UTC (rev 120186)
+++ trunk/base/configure        2014-05-19 00:29:11 UTC (rev 120187)
</span><span class="lines">@@ -11386,7 +11386,7 @@
</span><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> # Output
</span><del>-ac_config_files=&quot;$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/Makefile doc/base.mtree doc/macosx.mtree doc/macports.conf doc/prefix.mtree doc/pubkeys.conf portmgr/freebsd/Makefile portmgr/dmg/postflight setupenv.bash src/Makefile src/cregistry/Makefile src/darwintracelib1.0/Makefile src/machista1.0/Makefile src/macports1.0/Makefile src/macports1.0/macports_autoconf.tcl src/macports1.0/macports_test_autoconf.tcl src/package1.0/Makefile src/package1.0/package_test_autoconf.tcl src/pextlib1.0/Makefile src/port/Makefile src/port1.0/Makefile src/port1.0/port_autoconf.tcl src/port1.0/port_test_autoconf.tcl src/programs/Makefile src/registry2.0/Makefile src/registry2.0/registry_autoconf.tcl tests/Makefile tests/test.tcl tests/test/library.tcl vendor/Makefile&quot;
</del><ins>+ac_config_files=&quot;$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/Makefile doc/base.mtree doc/macosx.mtree doc/macports.conf doc/prefix.mtree doc/pubkeys.conf portmgr/freebsd/Makefile portmgr/dmg/postflight setupenv.bash src/Makefile src/cregistry/Makefile src/darwintracelib1.0/Makefile src/machista1.0/Makefile src/macports1.0/Makefile src/macports1.0/macports_autoconf.tcl src/macports1.0/macports_test_autoconf.tcl src/package1.0/Makefile src/package1.0/package_test_autoconf.tcl src/pextlib1.0/Makefile src/port/Makefile src/port1.0/Makefile src/port1.0/port_autoconf.tcl src/port1.0/port_test_autoconf.tcl src/programs/Makefile src/registry2.0/Makefile src/registry2.0/registry_autoconf.tcl tests/Makefile tests/test.tcl tests/test/library.tcl tests/test/trace/test.tcl vendor/Makefile&quot;
</ins><span class="cx"> 
</span><span class="cx"> 
</span><span class="cx"> ac_config_files=&quot;$ac_config_files src/dedup_portfiles.tcl&quot;
</span><span class="lines">@@ -12122,6 +12122,7 @@
</span><span class="cx">     &quot;tests/Makefile&quot;) CONFIG_FILES=&quot;$CONFIG_FILES tests/Makefile&quot; ;;
</span><span class="cx">     &quot;tests/test.tcl&quot;) CONFIG_FILES=&quot;$CONFIG_FILES tests/test.tcl&quot; ;;
</span><span class="cx">     &quot;tests/test/library.tcl&quot;) CONFIG_FILES=&quot;$CONFIG_FILES tests/test/library.tcl&quot; ;;
</span><ins>+    &quot;tests/test/trace/test.tcl&quot;) CONFIG_FILES=&quot;$CONFIG_FILES tests/test/trace/test.tcl&quot; ;;
</ins><span class="cx">     &quot;vendor/Makefile&quot;) CONFIG_FILES=&quot;$CONFIG_FILES vendor/Makefile&quot; ;;
</span><span class="cx">     &quot;src/dedup_portfiles.tcl&quot;) CONFIG_FILES=&quot;$CONFIG_FILES src/dedup_portfiles.tcl&quot; ;;
</span><span class="cx">     &quot;src/images_to_archives.tcl&quot;) CONFIG_FILES=&quot;$CONFIG_FILES src/images_to_archives.tcl&quot; ;;
</span></span></pre></div>
<a id="trunkbaseconfigureac"></a>
<div class="modfile"><h4>Modified: trunk/base/configure.ac (120186 => 120187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/configure.ac        2014-05-19 00:05:16 UTC (rev 120186)
+++ trunk/base/configure.ac        2014-05-19 00:29:11 UTC (rev 120187)
</span><span class="lines">@@ -430,6 +430,7 @@
</span><span class="cx">         tests/Makefile
</span><span class="cx">         tests/test.tcl
</span><span class="cx">         tests/test/library.tcl
</span><ins>+        tests/test/trace/test.tcl
</ins><span class="cx">         vendor/Makefile
</span><span class="cx"> ])
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkbasesrcmacports10macports_test_autoconftclin"></a>
<div class="modfile"><h4>Modified: trunk/base/src/macports1.0/macports_test_autoconf.tcl.in (120186 => 120187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/macports1.0/macports_test_autoconf.tcl.in        2014-05-19 00:05:16 UTC (rev 120186)
+++ trunk/base/src/macports1.0/macports_test_autoconf.tcl.in        2014-05-19 00:29:11 UTC (rev 120187)
</span><span class="lines">@@ -33,4 +33,5 @@
</span><span class="cx"> 
</span><span class="cx"> namespace eval macports::autoconf {
</span><span class="cx">     variable prefix &quot;@prefix@&quot;
</span><ins>+    variable os_platform &quot;@OS_PLATFORM@&quot;
</ins><span class="cx"> }
</span></span></pre></div>
<a id="trunkbasesrcmacports10testsmacportstest"></a>
<div class="modfile"><h4>Modified: trunk/base/src/macports1.0/tests/macports.test (120186 => 120187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/src/macports1.0/tests/macports.test        2014-05-19 00:05:16 UTC (rev 120186)
+++ trunk/base/src/macports1.0/tests/macports.test        2014-05-19 00:29:11 UTC (rev 120187)
</span><span class="lines">@@ -7,6 +7,10 @@
</span><span class="cx"> set pwd [file dirname [file normalize $argv0]]
</span><span class="cx"> 
</span><span class="cx"> source ../macports_test_autoconf.tcl
</span><ins>+
+# constraint for darwin platform
+testConstraint darwin [expr {$macports::autoconf::os_platform eq &quot;darwin&quot;}]
+
</ins><span class="cx"> package require macports 1.0
</span><span class="cx"> 
</span><span class="cx"> # clean leftovers from interrupted tests
</span><span class="lines">@@ -420,8 +424,9 @@
</span><span class="cx"> 
</span><span class="cx"> test _is_valid_developer_dir {
</span><span class="cx">     Check valid dev dir unit test.
</span><ins>+} -constraints {
+    darwin
</ins><span class="cx"> } -body {
</span><del>-    set macports::set_developer /Applications/Xcode.app/Contents/Developer
</del><span class="cx">     if {[macports::_is_valid_developer_dir $macports::developer_dir] != 1} {
</span><span class="cx">        return &quot;FAIL: valid dir not detected&quot;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkbaseteststesttrace"></a>
<div class="propset"><h4>Property changes: trunk/base/tests/test/trace</h4>
<pre class="diff"><span>
</span></pre></div>
<a id="svnignore"></a>
<div class="modfile"><h4>Modified: svn:ignore</h4></div>
<span class="cx">   + output
</span><span class="cx">test.tcl
</span><a id="trunkbaseteststesttracetesttcl"></a>
<div class="delfile"><h4>Deleted: trunk/base/tests/test/trace/test.tcl (120186 => 120187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/tests/test/trace/test.tcl        2014-05-19 00:05:16 UTC (rev 120186)
+++ trunk/base/tests/test/trace/test.tcl        2014-05-19 00:29:11 UTC (rev 120187)
</span><span class="lines">@@ -1,71 +0,0 @@
</span><del>-package require tcltest 2
-
-# need pextlib to drop privs
-package require Pextlib 1.0
-
-namespace import tcltest::*
-
-source [file dirname $argv0]/../library.tcl
-
-makeFile &quot;&quot; $output_file
-makeDirectory $work_dir
-set path [file dirname [file normalize $argv0]]
-
-load_variables $path
-
-proc test_trace {} {
-    global path autoconf output_file
-
-    set line [get_line $autoconf &quot;runusr*&quot;]
-    set user [lrange [split $line &quot; &quot;] 1 1]
-
-    set_dir
-    port_index
-    port_clean $path
-
-    file delete -force /tmp/hello-trace
-    file delete -force /tmp/link-trace2
-    file link -symbolic /tmp/link-trace2 /usr/include/unistd.h
-
-    makeDirectory ../tracetesttmp
-    if {[getuid] == 0} {
-        file attributes ../tracetesttmp -owner $user
-        exec chown -h $user /tmp/link-trace2
-    }
-
-    if {[getuid] == 0} {
-        seteuid [name_to_uid $user]
-    }
-    exec touch  ../tracetesttmp/delete-trace
-    exec touch ../tracetesttmp/rename-trace
-    exec mkdir ../tracetesttmp/rmdir-trace
-    if {[getuid] == 0} {
-        seteuid 0
-    }
-
-    port_trace $path
-
-    file delete -force /tmp/link-trace2
-    file delete -force /tmp/hello-trace
-
-    set err &quot;error*&quot;
-    set line [get_line $path/$output_file $err]
-    set unsupported [get_line $path/$output_file &quot;*tracelib not supported on this platform*&quot;]
-    if {$unsupported != -1 || $line == -1} {
-        return &quot;No errors found.&quot;
-    } else {
-        return $line
-    }
-}
-
-test trace {
-    Regression test for trace.
-} -constraints {
-    tracemode_support
-} -body {
-    test_trace
-} -result &quot;No errors found.&quot;
-
-
-cleanup
-cleanupTests
</del></span></pre></div>
<a id="trunkbaseteststesttracetesttclinfromrev120186trunkbaseteststesttracetesttcl"></a>
<div class="copfile"><h4>Copied: trunk/base/tests/test/trace/test.tcl.in (from rev 120186, trunk/base/tests/test/trace/test.tcl) (0 => 120187)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/base/tests/test/trace/test.tcl.in                                (rev 0)
+++ trunk/base/tests/test/trace/test.tcl.in        2014-05-19 00:29:11 UTC (rev 120187)
</span><span class="lines">@@ -0,0 +1,70 @@
</span><ins>+package require tcltest 2
+
+# need pextlib to drop privs
+package require Pextlib 1.0
+
+namespace import tcltest::*
+
+source [file dirname $argv0]/../library.tcl
+
+makeFile &quot;&quot; $output_file
+makeDirectory $work_dir
+set path [file dirname [file normalize $argv0]]
+
+load_variables $path
+
+proc test_trace {} {
+    global path output_file
+
+    set user &quot;@RUNUSR@&quot;
+
+    set_dir
+    port_index
+    port_clean $path
+
+    file delete -force /tmp/hello-trace
+    file delete -force /tmp/link-trace2
+    file link -symbolic /tmp/link-trace2 /usr/include/unistd.h
+
+    makeDirectory ../tracetesttmp
+    if {[getuid] == 0} {
+        file attributes ../tracetesttmp -owner $user
+        exec chown -h $user /tmp/link-trace2
+    }
+
+    if {[getuid] == 0} {
+        seteuid [name_to_uid $user]
+    }
+    exec touch  ../tracetesttmp/delete-trace
+    exec touch ../tracetesttmp/rename-trace
+    exec mkdir ../tracetesttmp/rmdir-trace
+    if {[getuid] == 0} {
+        seteuid 0
+    }
+
+    port_trace $path
+
+    file delete -force /tmp/link-trace2
+    file delete -force /tmp/hello-trace
+
+    set err &quot;error*&quot;
+    set line [get_line $path/$output_file $err]
+    set unsupported [get_line $path/$output_file &quot;*tracelib not supported on this platform*&quot;]
+    if {$unsupported != -1 || $line == -1} {
+        return &quot;No errors found.&quot;
+    } else {
+        return $line
+    }
+}
+
+test trace {
+    Regression test for trace.
+} -constraints {
+    tracemode_support
+} -body {
+    test_trace
+} -result &quot;No errors found.&quot;
+
+
+cleanup
+cleanupTests
</ins></span></pre>
</div>
</div>

</body>
</html>