summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.travis.yml56
-rw-r--r--macosx/GNUmakefile6
-rw-r--r--tests/clock.test42
3 files changed, 52 insertions, 52 deletions
diff --git a/.travis.yml b/.travis.yml
index 64801ec..947e858 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,32 +1,33 @@
-dist: trusty
sudo: false
language: c
+
matrix:
include:
- os: linux
+ dist: trusty
compiler: clang
env:
- - MATRIX_EVAL=""
- BUILD_DIR=unix
- os: linux
+ dist: trusty
compiler: clang
env:
- - MATRIX_EVAL=""
- - BUILD_DIR=unix
- CFGOPT=--disable-shared
+ - BUILD_DIR=unix
- os: linux
+ dist: trusty
compiler: gcc
env:
- - MATRIX_EVAL=""
- BUILD_DIR=unix
- os: linux
+ dist: trusty
compiler: gcc
env:
- - MATRIX_EVAL=""
- - BUILD_DIR=unix
- CFGOPT=--disable-shared
+ - BUILD_DIR=unix
- os: linux
- compiler: gcc
+ dist: trusty
+ compiler: gcc-4.9
addons:
apt:
sources:
@@ -34,10 +35,10 @@ matrix:
packages:
- g++-4.9
env:
- - MATRIX_EVAL="CC=gcc-4.9"
- BUILD_DIR=unix
- os: linux
- compiler: gcc
+ dist: trusty
+ compiler: gcc-5
addons:
apt:
sources:
@@ -45,10 +46,10 @@ matrix:
packages:
- g++-5
env:
- - MATRIX_EVAL="CC=gcc-5"
- BUILD_DIR=unix
- os: linux
- compiler: gcc
+ dist: trusty
+ compiler: gcc-6
addons:
apt:
sources:
@@ -56,10 +57,10 @@ matrix:
packages:
- g++-6
env:
- - MATRIX_EVAL="CC=gcc-6"
- BUILD_DIR=unix
- os: linux
- compiler: gcc
+ dist: trusty
+ compiler: gcc-7
addons:
apt:
sources:
@@ -67,33 +68,34 @@ matrix:
packages:
- g++-7
env:
- - MATRIX_EVAL="CC=gcc-7"
- BUILD_DIR=unix
- os: osx
osx_image: xcode8
env:
- - MATRIX_EVAL=""
- BUILD_DIR=unix
- os: osx
osx_image: xcode8
env:
- - MATRIX_EVAL=""
- BUILD_DIR=macosx
- NO_DIRECT_CONFIGURE=1
- os: osx
osx_image: xcode9
env:
- - MATRIX_EVAL=""
- BUILD_DIR=macosx
- NO_DIRECT_CONFIGURE=1
- os: osx
osx_image: xcode10
env:
- - MATRIX_EVAL=""
- BUILD_DIR=macosx
- NO_DIRECT_CONFIGURE=1
+### C builds not currently supported on Windows instances
+# - os: windows
+# env:
+# - BUILD_DIR=win
+### ... so proxy with a Mingw cross-compile
# Test with mingw-w64 (32 bit)
- os: linux
+ dist: trusty
compiler: i686-w64-mingw32-gcc
addons:
apt:
@@ -105,13 +107,12 @@ matrix:
- gcc-multilib
- wine
env:
- - MATRIX_EVAL=""
- BUILD_DIR=win
- CFGOPT=--host=i686-w64-mingw32
- NO_DIRECT_TEST=1
-
# Test with mingw-w64 (64 bit)
- os: linux
+ dist: trusty
compiler: x86_64-w64-mingw32-gcc
addons:
apt:
@@ -122,24 +123,17 @@ matrix:
- gcc-mingw-w64
- wine
env:
- - MATRIX_EVAL=""
- BUILD_DIR=win
- - CFGOPT=--host=x86_64-w64-mingw32 --enable-64bit
+ - CFGOPT="--host=x86_64-w64-mingw32 --enable-64bit"
- NO_DIRECT_TEST=1
-### C builds not currently supported on Windows instances
-# - os: windows
-# env:
-# - MATRIX_EVAL=""
-# - BUILD_DIR=win
-
before_install:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then rvm get stable; fi
- - eval "${MATRIX_EVAL}"
- export ERROR_ON_FAILURES=1
- cd ${BUILD_DIR}
install:
- test -n "$NO_DIRECT_CONFIGURE" || ./configure ${CFGOPT}
script:
- make
- - test -n "$NO_DIRECT_TEST" || make test
+ # The styles=develop avoids some weird problems on OSX
+ - test -n "$NO_DIRECT_TEST" || make test styles=develop
diff --git a/macosx/GNUmakefile b/macosx/GNUmakefile
index 43f8419..45ea416 100644
--- a/macosx/GNUmakefile
+++ b/macosx/GNUmakefile
@@ -180,8 +180,10 @@ ifeq (${BUILD_STYLE}_${EMBEDDED_BUILD},Development_)
# Deployment build can be installed on top
# of Development build without overwriting
# the debug library
- @cd "${INSTALL_ROOT}${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION}" && \
- ln -f "${PRODUCT_NAME}" "${PRODUCT_NAME}_debug"
+ @if [ -d "${INSTALL_ROOT}${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION}" ]; then \
+ cd "${INSTALL_ROOT}${LIBDIR}/${PRODUCT_NAME}.framework/Versions/${VERSION}"; \
+ ln -f "${PRODUCT_NAME}" "${PRODUCT_NAME}_debug"; \
+ fi
endif
clean-${PROJECT}: %-${PROJECT}:
diff --git a/tests/clock.test b/tests/clock.test
index 4ec4db2..3ad5c9f 100644
--- a/tests/clock.test
+++ b/tests/clock.test
@@ -250,6 +250,16 @@ proc ::testClock::registry { cmd path key } {
return [dict get $reg $path $key]
}
+proc timeWithinDuration {duration start end} {
+ regexp {([\d.]+)(s|ms|us)} $duration -> duration unit
+ set delta [expr {$end - $start}]
+ expr {
+ ($delta > 0) && ($delta <= $duration) ?
+ "ok" :
+ "test should have taken 0-$duration $unit, actually took $delta"}
+}
+
+
# Test some of the basics of [clock format]
test clock-1.0 "clock format - wrong # args" {
@@ -35425,7 +35435,7 @@ test clock-33.2 {clock clicks tests} {
set start [clock clicks]
after 10
set end [clock clicks]
- expr "$end > $start"
+ expr {$end > $start}
} {1}
test clock-33.3 {clock clicks tests} {
list [catch {clock clicks foo} msg] $msg
@@ -35440,27 +35450,21 @@ test clock-33.4a {clock milliseconds} {
} {}
test clock-33.5 {clock clicks tests, millisecond timing test} {
# This test can fail on a system that is so heavily loaded that
- # the test takes >60 ms to run.
+ # the test takes >120 ms to run.
set start [clock clicks -milli]
after 10
set end [clock clicks -milli]
- # 60 msecs seems to be the max time slice under Windows 95/98
- expr {
- ($end > $start) && (($end - $start) <= 60) ?
- "ok" :
- "test should have taken 0-60 ms, actually took [expr $end - $start]"}
+ # 60 msecs seems to be the max time slice under Windows 95/98;
+ timeWithinDuration 120ms $start $end
} {ok}
test clock-33.5a {clock tests, millisecond timing test} {
# This test can fail on a system that is so heavily loaded that
- # the test takes >60 ms to run.
+ # the test takes >120 ms to run.
set start [clock milliseconds]
after 10
set end [clock milliseconds]
# 60 msecs seems to be the max time slice under Windows 95/98
- expr {
- ($end > $start) && (($end - $start) <= 60) ?
- "ok" :
- "test should have taken 0-60 ms, actually took [expr $end - $start]"}
+ timeWithinDuration 120ms $start $end
} {ok}
test clock-33.6 {clock clicks, milli with too much abbreviation} {
list [catch { clock clicks ? } msg] $msg
@@ -35471,20 +35475,20 @@ test clock-33.7 {clock clicks, milli with too much abbreviation} {
test clock-33.8 {clock clicks test, microsecond timing test} {
# This test can fail on a system that is so heavily loaded that
- # the test takes >60 ms to run.
+ # the test takes >120 ms to run.
set start [clock clicks -micro]
after 10
set end [clock clicks -micro]
- expr {($end > $start) && (($end - $start) <= 60000)}
-} {1}
+ timeWithinDuration 120000us $start $end
+} {ok}
test clock-33.8a {clock test, microsecond timing test} {
# This test can fail on a system that is so heavily loaded that
- # the test takes >60 ms to run.
+ # the test takes >120 ms to run.
set start [clock microseconds]
after 10
set end [clock microseconds]
- expr {($end > $start) && (($end - $start) <= 60000)}
-} {1}
+ timeWithinDuration 120000us $start $end
+} {ok}
test clock-33.9 {clock clicks test, millis align with seconds} {
set t1 [clock seconds]
@@ -35826,7 +35830,7 @@ test clock-35.3 {clock seconds tests} {
set start [clock seconds]
after 2000
set end [clock seconds]
- expr "$end > $start"
+ expr {$end > $start}
} {1}