diff options
-rw-r--r-- | .github/workflows/linux-build.yml | 45 | ||||
-rw-r--r-- | .github/workflows/mac-build.yml | 61 | ||||
-rw-r--r-- | .github/workflows/win-build.yml | 71 | ||||
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | library/dde/pkgIndex.tcl | 4 | ||||
-rw-r--r-- | library/reg/pkgIndex.tcl | 4 | ||||
-rw-r--r-- | tests/fileSystem.test | 2 | ||||
-rw-r--r-- | tests/winDde.test | 18 | ||||
-rw-r--r-- | win/Makefile.in | 4 | ||||
-rw-r--r-- | win/makefile.vc | 4 | ||||
-rw-r--r-- | win/tclAppInit.c | 4 |
11 files changed, 200 insertions, 21 deletions
diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml new file mode 100644 index 0000000..44a6332 --- /dev/null +++ b/.github/workflows/linux-build.yml @@ -0,0 +1,45 @@ +name: Linux +on: [push] +jobs: + gcc: + runs-on: ubuntu-latest + strategy: + matrix: + symbols: + - "no" + - "mem" + - "all" + defaults: + run: + shell: bash + working-directory: unix + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Configure (symbols=${{ matrix.symbols }}) + run: | + mkdir "${HOME}/install" + ./configure ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) + env: + CFGOPT: --enable-symbols=${{ matrix.symbols }} + - name: Prepare + run: touch tclStubInit.c + working-directory: generic + - name: Build + run: | + make all + - name: Build Test Harness + run: | + make tcltest + - name: Run Tests + run: | + make test + - name: Test-Drive Installation + run: | + make install + - name: Create Distribution Package + run: | + make dist + - name: Convert Documentation to HTML + run: | + make html-tcl diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml new file mode 100644 index 0000000..c3748c0 --- /dev/null +++ b/.github/workflows/mac-build.yml @@ -0,0 +1,61 @@ +name: macOS +on: [push] +jobs: + with-Xcode: + runs-on: macos-latest + defaults: + run: + shell: bash + working-directory: macosx + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Prepare + run: touch tclStubInit.c + working-directory: generic + - name: Build + run: make all + - name: Run Tests + run: make test styles=develop + env: + ERROR_ON_FAILURES: 1 + MAC_CI: 1 + Unix-like: + runs-on: macos-latest + strategy: + matrix: + symbols: + - "no" + - "mem" + dtrace: + - "no" + - "yes" + defaults: + run: + shell: bash + working-directory: unix + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Prepare + run: | + touch tclStubInit.c tclOOStubInit.c + mkdir "$HOME/install" + working-directory: generic + - name: Configure (symbols=${{ matrix.symbols }} dtrace=${{ matrix.dtrace }}) + # Note that macOS is always a 64 bit platform + run: ./configure --enable-64bit ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) + env: + CFGOPT: --enable-symbols=${{ matrix.symbols }} --enable-dtrace=${{ matrix.dtrace }} + - name: Build + run: | + make all tcltest + - name: Run Tests + run: | + make test + env: + ERROR_ON_FAILURES: 1 + MAC_CI: 1 + - name: Trial Installation + run: | + make install diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml new file mode 100644 index 0000000..6232788 --- /dev/null +++ b/.github/workflows/win-build.yml @@ -0,0 +1,71 @@ +name: Windows +on: [push] +jobs: + MSVC: + runs-on: windows-latest + defaults: + run: + shell: powershell + working-directory: win + # Using powershell means we need to explicitly stop on failure + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Init MSVC + uses: ilammy/msvc-dev-cmd@v1 + - name: Build + run: | + &nmake -f makefile.vc all + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + - name: Build Test Harness + run: | + &nmake -f makefile.vc tcltest + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + - name: Run Tests + run: | + &nmake -f makefile.vc test + if ($lastexitcode -ne 0) { + throw "nmake exit code: $lastexitcode" + } + env: + ERROR_ON_FAILURES: 1 + MSYS-gcc: + runs-on: windows-latest + defaults: + run: + shell: bash + working-directory: win + strategy: + matrix: + symbols: + - "no" + - "mem" + - "all" + # Using powershell means we need to explicitly stop on failure + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install MSYS2 and Make + run: choco install msys2 make + - name: Prepare + run: | + touch tclStubInit.c + mkdir "${HOME}/install" + working-directory: generic + - name: Configure (symbols=${{ matrix.symbols }}) + run: | + ./configure ${CFGOPT} "--prefix=$HOME/install" || (cat config.log && exit 1) + env: + CFGOPT: --enable-64bit --enable-symbols=${{ matrix.symbols }} + - name: Build + run: make all + - name: Build Test Harness + run: make tcltest + - name: Run Tests + run: make test + env: + ERROR_ON_FAILURES: 1 @@ -5,7 +5,9 @@ This is the **Tcl 8.5.19** source distribution. You can get any source release of Tcl from [our distribution site](https://sourceforge.net/projects/tcl/files/Tcl/). -[![Build Status](https://travis-ci.org/tcltk/tcl.svg?branch=core-8-5-branch)](https://travis-ci.org/tcltk/tcl) +[![Build Status](https://github.com/tcltk/tcl/workflows/Linux/badge.svg?branch=core-8-5-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Linux%22+branch%3Acore-8-5-branch) +[![Build Status](https://github.com/tcltk/tcl/workflows/Windows/badge.svg?branch=core-8-5-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22Windows%22+branch%3Acore-8-5-branch) +[![Build Status](https://github.com/tcltk/tcl/workflows/macOS/badge.svg?branch=core-8-5-branch)](https://github.com/tcltk/tcl/actions?query=workflow%3A%22macOS%22+branch%3Acore-8-5-branch) ## Contents 1. [Introduction](#intro) diff --git a/library/dde/pkgIndex.tcl b/library/dde/pkgIndex.tcl index b7187c0..1ca9c5a 100644 --- a/library/dde/pkgIndex.tcl +++ b/library/dde/pkgIndex.tcl @@ -1,7 +1,7 @@ if {![package vsatisfies [package provide Tcl] 8.5]} return if {[info sharedlibextension] != ".dll"} return if {[::tcl::pkgconfig get debug]} { - package ifneeded dde 1.4.3 [list load [file join $dir tcldde14g.dll] dde] + package ifneeded dde 1.4.3 [list load [file join $dir tcldde14g.dll] Dde] } else { - package ifneeded dde 1.4.3 [list load [file join $dir tcldde14.dll] dde] + package ifneeded dde 1.4.3 [list load [file join $dir tcldde14.dll] Dde] } diff --git a/library/reg/pkgIndex.tcl b/library/reg/pkgIndex.tcl index f2fb3b7..6603e3e 100644 --- a/library/reg/pkgIndex.tcl +++ b/library/reg/pkgIndex.tcl @@ -2,8 +2,8 @@ if {![package vsatisfies [package provide Tcl] 8.5]} return if {[info sharedlibextension] != ".dll"} return if {[::tcl::pkgconfig get debug]} { package ifneeded registry 1.3.5 \ - [list load [file join $dir tclreg13g.dll] registry] + [list load [file join $dir tclreg13g.dll] Registry] } else { package ifneeded registry 1.3.5 \ - [list load [file join $dir tclreg13.dll] registry] + [list load [file join $dir tclreg13.dll] Registry] } diff --git a/tests/fileSystem.test b/tests/fileSystem.test index e6ac9c5..35f2717 100644 --- a/tests/fileSystem.test +++ b/tests/fileSystem.test @@ -760,7 +760,7 @@ test filesystem-7.1 {load from vfs} {win testsimplefilesystem haveDdeDll} { set dde [lindex [glob *dde*[info sharedlib]] 0] testsimplefilesystem 1 # This loads dde via a complex copy-to-temp operation - load simplefs:/$dde dde + load simplefs:/$dde Dde testsimplefilesystem 0 cd $dir set res "ok" diff --git a/tests/winDde.test b/tests/winDde.test index acba304..063edd0 100644 --- a/tests/winDde.test +++ b/tests/winDde.test @@ -10,7 +10,7 @@ # of this file, and for a DISCLAIMER OF ALL WARRANTIES. if {"::tcltest" ni [namespace children]} { - package require tcltest 2 + package require tcltest 2.5 #tcltest::configure -verbose {pass start} namespace import -force ::tcltest::* } @@ -21,7 +21,7 @@ if {[testConstraint win]} { if {![catch { ::tcltest::loadTestedCommands set ::ddever [package require dde 1.4.3] - set ::ddelib [lindex [package ifneeded dde $::ddever] 1]}]} { + set ::ddelib [info loaded "" Dde]}]} { testConstraint dde 1 } } @@ -38,12 +38,12 @@ proc createChildProcess {ddeServerName args} { set f [open $::scriptName w+] puts $f [list set ddeServerName $ddeServerName] - puts $f [list load $::ddelib dde] + puts $f [list load $::ddelib Dde] puts $f { # DDE child server - # if {"::tcltest" ni [namespace children]} { - package require tcltest + package require tcltest 2.5 namespace import -force ::tcltest::* } @@ -111,7 +111,7 @@ test winDde-1.1 {Settings the server's topic name} -constraints dde -body { } -result {foobar foobar self} test winDde-2.1 {Checking for other services} -constraints dde -body { - expr [llength [dde services {} {}]] >= 0 + expr {[llength [dde services {} {}]] >= 0} } -result 1 test winDde-2.2 {Checking for existence, with service and topic specified} \ -constraints dde -body { @@ -119,11 +119,11 @@ test winDde-2.2 {Checking for existence, with service and topic specified} \ } -result 1 test winDde-2.3 {Checking for existence, with only the service specified} \ -constraints dde -body { - expr [llength [dde services TclEval {}]] >= 1 + expr {[llength [dde services TclEval {}]] >= 1} } -result 1 test winDde-2.4 {Checking for existence, with only the topic specified} \ -constraints dde -body { - expr [llength [dde services {} self]] >= 1 + expr {[llength [dde services {} self]] >= 1} } -result 1 # ------------------------------------------------------------------------- @@ -154,8 +154,8 @@ test winDde-3.5 {DDE request locally} -constraints dde -body { dde request -binary TclEval self \xe1 } -result "foo\x00" # Set variable a to A with diaeresis (unicode C4) by relying on the fact -# that utf8 is sent (e.g. "c3 84" on the wire) -test winDde-3.6 {DDE request utf8} -constraints dde -body { +# that utf-8 is sent (e.g. "c3 84" on the wire) +test winDde-3.6 {DDE request utf-8} -constraints dde -body { set \xe1 "not set" dde execute TclEval self "set \xe1 \xc4" scan [set \xe1] %c diff --git a/win/Makefile.in b/win/Makefile.in index 324d917..8835232 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -148,8 +148,8 @@ REG_DLL_FILE = tclreg$(REGVER)${DLLSUFFIX} REG_LIB_FILE = @LIBPREFIX@tclreg$(REGVER)${DLLSUFFIX}${LIBSUFFIX} TEST_EXE_FILE = tcltest${EXESUFFIX} TEST_LIB_FILE = @LIBPREFIX@tcltest$(VER)${DLLSUFFIX}${LIBSUFFIX} -TEST_LOAD_PRMS = package ifneeded dde 1.4.3 [list load [file normalize ${DDE_DLL_FILE}] dde];\ - package ifneeded registry 1.3.5 [list load [file normalize ${REG_DLL_FILE}] registry] +TEST_LOAD_PRMS = package ifneeded dde 1.4.3 [list load [file normalize ${DDE_DLL_FILE}] Dde];\ + package ifneeded registry 1.3.5 [list load [file normalize ${REG_DLL_FILE}] Registry] TEST_LOAD_FACILITIES = $(TEST_LOAD_PRMS) SHARED_LIBRARIES = $(TCL_DLL_FILE) diff --git a/win/makefile.vc b/win/makefile.vc index 1924e33..f8ac7e2 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -540,8 +540,8 @@ test-core: setup $(TCLTEST) dlls $(CAT32) set TCL_LIBRARY=$(ROOT:\=/)/library
!if "$(OS)" == "Windows_NT" || "$(MSVCDIR)" == "IDE"
$(DEBUGGER) $(TCLTEST) "$(ROOT:\=/)/tests/all.tcl" $(TESTFLAGS) -loadfile <<
- package ifneeded dde 1.4.3 [list load "$(TCLDDELIB:\=/)" dde]
- package ifneeded registry 1.3.5 [list load "$(TCLREGLIB:\=/)" registry]
+ package ifneeded dde 1.4.3 [list load "$(TCLDDELIB:\=/)" Dde]
+ package ifneeded registry 1.3.5 [list load "$(TCLREGLIB:\=/)" Registry]
<<
!else
@echo Please wait while the tests are collected...
diff --git a/win/tclAppInit.c b/win/tclAppInit.c index 251a610..b63a405 100644 --- a/win/tclAppInit.c +++ b/win/tclAppInit.c @@ -154,12 +154,12 @@ Tcl_AppInit( if (Registry_Init(interp) == TCL_ERROR) { return TCL_ERROR; } - Tcl_StaticPackage(interp, "registry", Registry_Init, NULL); + Tcl_StaticPackage(interp, "Registry", Registry_Init, NULL); if (Dde_Init(interp) == TCL_ERROR) { return TCL_ERROR; } - Tcl_StaticPackage(interp, "dde", Dde_Init, Dde_SafeInit); + Tcl_StaticPackage(interp, "Dde", Dde_Init, Dde_SafeInit); } #endif |