[108485] branches/gsoc13-tests/src/port1.0/tests/portclean.test
marius at macports.org
marius at macports.org
Wed Jul 24 03:42:41 PDT 2013
Revision: 108485
https://trac.macports.org/changeset/108485
Author: marius at macports.org
Date: 2013-07-24 03:42:41 -0700 (Wed, 24 Jul 2013)
Log Message:
-----------
portclean.test: added archive check
Modified Paths:
--------------
branches/gsoc13-tests/src/port1.0/tests/portclean.test
Modified: branches/gsoc13-tests/src/port1.0/tests/portclean.test
===================================================================
--- branches/gsoc13-tests/src/port1.0/tests/portclean.test 2013-07-24 10:13:01 UTC (rev 108484)
+++ branches/gsoc13-tests/src/port1.0/tests/portclean.test 2013-07-24 10:42:41 UTC (rev 108485)
@@ -8,6 +8,7 @@
mportinit
source ../portclean.tcl
+source ../port_autoconf.tcl
proc getportlogpath {id {portname ""}} {
global macports::portdbpath
@@ -115,6 +116,8 @@
test clean_work {
Clean work unit test.
} -body {
+ if {[getuid] != 0} {return "FAIL: not root, skipping test"}
+
set usealtworkpath no
set altprefix $pwd/prefix
set portpath portpath
@@ -157,6 +160,8 @@
test clean_logs {
Clean logs unit test.
} -body {
+ if {[getuid] != 0} {return "FAIL: not root, skipping test"}
+
set portpath $pwd/portpath
set logpath [getportlogpath $portpath]
set subport $logpath/subport
@@ -190,8 +195,10 @@
close [open $portdbpath/incoming/subport-1_0.0.0.0.TMP w+]
# create zip
- #close [open $pwd/+CONTENTS w+]
- #exec zip $portdbpath/incoming/subport-2_0.0.0.0.zip $pwd/+CONTENTS
+ set fd [open $pwd/+CONTENTS w+]
+ puts $fd "@portname subport"
+ close $fd
+ exec zip $portdbpath/incoming/subport-2_0.0.0.0.zip +CONTENTS
close stderr
portclean::clean_archive
@@ -203,12 +210,16 @@
if {![file exists $portdbpath/incoming/test.clean]} {
return "FAIL: removed unrelated file"
}
+ if {[file exists $portdbpath/incoming/subport-2_0.0.0.0.zip]} {
+ return "FAIL: zip archive not removed"
+ }
return "Clean archive successful."
} -cleanup {
+ file delete -force $pwd/+CONTENTS
file delete -force $portdbpath
- file delete -force $pwd/file2
+ file delete -force $pwd/file7
} -result "Clean archive successful."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130724/3b1c429e/attachment.html>
More information about the macports-changes
mailing list