Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix portmpkg.test
Work without being able to sync the user's ports tree.
  • Loading branch information
jmroot committed Feb 16, 2017
1 parent bebd94a commit c340033
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
1 change: 0 additions & 1 deletion src/package1.0/Makefile.in
Expand Up @@ -22,7 +22,6 @@ distclean:: clean
rm -f Makefile

test::
-$(prefix)/bin/port sync
$(TCLSH) $(srcdir)/../tests/test.tcl -nocolor

install:: all
Expand Down
27 changes: 17 additions & 10 deletions src/package1.0/tests/library.tcl
@@ -1,34 +1,41 @@
proc env_init {} {
global os.platform os.major os.arch epoch destpath package.destpath configure.build_arch
global subport version revision package.flat maintainers description categories
global supported_archs porturl workpath distname license filespath portpath pwd
global name
global os.platform os.major os.arch epoch destpath package.destpath build_arch configure.build_arch \
subport version revision package.flat maintainers description categories homepage \
supported_archs porturl workpath distname license filespath portpath pwd name

set os.platform darwin
set os.major 9
set os.arch i386
set epoch 1
set epoch 0

set workpath $pwd/work
set workpath $pwd/work
set destpath $pwd/pkg
set portpath $pwd
set portdbpath $pwd/dbpath
set filespath $pwd/files
set configure.build_arch build_arch
set build_arch i386
set configure.build_arch $build_arch
set package.destpath $pwd/pkg

set name fondu
set name fondu
set subport fondu
set version 060102
set distname fondu_src-060102
set revision 1
set license MIT
set license BSD
set package.flat no
set maintainers {test@macports.org}
set description test.description
set categories test
set supported_archs noarch
set porturl "http://fondu.sourceforge.net/"
set homepage "http://fondu.sourceforge.net/"
set porturl "file://${pwd}"

# mock mport_lookup, it normally needs a PortIndex
proc mport_lookup {portname} {
global porturl
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]]
}
}

##
Expand Down
12 changes: 6 additions & 6 deletions src/package1.0/tests/portmpkg.test
Expand Up @@ -24,9 +24,9 @@ test mpkg_main {
} -constraints {
darwin
} -setup {
global os.platform os.major os.arch destpath package.destpath configure.build_arch
global subport version revision package.flat maintainers description categories
global supported_archs porturl
global os.platform os.major os.arch destpath package.destpath configure.build_arch \
subport version revision package.flat maintainers description categories \
supported_archs porturl
env_init

file mkdir $destpath
Expand Down Expand Up @@ -59,9 +59,9 @@ test mpkg_main {
test make_dependency_list {
Make dependency list unit test.
} -setup {
global os.platform os.major os.arch destpath package.destpath configure.build_arch
global subport version revision package.flat maintainers description categories
global supported_archs porturl
global os.platform os.major os.arch destpath package.destpath configure.build_arch \
subport version revision package.flat maintainers description categories \
supported_archs porturl
env_init

set destination $pwd/destination
Expand Down

0 comments on commit c340033

Please sign in to comment.