From 5c380477df5c64afa2d44cbf1637c4760cfb0a0b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 14 Feb 2020 09:21:44 +0000 Subject: (cherry-pick): Fix travis build, due to the change of Windows image. --- .travis.yml | 74 ++++++++++++++++++++++++++++--------------------------------- 1 file changed, 34 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index b1ed4e5..02e3102 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,20 +6,20 @@ matrix: # Testing on Linux with various compilers - name: "Linux/GCC/Shared" os: linux - dist: xenial + dist: bionic compiler: gcc env: - BUILD_DIR=unix - name: "Linux/GCC/Static" os: linux - dist: xenial + dist: bionic compiler: gcc env: - CFGOPT="--disable-shared" - BUILD_DIR=unix - name: "Linux/GCC/Debug" os: linux - dist: xenial + dist: bionic compiler: gcc env: - BUILD_DIR=unix @@ -27,7 +27,7 @@ matrix: # Older versions of GCC... - name: "Linux/GCC 7/Shared" os: linux - dist: xenial + dist: bionic compiler: gcc-7 addons: apt: @@ -39,7 +39,7 @@ matrix: - BUILD_DIR=unix - name: "Linux/GCC 6/Shared" os: linux - dist: xenial + dist: bionic compiler: gcc-6 addons: apt: @@ -51,7 +51,7 @@ matrix: - BUILD_DIR=unix - name: "Linux/GCC 5/Shared" os: linux - dist: xenial + dist: bionic compiler: gcc-5 addons: apt: @@ -61,49 +61,36 @@ matrix: - g++-5 env: - BUILD_DIR=unix - - name: "Linux/GCC 4.9/Shared" - os: linux - dist: xenial - compiler: gcc-4.9 - addons: - apt: - sources: - - ubuntu-toolchain-r-test - packages: - - g++-4.9 - env: - - BUILD_DIR=unix # Clang - name: "Linux/Clang/Shared" os: linux - dist: xenial + dist: bionic compiler: clang env: - BUILD_DIR=unix - name: "Linux/Clang/Static" os: linux - dist: xenial + dist: bionic compiler: clang env: - CFGOPT="--disable-shared" - BUILD_DIR=unix - name: "Linux/Clang/Debug" os: linux - dist: xenial + dist: bionic compiler: clang env: - BUILD_DIR=unix - CFGOPT="--enable-symbols" # Testing on Mac, various styles - - name: "macOS/Xcode 11/Shared/Unix-like" + - name: "macOS/Xcode 11.3/Shared/Unix-like" os: osx - osx_image: xcode11 + osx_image: xcode11.3 env: - BUILD_DIR=unix - - CFGOPT="--enable-threads" - - name: "macOS/Xcode 11/Shared" + - name: "macOS/Xcode 11.3/Shared" os: osx - osx_image: xcode11 + osx_image: xcode11.3 env: - BUILD_DIR=macosx install: [] @@ -111,6 +98,13 @@ matrix: - make all # The styles=develop avoids some weird problems on OSX - make test styles=develop + - name: "macOS/Xcode 11/Shared" + os: osx + osx_image: xcode11 + env: + - BUILD_DIR=macosx + install: [] + script: *mactest - name: "macOS/Xcode 10/Shared" os: osx osx_image: xcode10.3 @@ -136,7 +130,7 @@ matrix: # Doesn't run tests because wine is only an imperfect Windows emulation - name: "Linux-cross-Windows/GCC/Shared/no test" os: linux - dist: xenial + dist: bionic compiler: x86_64-w64-mingw32-gcc addons: apt: @@ -157,7 +151,7 @@ matrix: # Doesn't run tests because wine is only an imperfect Windows emulation - name: "Linux-cross-Windows-32/GCC/Shared/no test" os: linux - dist: xenial + dist: bionic compiler: i686-w64-mingw32-gcc addons: apt: @@ -183,8 +177,8 @@ matrix: - cd ${BUILD_DIR} install: [] script: - - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=threads -f makefile.vc all tcltest' - - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=threads -f makefile.vc test' + - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=threads' '-f' makefile.vc all tcltest + - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=threads' '-f' makefile.vc test - name: "Windows/MSVC/Static" os: windows compiler: cl @@ -192,8 +186,8 @@ matrix: before_install: *vcpreinst install: [] script: - - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static,msvcrt,threads -f makefile.vc all tcltest' - - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=static,msvcrt,threads -f makefile.vc test' + - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,msvcrt,threads' '-f' makefile.vc all tcltest + - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=static,msvcrt,threads' '-f' makefile.vc test - name: "Windows/MSVC/Debug" os: windows compiler: cl @@ -201,8 +195,8 @@ matrix: before_install: *vcpreinst install: [] script: - - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols,threads -f makefile.vc all tcltest' - - cmd.exe /C 'vcvarsall.bat x64 && nmake OPTS=symbols,threads -f makefile.vc test' + - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=symbols,threads' '-f' makefile.vc all tcltest + - cmd.exe //C vcvarsall.bat x64 '&&' nmake 'OPTS=symbols,threads' '-f' makefile.vc test # Test on Windows with MSVC native (32-bit) - name: "Windows/MSVC-x86/Shared" os: windows @@ -211,8 +205,8 @@ matrix: before_install: *vcpreinst install: [] script: - - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=threads -f makefile.vc all tcltest' - - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=threads -f makefile.vc test' + - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=threads' '-f' makefile.vc all tcltest + - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=threads' '-f' makefile.vc test - name: "Windows/MSVC-x86/Static" os: windows compiler: cl @@ -220,8 +214,8 @@ matrix: before_install: *vcpreinst install: [] script: - - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=static,msvcrt,threads -f makefile.vc all tcltest' - - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=static,msvcrt,threads -f makefile.vc test' + - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,msvcrt,threads' '-f' makefile.vc all tcltest + - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=static,msvcrt,threads' '-f' makefile.vc test - name: "Windows/MSVC-x86/Debug" os: windows compiler: cl @@ -229,8 +223,8 @@ matrix: before_install: *vcpreinst install: [] script: - - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=symbols,threads -f makefile.vc all tcltest' - - cmd.exe /C 'vcvarsall.bat x86 && nmake OPTS=symbols,threads -f makefile.vc test' + - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=symbols,threads' '-f' makefile.vc all tcltest + - cmd.exe //C vcvarsall.bat x86 '&&' nmake 'OPTS=symbols,threads' '-f' makefile.vc test # Test on Windows with GCC native - name: "Windows/GCC/Shared" os: windows -- cgit v0.12 From 471091f55ae64b4d82644288198e183d8a1865c5 Mon Sep 17 00:00:00 2001 From: sebres Date: Mon, 17 Feb 2020 14:50:45 +0000 Subject: windows: avoid create of legacy error-vars on init phase (in fresh created interpreter) - no tcl_pkgPath variable on windows --- library/init.tcl | 4 ++-- tests/init.test | 13 +++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/library/init.tcl b/library/init.tcl index eb6b04e..0a5e71b 100644 --- a/library/init.tcl +++ b/library/init.tcl @@ -57,13 +57,13 @@ namespace eval tcl { if {$Dir ni $::auto_path} { lappend ::auto_path $Dir } - catch { + if {[info exists ::tcl_pkgPath]} { catch { foreach Dir $::tcl_pkgPath { if {$Dir ni $::auto_path} { lappend ::auto_path $Dir } } - } + }} if {![interp issafe]} { variable Path [encoding dirs] diff --git a/tests/init.test b/tests/init.test index 07270e1..d56c72d 100644 --- a/tests/init.test +++ b/tests/init.test @@ -18,6 +18,19 @@ if {[lsearch [namespace children] ::tcltest] == -1} { # Clear out any namespaces called test_ns_* catch {namespace delete {*}[namespace children :: test_ns_*]} +test init-0.1 {no error on initialization phase (init.tcl)} -setup { + interp create slave +} -body { + slave eval { + list [set v [info exists ::errorInfo]] \ + [if {$v} {set ::errorInfo}] \ + [set v [info exists ::errorCode]] \ + [if {$v} {set ::errorCode}] + } +} -cleanup { + interp delete slave +} -result {0 {} 0 {}} + # Six cases - white box testing test init-1.1 {auto_qualify - absolute cmd - namespace} { -- cgit v0.12 From 1fb8e115c4cd0dc9a351e7a6e183f8956996117d Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 21 Feb 2020 08:46:15 +0000 Subject: Restore compatibility with older (mingw) Makefiles. Fix for [4b5deacc70]: undefined reference to `Tcl_SetStartupScript'. --- generic/tclMain.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/tclMain.c b/generic/tclMain.c index 08c1fe0..cef4543 100644 --- a/generic/tclMain.c +++ b/generic/tclMain.c @@ -117,7 +117,7 @@ static void Prompt(Tcl_Interp *interp, InteractiveState *isPtr); static void StdinProc(ClientData clientData, int mask); static void FreeMainInterp(ClientData clientData); -#if !defined(_WIN32) || defined(UNICODE) +#if !defined(_WIN32) || defined(UNICODE) && !defined(TCL_ASCII_MAIN) static Tcl_ThreadDataKey dataKey; /* -- cgit v0.12