<pre style='margin:0'>
Joshua Root (jmroot) pushed a commit to branch release-2.4
in repository macports-base.
</pre>
<p><a href="https://github.com/macports/macports-base/commit/34c16b3106af5dda87b3e8971e9b8f0ca18df1d6">https://github.com/macports/macports-base/commit/34c16b3106af5dda87b3e8971e9b8f0ca18df1d6</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 34c16b3106af5dda87b3e8971e9b8f0ca18df1d6
</span>Author: Joshua Root <jmr@macports.org>
AuthorDate: Thu Feb 16 12:11:02 2017 +1100
<span style='display:block; white-space:pre;color:#404040;'> Fix portmpkg.test
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Work without being able to sync the user's ports tree.
</span><span style='display:block; white-space:pre;color:#404040;'> Mock getportresourcepath.
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit 90893e53ac75cf01279624b6308ab4e3a8779c17)
</span><span style='display:block; white-space:pre;color:#404040;'> (cherry picked from commit c340033f632ce5a3d821a6a383c47ffffd8e4972)
</span>---
src/package1.0/Makefile.in | 1 -
src/package1.0/tests/library.tcl | 27 +++++++++++++++++----------
src/package1.0/tests/portmpkg.test | 23 +++++++++++++++--------
3 files changed, 32 insertions(+), 19 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/package1.0/Makefile.in b/src/package1.0/Makefile.in
</span><span style='display:block; white-space:pre;color:#808080;'>index 4eec1b1..7ae2503 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/package1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/package1.0/Makefile.in
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -22,7 +22,6 @@ distclean:: clean
</span> rm -f Makefile
test::
<span style='display:block; white-space:pre;background:#ffe0e0;'>- -$(prefix)/bin/port sync
</span> $(TCLSH) $(srcdir)/../tests/test.tcl -nocolor
install:: all
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/package1.0/tests/library.tcl b/src/package1.0/tests/library.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index b07d480..6ffb6e3 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/package1.0/tests/library.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/package1.0/tests/library.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -1,34 +1,41 @@
</span> proc env_init {} {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global os.platform os.major os.arch epoch destpath package.destpath configure.build_arch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global subport version revision package.flat maintainers description categories
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global supported_archs porturl workpath distname license filespath portpath pwd
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global name
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global os.platform os.major os.arch epoch destpath package.destpath build_arch configure.build_arch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ subport version revision package.flat maintainers description categories homepage \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ supported_archs porturl workpath distname license filespath portpath pwd name
</span>
set os.platform darwin
set os.major 9
set os.arch i386
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set epoch 1
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set epoch 0
</span>
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set workpath $pwd/work
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set workpath $pwd/work
</span> set destpath $pwd/pkg
set portpath $pwd
set portdbpath $pwd/dbpath
set filespath $pwd/files
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set configure.build_arch build_arch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set build_arch i386
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set configure.build_arch $build_arch
</span> set package.destpath $pwd/pkg
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set name fondu
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set name fondu
</span> set subport fondu
set version 060102
set distname fondu_src-060102
set revision 1
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set license MIT
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set license BSD
</span> set package.flat no
set maintainers {test@macports.org}
set description test.description
set categories test
set supported_archs noarch
<span style='display:block; white-space:pre;background:#ffe0e0;'>- set porturl "http://fondu.sourceforge.net/"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set homepage "http://fondu.sourceforge.net/"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set porturl "file://${pwd}"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # mock mport_lookup, it normally needs a PortIndex
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ proc mport_lookup {portname} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global porturl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [list $portname [list variants universal portdir print/${portname} description {A set of programs to interconvert between Mac font formats and pfb, ttf, otf and bdf files on UNIX.} homepage http://fondu.sourceforge.net/ epoch 0 platforms darwin name $portname license BSD maintainers nomaintainer version 060102 categories print revision 1 porturl $porturl]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> }
##
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/src/package1.0/tests/portmpkg.test b/src/package1.0/tests/portmpkg.test
</span><span style='display:block; white-space:pre;color:#808080;'>index e3f9abc..6913c2f 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/src/package1.0/tests/portmpkg.test
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/src/package1.0/tests/portmpkg.test
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -18,20 +18,26 @@ package require portpkg 1.0
</span> source ./library.tcl
macports_worker_init
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# mock getportresourcepath, tests should be able to operate without a ports tree
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc getportresourcepath {url {path {}} {fallback yes}} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global pwd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [file join $pwd $path]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span>
test mpkg_main {
Port mpkg main unit test.
} -constraints {
darwin
} -setup {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global os.platform os.major os.arch destpath package.destpath configure.build_arch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global subport version revision package.flat maintainers description categories
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global supported_archs porturl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global os.platform os.major os.arch destpath package.destpath configure.build_arch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ subport version revision package.flat maintainers description categories \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ supported_archs porturl pwd
</span> env_init
file mkdir $destpath
close [open $destpath/fondu-060102_1.pkg w+]
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file mkdir ${pwd}/port1.0/package
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ close [open ${pwd}/port1.0/package/background.tiff w+]
</span> } -body {
if {[portmpkg::mpkg_main] != 0} {
return "FAIL: cannot create pkg"
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -52,16 +58,17 @@ test mpkg_main {
</span>
} -cleanup {
file delete -force $destpath
<span style='display:block; white-space:pre;background:#ffe0e0;'>-
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global pwd
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ file delete -force ${pwd}/port1.0
</span> } -result "Package mpkg successful."
test make_dependency_list {
Make dependency list unit test.
} -setup {
<span style='display:block; white-space:pre;background:#ffe0e0;'>- global os.platform os.major os.arch destpath package.destpath configure.build_arch
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global subport version revision package.flat maintainers description categories
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- global supported_archs porturl
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global os.platform os.major os.arch destpath package.destpath configure.build_arch \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ subport version revision package.flat maintainers description categories \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ supported_archs porturl
</span> env_init
set destination $pwd/destination
</pre><pre style='margin:0'>
</pre>