[111302] branches/gsoc13-tests/src/package1.0/tests/portpkg.test

marius at macports.org marius at macports.org
Wed Sep 18 12:58:33 PDT 2013


Revision: 111302
          https://trac.macports.org/changeset/111302
Author:   marius at macports.org
Date:     2013-09-18 12:58:33 -0700 (Wed, 18 Sep 2013)
Log Message:
-----------
package1.0: fixed portpkg test

Modified Paths:
--------------
    branches/gsoc13-tests/src/package1.0/tests/portpkg.test

Modified: branches/gsoc13-tests/src/package1.0/tests/portpkg.test
===================================================================
--- branches/gsoc13-tests/src/package1.0/tests/portpkg.test	2013-09-18 19:10:46 UTC (rev 111301)
+++ branches/gsoc13-tests/src/package1.0/tests/portpkg.test	2013-09-18 19:58:33 UTC (rev 111302)
@@ -22,6 +22,8 @@
 
 test pkg_main {
     Port pkg main unit test.
+} -constraints {
+	root
 } -setup {
     global os.platform os.major os.arch epoch destpath package.destpath configure.build_arch
     global subport version revision package.flat maintainers description categories
@@ -35,38 +37,25 @@
     set packages_dir $destpath/fondu-1_060102_1.mpkg/Contents/Packages
     set res_dir $destpath/fondu-1_060102_1.mpkg/Contents/Resources
 
+	set mport [mportopen file://.]
+    set workername [ditem_key $mport workername]
+
 } -body {
-    if {[portmpkg::mpkg_main] != 0} {
-	return "FAIL: cannot create pkg"
+    if {[$workername eval eval_targets pkg] != 0} {
+		return "FAIL: cannot create pkg"
     }
-    if {![file exists $contents_dir/PkgInfo]} {
-	return "FAIL: missing PkgInfo file"
-    }
-    if {![file exists $contents_dir/Info.plist]} {
-	return "FAIL: missing Info.plist file"
-    }
 
-    if {![file exists $res_dir]} {
-	return "FAIL: missing Resources dir"
+    if {![file exists $pwd/work/fondu-060102_1.pkg]} {
+		return "FAIL: missing pkg file"
     }
-    if {![file exists $res_dir/Description.plist]} {
-	return "FAIL: missing Description.plist file"
-    }
-    if {![file exists $res_dir/Welcome.html]} {
-	return "FAIL: missing Welcome.html file"
-    }
-    if {![file exists $res_dir/background.tiff]} {
-	return "FAIL: missing background.tiff file"
-    }
 
-    if {![file exists $packages_dir/fondu-1_060102_1.pkg]} {
-	return "FAIL: missing pkg file"
-    }
     return "Package pkg successful."
 
 } -cleanup {
+	mportclose $mport
     file delete -force $destpath
-
+	file delete -force $pwd/work
+	
 } -result "Package pkg successful."
 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130918/83e205ab/attachment.html>


More information about the macports-changes mailing list