[118609] branches/release_2_3/base
cal at macports.org
cal at macports.org
Sat Apr 5 14:20:48 PDT 2014
Revision: 118609
https://trac.macports.org/changeset/118609
Author: cal at macports.org
Date: 2014-04-05 14:20:48 -0700 (Sat, 05 Apr 2014)
Log Message:
-----------
merge r118606, r118607 from trunk: don't run tracemode test on systems that don't support trace mode
Revision Links:
--------------
https://trac.macports.org/changeset/118606
https://trac.macports.org/changeset/118607
Modified Paths:
--------------
branches/release_2_3/base/configure
branches/release_2_3/base/configure.ac
branches/release_2_3/base/tests/test/trace/test.tcl
Added Paths:
-----------
branches/release_2_3/base/tests/test.tcl.in
Removed Paths:
-------------
branches/release_2_3/base/tests/test.tcl
Property Changed:
----------------
branches/release_2_3/base/
branches/release_2_3/base/tests/
Property changes on: branches/release_2_3/base
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118598-118599,118602-118603
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
+ /branches/gsoc08-privileges/base:37343-46937
/branches/gsoc09-logging/base:51231-60371
/branches/gsoc11-rev-upgrade/base:78828-88375
/branches/gsoc11-statistics/base:79520,79666
/branches/gsoc13-tests:106692-111324
/branches/universal-sanity/base:51872-52323
/branches/variant-descs-14482/base:34469-34855,34900-37508,37511-37512,41040-41463,42575-42626,42640-42659
/trunk/base:118038-118039,118056,118598-118599,118602-118603,118606-118607
/users/perry/base-bugs_and_notes:45682-46060
/users/perry/base-select:44044-44692
Modified: branches/release_2_3/base/configure
===================================================================
--- branches/release_2_3/base/configure 2014-04-05 21:05:53 UTC (rev 118608)
+++ branches/release_2_3/base/configure 2014-04-05 21:20:48 UTC (rev 118609)
@@ -10591,7 +10591,7 @@
# Output
-ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/Makefile doc/base.mtree doc/macosx.mtree doc/macports.conf doc/prefix.mtree doc/pubkeys.conf portmgr/freebsd/Makefile portmgr/dmg/postflight setupenv.bash src/Makefile src/cflib1.0/Makefile src/cregistry/Makefile src/darwintracelib1.0/Makefile src/machista1.0/Makefile src/macports1.0/Makefile src/macports1.0/macports_autoconf.tcl src/macports1.0/macports_fastload.tcl src/macports1.0/macports_test_autoconf.tcl src/package1.0/Makefile src/package1.0/package_test_autoconf.tcl src/pextlib1.0/Makefile src/port/Makefile src/port1.0/Makefile src/port1.0/port_autoconf.tcl src/port1.0/port_test_autoconf.tcl src/programs/Makefile src/registry2.0/Makefile src/registry2.0/registry_autoconf.tcl tests/Makefile vendor/Makefile"
+ac_config_files="$ac_config_files Doxyfile Makefile Mk/macports.autoconf.mk doc/Makefile doc/base.mtree doc/macosx.mtree doc/macports.conf doc/prefix.mtree doc/pubkeys.conf portmgr/freebsd/Makefile portmgr/dmg/postflight setupenv.bash src/Makefile src/cflib1.0/Makefile src/cregistry/Makefile src/darwintracelib1.0/Makefile src/machista1.0/Makefile src/macports1.0/Makefile src/macports1.0/macports_autoconf.tcl src/macports1.0/macports_fastload.tcl src/macports1.0/macports_test_autoconf.tcl src/package1.0/Makefile src/package1.0/package_test_autoconf.tcl src/pextlib1.0/Makefile src/port/Makefile src/port1.0/Makefile src/port1.0/port_autoconf.tcl src/port1.0/port_test_autoconf.tcl src/programs/Makefile src/registry2.0/Makefile src/registry2.0/registry_autoconf.tcl tests/Makefile tests/test.tcl vendor/Makefile"
ac_config_files="$ac_config_files src/pkg_mkindex.sh"
@@ -11321,6 +11321,7 @@
"src/registry2.0/Makefile") CONFIG_FILES="$CONFIG_FILES src/registry2.0/Makefile" ;;
"src/registry2.0/registry_autoconf.tcl") CONFIG_FILES="$CONFIG_FILES src/registry2.0/registry_autoconf.tcl" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
+ "tests/test.tcl") CONFIG_FILES="$CONFIG_FILES tests/test.tcl" ;;
"vendor/Makefile") CONFIG_FILES="$CONFIG_FILES vendor/Makefile" ;;
"src/pkg_mkindex.sh") CONFIG_FILES="$CONFIG_FILES src/pkg_mkindex.sh" ;;
Modified: branches/release_2_3/base/configure.ac
===================================================================
--- branches/release_2_3/base/configure.ac 2014-04-05 21:05:53 UTC (rev 118608)
+++ branches/release_2_3/base/configure.ac 2014-04-05 21:20:48 UTC (rev 118609)
@@ -426,6 +426,7 @@
src/registry2.0/Makefile
src/registry2.0/registry_autoconf.tcl
tests/Makefile
+ tests/test.tcl
vendor/Makefile
])
Property changes on: branches/release_2_3/base/tests
___________________________________________________________________
Modified: svn:ignore
- Makefile
+ Makefile
test.tcl
Modified: branches/release_2_3/base/tests/test/trace/test.tcl
===================================================================
--- branches/release_2_3/base/tests/test/trace/test.tcl 2014-04-05 21:05:53 UTC (rev 118608)
+++ branches/release_2_3/base/tests/test/trace/test.tcl 2014-04-05 21:20:48 UTC (rev 118609)
@@ -29,7 +29,7 @@
makeDirectory ../tracetesttmp
if {[getuid] == 0} {
- file attributes ../tracetesttmp -owner $user
+ file attributes ../tracetesttmp -owner $user
exec chown -h $user /tmp/link-trace2
}
@@ -50,7 +50,8 @@
set err "error*"
set line [get_line $path/$output_file $err]
- if { $line == -1 } {
+ set unsupported [get_line $path/$output_file "*tracelib not supported on this platform*"]
+ if {$unsupported != -1 || $line == -1} {
return "No errors found."
} else {
return $line
Deleted: branches/release_2_3/base/tests/test.tcl
===================================================================
--- branches/release_2_3/base/tests/test.tcl 2014-04-05 21:05:53 UTC (rev 118608)
+++ branches/release_2_3/base/tests/test.tcl 2014-04-05 21:20:48 UTC (rev 118609)
@@ -1,143 +0,0 @@
-set test_suite {
- case-insensitive-deactivate
- checksums-1
- dependencies-a
- dependencies-b
- dependencies-c
- dependencies-d
- dependencies-e
- envvariables
- site-tags
- statefile-unknown-version
- statefile-version1
- statefile-version1-outdated
- statefile-version2
- statefile-version2-invalid
- statefile-version2-outdated
- svn-and-patchsites
- trace
- universal
- variants
- xcodeversion
-}
-set arguments ""
-set test_name ""
-set color_out ""
-set tcl ""
-set err ""
-
-# Get tclsh path.
-set autoconf ../Mk/macports.autoconf.mk
-set fp [open $autoconf r]
-while {[gets $fp line] != -1} {
- if {[string match "TCLSH*" $line] != 0} {
- set tcl [lrange [split $line " "] 1 1]
- }
-}
-
-proc print_help {arg} {
- if { $arg eq "tests" } {
- puts "The list of available tests is:"
- foreach test $::test_suite {
- puts [puts -nonewline " "]$test
- }
- } else {
- puts "Usage: tclsh test.tcl \[-debug level\] \[-t test\] \[-l\]\n"
- puts " -debug LVL : sets the level of printed debug info \[0-3\]"
- puts " -t TEST : run a specific test"
- puts " -nocolor : disable color output (for automatic testing)"
- puts " -l : print the list of available tests"
- puts " -h, -help : print this message\n"
- }
-}
-
-# Process args
-foreach arg $argv {
- if { $arg eq "-h" || $arg eq "-help" } {
- print_help ""
- exit 0
- } elseif { $arg eq "-debug" } {
- set index [expr {[lsearch $argv $arg] + 1}]
- set level [lindex $argv $index]
- if { $level >= 0 && $level <= 3 } {
- append arguments "-debug " $level
- } else {
- puts "Invalid debug level."
- exit 1
- }
- } elseif { $arg eq "-t" } {
- set index [expr {[lsearch $argv $arg] + 1}]
- set test_name [lindex $argv $index]
- set no 0
- foreach test $test_suite {
- if { $test_name != $test } {
- set no [expr {$no + 1}]
- }
- }
- if { $no == [llength $test_suite] } {
- print_help tests
- exit 1
- }
- } elseif { $arg eq "-l" } {
- print_help tests
- exit 0
- } elseif { $arg eq "-nocolor" } {
- set color_out "no"
- }
-}
-
-
-# Run tests
-if {$test_name ne ""} {
- cd test/$test_name
-
- set result [eval exec $tcl test.tcl $arguments 2>@stderr]
- puts $result
-
-} else {
- foreach test $test_suite {
- cd test/$test
-
- set result [eval exec $tcl test.tcl $arguments 2>@stderr]
- set lastline [lindex [split $result "\n"] end]
-
- if {[lrange [split $lastline "\t"] 1 1] != "Total"} {
- set lastline [lindex [split $result "\n"] end-2]
- set errmsg [lindex [split $result "\n"] end]
- }
-
- set splitresult [split $lastline "\t"]
- set total [lindex $splitresult 2]
- set pass [lindex $splitresult 4]
- set skip [lindex $splitresult 6]
- set fail [lindex $splitresult 8]
-
- # Check for errors.
- if { $fail != 0 } { set err "yes" }
-
- set out ""
- if { ($fail != 0 || $skip != 0) && $color_out eq "" } {
- # Color failed tests.
- append out "\x1b\[1;31mTotal:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " \x1b\[0m" $test
- } else {
- append out "Total:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " " $test
- }
-
- # Print results and constrints for auto-skipped tests.
- puts $out
- if { $skip != 0 } {
- set out " Constraint: "
- append out [string trim $errmsg "\t {}"]
- puts $out
- }
-
- cd ../..
- }
-}
-
-# Return 1 if errors were found.
-if {$err ne ""} {
- exit 1
-}
-
-return 0
Copied: branches/release_2_3/base/tests/test.tcl.in (from rev 118607, trunk/base/tests/test.tcl.in)
===================================================================
--- branches/release_2_3/base/tests/test.tcl.in (rev 0)
+++ branches/release_2_3/base/tests/test.tcl.in 2014-04-05 21:20:48 UTC (rev 118609)
@@ -0,0 +1,145 @@
+set test_suite {
+ case-insensitive-deactivate
+ checksums-1
+ dependencies-a
+ dependencies-b
+ dependencies-c
+ dependencies-d
+ dependencies-e
+ envvariables
+ site-tags
+ statefile-unknown-version
+ statefile-version1
+ statefile-version1-outdated
+ statefile-version2
+ statefile-version2-invalid
+ statefile-version2-outdated
+ svn-and-patchsites
+ universal
+ variants
+ xcodeversion
+}
+if {@TRACEMODE_SUPPORT@ != 0} {
+ lappend test_suite trace
+}
+set arguments ""
+set test_name ""
+set color_out ""
+set tcl ""
+set err ""
+
+# Get tclsh path.
+set autoconf ../Mk/macports.autoconf.mk
+set fp [open $autoconf r]
+while {[gets $fp line] != -1} {
+ if {[string match "TCLSH*" $line] != 0} {
+ set tcl [lrange [split $line " "] 1 1]
+ }
+}
+
+proc print_help {arg} {
+ if { $arg eq "tests" } {
+ puts "The list of available tests is:"
+ foreach test $::test_suite {
+ puts [puts -nonewline " "]$test
+ }
+ } else {
+ puts "Usage: tclsh test.tcl \[-debug level\] \[-t test\] \[-l\]\n"
+ puts " -debug LVL : sets the level of printed debug info \[0-3\]"
+ puts " -t TEST : run a specific test"
+ puts " -nocolor : disable color output (for automatic testing)"
+ puts " -l : print the list of available tests"
+ puts " -h, -help : print this message\n"
+ }
+}
+
+# Process args
+foreach arg $argv {
+ if { $arg eq "-h" || $arg eq "-help" } {
+ print_help ""
+ exit 0
+ } elseif { $arg eq "-debug" } {
+ set index [expr {[lsearch $argv $arg] + 1}]
+ set level [lindex $argv $index]
+ if { $level >= 0 && $level <= 3 } {
+ append arguments "-debug " $level
+ } else {
+ puts "Invalid debug level."
+ exit 1
+ }
+ } elseif { $arg eq "-t" } {
+ set index [expr {[lsearch $argv $arg] + 1}]
+ set test_name [lindex $argv $index]
+ set no 0
+ foreach test $test_suite {
+ if { $test_name != $test } {
+ set no [expr {$no + 1}]
+ }
+ }
+ if { $no == [llength $test_suite] } {
+ print_help tests
+ exit 1
+ }
+ } elseif { $arg eq "-l" } {
+ print_help tests
+ exit 0
+ } elseif { $arg eq "-nocolor" } {
+ set color_out "no"
+ }
+}
+
+
+# Run tests
+if {$test_name ne ""} {
+ cd test/$test_name
+
+ set result [eval exec $tcl test.tcl $arguments 2>@stderr]
+ puts $result
+
+} else {
+ foreach test $test_suite {
+ cd test/$test
+
+ set result [eval exec $tcl test.tcl $arguments 2>@stderr]
+ set lastline [lindex [split $result "\n"] end]
+
+ if {[lrange [split $lastline "\t"] 1 1] != "Total"} {
+ set lastline [lindex [split $result "\n"] end-2]
+ set errmsg [lindex [split $result "\n"] end]
+ }
+
+ set splitresult [split $lastline "\t"]
+ set total [lindex $splitresult 2]
+ set pass [lindex $splitresult 4]
+ set skip [lindex $splitresult 6]
+ set fail [lindex $splitresult 8]
+
+ # Check for errors.
+ if { $fail != 0 } { set err "yes" }
+
+ set out ""
+ if { ($fail != 0 || $skip != 0) && $color_out eq "" } {
+ # Color failed tests.
+ append out "\x1b\[1;31mTotal:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " \x1b\[0m" $test
+ } else {
+ append out "Total:" $total " Passed:" $pass " Failed:" $fail " Skipped:" $skip " " $test
+ }
+
+ # Print results and constrints for auto-skipped tests.
+ puts $out
+ if { $skip != 0 } {
+ set out " Constraint: "
+ append out [string trim $errmsg "\t {}"]
+ puts $out
+ }
+
+ cd ../..
+ }
+}
+
+# Return 1 if errors were found.
+if {$err ne ""} {
+ exit 1
+}
+
+return 0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140405/b7386205/attachment-0001.html>
More information about the macports-changes
mailing list