summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml43
-rw-r--r--tests-perf/clock.perf.tcl10
-rw-r--r--tests-perf/test-performance.tcl21
3 files changed, 45 insertions, 29 deletions
diff --git a/.travis.yml b/.travis.yml
index 68bb273..a9767ee 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -59,52 +59,52 @@ matrix:
- CFGOPT=--disable-shared
- BUILD_DIR=unix
# Older versions of GCC...
- - name: "Linux/GCC 4.9/Shared"
+ - name: "Linux/GCC 7/Shared"
os: linux
dist: xenial
- compiler: gcc-4.9
+ compiler: gcc-7
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-4.9
+ - g++-7
env:
- BUILD_DIR=unix
- - name: "Linux/GCC 5/Shared"
+ - name: "Linux/GCC 6/Shared"
os: linux
dist: xenial
- compiler: gcc-5
+ compiler: gcc-6
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-5
+ - g++-6
env:
- BUILD_DIR=unix
- - name: "Linux/GCC 6/Shared"
+ - name: "Linux/GCC 5/Shared"
os: linux
dist: xenial
- compiler: gcc-6
+ compiler: gcc-5
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-6
+ - g++-5
env:
- BUILD_DIR=unix
- - name: "Linux/GCC 7/Shared"
+ - name: "Linux/GCC 4.9/Shared"
os: linux
dist: xenial
- compiler: gcc-7
+ compiler: gcc-4.9
addons: &gcc7deps
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- - g++-7
+ - g++-4.9
env:
- BUILD_DIR=unix
- name: "Linux/GCC 7/Shared: UTF_MAX=6"
@@ -132,14 +132,14 @@ matrix:
- BUILD_DIR=unix
- CFGOPT=CFLAGS=-DTCL_NO_DEPRECATED=1
# Testing on Mac, various styles
- - name: "macOS/Xcode 8/Shared/Unix-like"
+ - name: "macOS/Xcode 11/Shared/Unix-like"
os: osx
- osx_image: xcode8
+ osx_image: xcode11
env:
- BUILD_DIR=unix
- - name: "macOS/Xcode 8/Shared/Mac-like"
+ - name: "macOS/Xcode 11/Shared/Mac-like"
os: osx
- osx_image: xcode8
+ osx_image: xcode11
env:
- BUILD_DIR=macosx
install: []
@@ -147,6 +147,13 @@ matrix:
- make all
# The styles=develop avoids some weird problems on OSX
- make test styles=develop
+ - name: "macOS/Xcode 10/Shared/Mac-like"
+ os: osx
+ osx_image: xcode10.2
+ env:
+ - BUILD_DIR=macosx
+ install: []
+ script: *mactest
- name: "macOS/Xcode 9/Shared/Mac-like"
os: osx
osx_image: xcode9
@@ -154,9 +161,9 @@ matrix:
- BUILD_DIR=macosx
install: []
script: *mactest
- - name: "macOS/Xcode 10/Shared/Mac-like"
+ - name: "macOS/Xcode 8/Shared/Mac-like"
os: osx
- osx_image: xcode10.2
+ osx_image: xcode8
env:
- BUILD_DIR=macosx
install: []
diff --git a/tests-perf/clock.perf.tcl b/tests-perf/clock.perf.tcl
index f80746f..c0da0ab 100644
--- a/tests-perf/clock.perf.tcl
+++ b/tests-perf/clock.perf.tcl
@@ -122,7 +122,7 @@ proc test-format {{reptime 1000}} {
}
proc test-scan {{reptime 1000}} {
- _test_run $reptime {
+ _test_run -convert-result {clock format $_(r) -locale en} $reptime {
# Scan : date (in gmt)
{clock scan "25.11.2015" -format "%d.%m.%Y" -base 0 -gmt 1}
# Scan : date (system time zone, with base)
@@ -198,11 +198,11 @@ proc test-scan {{reptime 1000}} {
# {clock scan "25.11.2015" -format [string repeat "[incr i] %d.%m.%Y %d.%m.%Y" 10] -base 0 -gmt 1}
# # Scan : again:
# {clock scan "25.11.2015" -format [string repeat "[incr i -1] %d.%m.%Y %d.%m.%Y" 10] -base 0 -gmt 1}
- } {puts [clock format $_(r) -locale en]}
+ }
}
proc test-freescan {{reptime 1000}} {
- _test_run $reptime {
+ _test_run -convert-result {clock format $_(r) -locale en} $reptime {
# FreeScan : relative date
{clock scan "5 years 18 months 385 days" -base 0 -gmt 1}
# FreeScan : relative date with relative weekday
@@ -239,7 +239,7 @@ proc test-freescan {{reptime 1000}} {
{clock scan "19:18:30 MST" -base 148863600 -gmt 1
clock scan "19:18:30 EST" -base 148863600
}
- } {puts [clock format $_(r) -locale en]}
+ }
}
proc test-add {{reptime 1000}} {
@@ -282,7 +282,7 @@ proc test-add {{reptime 1000}} {
if {[catch {clock add 0 3 weekdays -gmt 1}]} {
regsub -all {\mweekdays\M} $tests "days" tests
}
- _test_run $reptime $tests {puts [clock format $_(r) -locale en]}
+ _test_run -convert-result {clock format $_(r) -locale en} $reptime $tests
}
proc test-convert {{reptime 1000}} {
diff --git a/tests-perf/test-performance.tcl b/tests-perf/test-performance.tcl
index 78189e6..a715c8a 100644
--- a/tests-perf/test-performance.tcl
+++ b/tests-perf/test-performance.tcl
@@ -127,15 +127,23 @@ proc _adjust_maxcount {reptime maxcount} {
proc _test_run {args} {
upvar _ _
# parse args:
- array set _ [set _opts {-no-result 0 -uplevel 0}]
+ array set _ {-no-result 0 -uplevel 0 -convert-result {}}
while {[llength $args] > 2} {
- if {[set o [lindex $args 0]] ni $_opts || $_($o)} {
+ if {![info exists _([set o [lindex $args 0]])]} {
break
}
- set _($o) 1
- set args [lrange $args 1 end]
+ if {[string is boolean -strict $_($o)]} {
+ set _($o) [expr {! $_($o)}]
+ set args [lrange $args 1 end]
+ } else {
+ if {[llength $args] <= 2} {
+ return -code error "value expected for option $o"
+ }
+ set _($o) [lindex $args 1]
+ set args [lrange $args 2 end]
+ }
}
- unset -nocomplain _opts o
+ unset -nocomplain o
if {[llength $args] < 2 || [llength $args] > 3} {
return -code error "wrong # args: should be \"[lindex [info level [info level]] 0] ?-no-result? reptime lst ?outcmd?\""
}
@@ -173,7 +181,8 @@ proc _test_run {args} {
# if output result (and not once):
if {!$_(-no-result)} {
set _(r) [if 1 $_(c)]
- if {$_(outcmd) ne {}} {{*}$_(outcmd) $_(r)}
+ if {$_(-convert-result) ne ""} { set _(r) [if 1 $_(-convert-result)] }
+ {*}$_(outcmd) $_(r)
if {[llength $_(ittime)] > 1} { # decrement max-count
lset _(ittime) 1 [expr {[lindex $_(ittime) 1] - 1}]
}