<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch master
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/3553ba8bf626d91410c467fe70487c9e950c77fe">https://github.com/macports/macports-base/commit/3553ba8bf626d91410c467fe70487c9e950c77fe</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 3553ba8bf macports.test: fix log tests
</span>3553ba8bf is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 3553ba8bf626d91410c467fe70487c9e950c77fe
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Sun Jun 16 22:07:20 2024 +1000
<span style='display:block; white-space:pre;color:#404040;'> macports.test: fix log tests
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: https://trac.macports.org/ticket/70222
</span>---
src/macports1.0/tests/macports.test | 24 ++++++++++--------------
1 file changed, 10 insertions(+), 14 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/macports1.0/tests/macports.test b/src/macports1.0/tests/macports.test
</span><span style='display:block; white-space:pre;color:#808080;'>index 509c0e49c..90832d330 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/macports1.0/tests/macports.test
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/macports1.0/tests/macports.test
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -169,14 +169,12 @@ test push_log {
</span> root
} -setup {
set mport [mportopen file://${pwd}]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::logenabled
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set logenabled 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports::logenabled 1
</span> } -body {
if {[catch {macports::push_log $mport}] != 0} {
return "FAIL: cannot push log"
}
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::logstack macports::debuglog macports::debuglogname
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- if {[lindex $logstack 0] ne [list $debuglog $debuglogname]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[lindex $macports::logstack 0] ne [list $macports::debuglog $macports::debuglogname]} {
</span> return "FAIL: incorrect logstack"
}
return "Push log successful."
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -188,28 +186,26 @@ test push_log {
</span> test pop_log {
Pop log unit test.
} -setup {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global macports::logenabled macports::logstack macports::debuglog
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set logenabled 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports::logenabled 1
</span> set stacklog [open $pwd/logstack w+]
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set logstack [list [list $stacklog $pwd/logstack]]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set debuglog [open $pwd/log w+]
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- set orig_debuglog $debuglog
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports::logstack [list [list $stacklog $pwd/logstack]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports::debuglogname $pwd/logstack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set macports::debuglog $stacklog
</span> set mport [mportopen file://${pwd}]
if {[catch {macports::push_log $mport}] != 0} {
return "FAIL: cannot push log"
}
} -body {
macports::pop_log
<span style='display:block; white-space:pre;background:#ffe0e0;'>- if {$debuglog ne $orig_debuglog} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {$macports::debuglog ne $stacklog} {
</span> return "FAIL: cannot pop log"
}
return "Pop log successful."
} -cleanup {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- close $debuglog
</span> close $stacklog
<span style='display:block; white-space:pre;background:#ffe0e0;'>- unset logenabled
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- unset logstack
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- unset debuglog
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset macports::logenabled
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset macports::logstack
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unset macports::debuglog
</span> mportclose $mport
file delete -force $pwd/log
file delete -force $pwd/logstack
</pre><pre style='margin:0'>
</pre>