[107498] branches/gsoc13-tests/tests/test/library.tcl
Revision: 107498 https://trac.macports.org/changeset/107498 Author: marius@macports.org Date: 2013-07-01 10:22:41 -0700 (Mon, 01 Jul 2013) Log Message: ----------- Added port_install and port_uninstall to library. Modified Paths: -------------- branches/gsoc13-tests/tests/test/library.tcl Modified: branches/gsoc13-tests/tests/test/library.tcl =================================================================== --- branches/gsoc13-tests/tests/test/library.tcl 2013-07-01 16:51:51 UTC (rev 107497) +++ branches/gsoc13-tests/tests/test/library.tcl 2013-07-01 17:22:41 UTC (rev 107498) @@ -113,6 +113,30 @@ return $result } +# Installs new portfile. +proc port_install {} { + global bindir + global portsrc + + set env "env PORTSRC=${portsrc}" + set cmd "port" + set args "install" + + set result [eval exec $env $bindir$cmd $args > output 2>@1] +} + +# Uninstalls portfile. +proc port_uninstall {} { + global bindir + global portsrc + + set env "env PORTSRC=${portsrc}" + set cmd "port" + set args "uninstall" + + set result [eval exec $env $bindir$cmd $args > output 2>@1] +} + # Returns the line containint a given string # from a given file, or -1 if nothing is found. proc get_line {filename lookup} {
participants (1)
-
marius@macports.org