[112079] trunk/base/tests/test
jmr at macports.org
jmr at macports.org
Thu Oct 10 23:01:18 PDT 2013
Revision: 112079
https://trac.macports.org/changeset/112079
Author: jmr at macports.org
Date: 2013-10-10 23:01:18 -0700 (Thu, 10 Oct 2013)
Log Message:
-----------
more test code cleanup
Modified Paths:
--------------
trunk/base/tests/test/case-insensitive-deactivate/test.tcl
trunk/base/tests/test/checksums-1/test.tcl
trunk/base/tests/test/dependencies-a/test.tcl
trunk/base/tests/test/dependencies-b/test.tcl
trunk/base/tests/test/dependencies-c/test.tcl
trunk/base/tests/test/dependencies-d/test.tcl
trunk/base/tests/test/dependencies-e/test.tcl
trunk/base/tests/test/envvariables/test.tcl
trunk/base/tests/test/site-tags/test.tcl
trunk/base/tests/test/statefile-unknown-version/test.tcl
trunk/base/tests/test/statefile-version1/test.tcl
trunk/base/tests/test/statefile-version1-outdated/test.tcl
trunk/base/tests/test/statefile-version2/test.tcl
trunk/base/tests/test/statefile-version2-invalid/test.tcl
trunk/base/tests/test/statefile-version2-outdated/test.tcl
trunk/base/tests/test/svn-and-patchsites/test.tcl
trunk/base/tests/test/trace/test.tcl
trunk/base/tests/test/universal/test.tcl
trunk/base/tests/test/variants/test.tcl
trunk/base/tests/test/xcodeversion/test.tcl
Modified: trunk/base/tests/test/case-insensitive-deactivate/test.tcl
===================================================================
--- trunk/base/tests/test/case-insensitive-deactivate/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/case-insensitive-deactivate/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -17,9 +17,7 @@
port_index
proc test_exists {} {
- global path
- global testfile
- global testport1
+ global path testfile testport1
exec sed "s/@name@/$testport1/" $path/Portfile.in > Portfile
port_install
@@ -32,9 +30,7 @@
}
proc test_not_exists {} {
- global path
- global testfile
- global testport2
+ global path testfile testport2
exec sed "s/@name@/$testport2/" $path/Portfile.in > Portfile
port_uninstall
@@ -62,4 +58,4 @@
cleanup
-cleanupTests
\ No newline at end of file
+cleanupTests
Modified: trunk/base/tests/test/checksums-1/test.tcl
===================================================================
--- trunk/base/tests/test/checksums-1/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/checksums-1/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -10,8 +10,7 @@
initial_setup
proc get_checksum {type} {
- global path
- global output_file
+ global path output_file
append string "debug: calculated (" $type ")*"
set line [get_line $path/$output_file $string]
Modified: trunk/base/tests/test/dependencies-a/test.tcl
===================================================================
--- trunk/base/tests/test/dependencies-a/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/dependencies-a/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -8,8 +8,7 @@
set path [file dirname [file normalize $argv0]]
proc dep-a {} {
- global path
- global output_file
+ global path output_file
initial_setup
Modified: trunk/base/tests/test/dependencies-b/test.tcl
===================================================================
--- trunk/base/tests/test/dependencies-b/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/dependencies-b/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -8,8 +8,7 @@
set path [file dirname [file normalize $argv0]]
proc dep-b {} {
- global path
- global output_file
+ global path output_file
initial_setup
Modified: trunk/base/tests/test/dependencies-c/test.tcl
===================================================================
--- trunk/base/tests/test/dependencies-c/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/dependencies-c/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -8,8 +8,7 @@
set path [file dirname [file normalize $argv0]]
proc dep-c {} {
- global path
- global output_file
+ global path output_file
initial_setup
Modified: trunk/base/tests/test/dependencies-d/test.tcl
===================================================================
--- trunk/base/tests/test/dependencies-d/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/dependencies-d/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -8,8 +8,7 @@
set path [file dirname [file normalize $argv0]]
proc dep-d {} {
- global path
- global output_file
+ global path output_file
initial_setup
Modified: trunk/base/tests/test/dependencies-e/test.tcl
===================================================================
--- trunk/base/tests/test/dependencies-e/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/dependencies-e/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -8,8 +8,7 @@
set path [file dirname [file normalize $argv0]]
proc dep-e {} {
- global path
- global output_file
+ global path output_file
initial_setup
Modified: trunk/base/tests/test/envvariables/test.tcl
===================================================================
--- trunk/base/tests/test/envvariables/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/envvariables/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -15,15 +15,12 @@
port_clean $path
proc envvar_test {} {
- global output_file
- global path
- global portsrc
- global bindir
+ global output_file path portsrc bindir
# Build helping string
- append string "export ENVA=A; export ENVB=B; "
- append string "export PORTSRC=" $portsrc "; "
- append string $bindir "port test"
+ set string "export ENVA=A; export ENVB=B; "
+ append string "export PORTSRC=${portsrc}; "
+ append string "${bindir}/port test"
exec sh -c $string > output
set line [get_line $path/$output_file "a"]
Modified: trunk/base/tests/test/site-tags/test.tcl
===================================================================
--- trunk/base/tests/test/site-tags/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/site-tags/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -8,8 +8,7 @@
set path [file dirname [file normalize $argv0]]
proc sitetag {} {
- global output_file
- global path
+ global output_file path
initial_setup
Modified: trunk/base/tests/test/statefile-unknown-version/test.tcl
===================================================================
--- trunk/base/tests/test/statefile-unknown-version/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/statefile-unknown-version/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -15,8 +15,7 @@
port_clean $path
proc state_unknown {warn} {
- global path
- global output_file
+ global path output_file
if {[string compare $warn "no"]} {
set msg "warning*"
Modified: trunk/base/tests/test/statefile-version1/test.tcl
===================================================================
--- trunk/base/tests/test/statefile-version1/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/statefile-version1/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -17,8 +17,7 @@
port_clean $path
proc statefile_v1 {warn} {
- global path
- global output_file
+ global path output_file
if {[string compare $warn "no"]} {
set msg "*discarding previous state*"
Modified: trunk/base/tests/test/statefile-version1-outdated/test.tcl
===================================================================
--- trunk/base/tests/test/statefile-version1-outdated/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/statefile-version1-outdated/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -17,8 +17,7 @@
port_clean $path
proc state_v1 {warn} {
- global path
- global output_file
+ global path output_file
if {[string compare $warn "no"]} {
set msg "*discarding previous state*"
Modified: trunk/base/tests/test/statefile-version2/test.tcl
===================================================================
--- trunk/base/tests/test/statefile-version2/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/statefile-version2/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -20,8 +20,7 @@
port_clean $path
proc statefile_v2 {arg} {
- global path
- global output_file
+ global path output_file
if {[string compare $arg "no"]} {
set msg "*discarding previous state*"
Modified: trunk/base/tests/test/statefile-version2-invalid/test.tcl
===================================================================
--- trunk/base/tests/test/statefile-version2-invalid/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/statefile-version2-invalid/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -16,8 +16,7 @@
port_clean $path
proc state_v2_invalid {warn} {
- global path
- global output_file
+ global path output_file
if {[string compare $warn "no"]} {
set msg "*warning*checksum*"
Modified: trunk/base/tests/test/statefile-version2-outdated/test.tcl
===================================================================
--- trunk/base/tests/test/statefile-version2-outdated/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/statefile-version2-outdated/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -16,8 +16,7 @@
port_clean $path
proc state_v2_out {warn} {
- global path
- global output_file
+ global path output_file
if {[string compare $warn "no"]} {
set msg "*discarding previous state*"
Modified: trunk/base/tests/test/svn-and-patchsites/test.tcl
===================================================================
--- trunk/base/tests/test/svn-and-patchsites/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/svn-and-patchsites/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -7,8 +7,7 @@
initial_setup
proc svn-patch {} {
- global output_file
- global path
+ global output_file path
set svn "error*"
set line [get_line $path/$output_file $svn]
Modified: trunk/base/tests/test/trace/test.tcl
===================================================================
--- trunk/base/tests/test/trace/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/trace/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -10,9 +10,7 @@
load_variables $path
proc test_trace {} {
- global path
- global autoconf
- global output_file
+ global path autoconf output_file
set line [get_line $autoconf "runusr*"]
set user [lrange [split $line " "] 1 1]
Modified: trunk/base/tests/test/universal/test.tcl
===================================================================
--- trunk/base/tests/test/universal/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/universal/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -14,10 +14,7 @@
port_index
proc univ_test {opt} {
- global output_file
- global path
- global portsrc
- global bindir
+ global output_file path portsrc bindir
# Modify Porfile.in for variants.
if {[string compare $opt "yes"]} {
@@ -30,8 +27,7 @@
port_clean $path
# Build helping string
- append string "export PORTSRC=" $portsrc "; "
- append string $bindir "port info --variants"
+ set string "export PORTSRC=${portsrc} ; ${bindir}/port info --variants"
exec sh -c $string > output 2>@1
set var "variants:*"
Modified: trunk/base/tests/test/variants/test.tcl
===================================================================
--- trunk/base/tests/test/variants/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/variants/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -7,8 +7,7 @@
initial_setup
proc var_check {} {
- global output_file
- global path
+ global output_file path
set var "utopia variant*"
set line [get_line $path/$output_file $var]
Modified: trunk/base/tests/test/xcodeversion/test.tcl
===================================================================
--- trunk/base/tests/test/xcodeversion/test.tcl 2013-10-11 05:53:03 UTC (rev 112078)
+++ trunk/base/tests/test/xcodeversion/test.tcl 2013-10-11 06:01:18 UTC (rev 112079)
@@ -7,8 +7,7 @@
initial_setup
proc xcode_ver {} {
- global output_file
- global path
+ global output_file path
set xcode "xcodeversion*"
set line [get_line $path/$output_file $xcode]
@@ -16,8 +15,7 @@
}
proc xcode_binpath {} {
- global output_file
- global path
+ global output_file path
set xcode "xcodebuildcmd*"
set line [get_line $path/$output_file $xcode]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20131010/5e7c2efb/attachment-0001.html>
More information about the macports-changes
mailing list