Changeset 120186 for trunk/base/tests


Ignore:
Timestamp:
May 19, 2014, 12:05:16 AM (6 years ago)
Author:
jmr@…
Message:

use proper testConstraint to avoid running trace mode test on unsupported platforms, and add darwin platform constraint to a couple tests that need it

Location:
trunk/base/tests
Files:
5 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/base/tests/test

    • Property svn:ignore set to
      library.tcl
  • trunk/base/tests/test.tcl.in

    r118607 r120186  
    1616    statefile-version2-outdated
    1717    svn-and-patchsites
     18    trace
    1819    universal
    1920    variants
    2021    xcodeversion
    2122}
    22 if {@TRACEMODE_SUPPORT@ != 0} {
    23         lappend test_suite trace
    24 }
     23
    2524set arguments ""
    2625set test_name ""
     
    3029
    3130# Get tclsh path.
    32 set autoconf ../Mk/macports.autoconf.mk
    33 set fp [open $autoconf r]
    34 while {[gets $fp line] != -1} {
    35     if {[string match "TCLSH*" $line] != 0} {
    36         set tcl [lrange [split $line " "] 1 1]
    37     }
    38 }
     31set tcl "@TCLSH@"
    3932
    4033proc print_help {arg} {
  • trunk/base/tests/test/library.tcl.in

    r120185 r120186  
    1 set autoconf [file dirname $argv0]/../../../Mk/macports.autoconf.mk
    21eval ::tcltest::configure $::argv
    32
     
    54set work_dir "work"
    65
     6# constraint for tests that should only run on Darwin
     7::tcltest::testConstraint darwin [expr {"@OS_PLATFORM@" eq "darwin"}]
     8
     9# constraint indicating whether the platform supports trace mode
     10::tcltest::testConstraint tracemode_support [expr {@TRACEMODE_SUPPORT@ != 0}]
     11
    712# Set of procs used for testing.
    813
    9 # Sets $bindir variable from macports.autoconf.mk
    10 # autogenerated file.
     14# Sets $bindir variable from autoconf
    1115proc load_variables {pwd} {
    12     global autoconf bindir datadir portsrc cpwd
    13 
    14     if { ![file exists $autoconf] } {
    15         puts "ERROR: $autoconf does not exist."
    16         exit 1
    17     }
     16    global bindir datadir portsrc cpwd
    1817
    1918    set cpwd [file dirname [file dirname $pwd]]
    2019
    21     set line [get_line $autoconf "prefix*"]
    22     set prefix [lrange [split $line " "] 1 1]
    23 
    24     set line [get_line $autoconf "bindir*"]
    25     set bin [lrange [split $line "/"] 1 1]
    26 
    27     set bindir ${prefix}/${bin}
    28     set datadir ${prefix}/share
     20    set prefix "@prefix@"
     21    set exec_prefix "@exec_prefix@"
     22    set bindir "@bindir@"
     23    set datadir "@datarootdir@"
    2924    set portsrc ${cpwd}/test-macports.conf
    3025
  • trunk/base/tests/test/trace/test.tcl

    r118606 r120186  
    6161test trace {
    6262    Regression test for trace.
     63} -constraints {
     64    tracemode_support
    6365} -body {
    6466    test_trace
  • trunk/base/tests/test/universal/test.tcl

    r116515 r120186  
    3939test universal {
    4040    Regression test for universal variant.
     41} -constraints {
     42    darwin
    4143} -body {
    4244    univ_test "yes"
  • trunk/base/tests/test/xcodeversion/test.tcl

    r112079 r120186  
    2525test envvariables {
    2626    Regression test for XCode version.
     27} -constraints {
     28    darwin
    2729} -body {
    2830    xcode_ver
     
    3133test xcode_path {
    3234    Regression test for XCode path.
     35} -constraints {
     36    darwin
    3337} -body {
    3438    xcode_binpath
Note: See TracChangeset for help on using the changeset viewer.