Tcl Source Code

Check-in [b37177d47b]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Alternative: use tcl::test::build-info in stead of tcl::build-info
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | core-apn-build-info-nozipfs | apn-build-info-nozipfs-alt
Files: files | file ages | folders
SHA3-256: b37177d47b6d58694bf794d53b99a8e5ef8e84eb21be40bafbcf7b105d12c4e0
User & Date: jan.nijtmans 2025-08-11 19:30:43.779
Context
2025-08-11
19:30
Alternative: use tcl::test::build-info in stead of tcl::build-info Closed-Leaf check-in: b37177d47b user: jan.nijtmans tags: core-apn-build-info-nozipfs, apn-build-info-nozipfs-alt
2025-08-07
17:04
Add test to detect zipfs build errors Closed-Leaf check-in: 011bd6147b user: apnadkarni tags: apn-build-info-nozipfs
Changes
Unified Diff Ignore Whitespace Patch
Changes to generic/tclEvent.c.
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
#endif
#ifdef PURIFY
	    ".purify"
#endif
#ifdef STATIC_BUILD
	    ".static"
#endif
#if !(defined(ZIPFS_BUILD) && ZIPFS_BUILD)
	    ".no-zipfs"
#endif
#ifndef TCL_WITH_EXTERNAL_TOMMATH
	    ".tommath-0103"
#endif
#ifdef TCL_WITH_INTERNAL_ZLIB
	    ".zlib-"
#if ZLIB_VER_MAJOR < 10
	    "0"







<
<
<







1098
1099
1100
1101
1102
1103
1104



1105
1106
1107
1108
1109
1110
1111
#endif
#ifdef PURIFY
	    ".purify"
#endif
#ifdef STATIC_BUILD
	    ".static"
#endif



#ifndef TCL_WITH_EXTERNAL_TOMMATH
	    ".tommath-0103"
#endif
#ifdef TCL_WITH_INTERNAL_ZLIB
	    ".zlib-"
#if ZLIB_VER_MAJOR < 10
	    "0"
Changes to generic/tclTest.c.
497
498
499
500
501
502
503



504
505
506
507
508
509
510
	    ".no-deprecate"
#endif
#if !TCL_THREADS
	    ".no-thread"
#endif
#ifndef TCL_CFG_OPTIMIZED
	    ".no-optimize"



#endif
#ifdef __OBJC__
	    ".objective-c"
#if defined(__cplusplus)
	    "plusplus"
#endif
#endif







>
>
>







497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
	    ".no-deprecate"
#endif
#if !TCL_THREADS
	    ".no-thread"
#endif
#ifndef TCL_CFG_OPTIMIZED
	    ".no-optimize"
#endif
#if !(defined(ZIPFS_BUILD) && ZIPFS_BUILD)
	    ".no-zipfs"
#endif
#ifdef __OBJC__
	    ".objective-c"
#if defined(__cplusplus)
	    "plusplus"
#endif
#endif
Changes to tests/zipfs.test.
12
13
14
15
16
17
18



19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#

if {"::tcltest" ni [namespace children]} {
    package require tcltest 2.5
    namespace import -force ::tcltest::*
}



source [file join [file dirname [info script]] tcltests.tcl]

testConstraint zipfs [expr {[llength [info commands zipfs]]}]
testConstraint thread [expr {0 == [catch {package require Thread 2.8-}]}]


set ziproot [zipfs root]
set CWD [pwd]
set tmpdir  [file join $CWD tmp]
file mkdir $tmpdir

test zipfs-0.1 {zipfs basics} -constraints zipfs -body {
    expr {${ziproot} in [file volumes]}
} -result 1

if {[::tcl::build-info no-zipfs]} {
	# Tcl library is not embedded in zipfs volume
    set zipLibTop ""
} else {
    testConstraint zipfslib 1
    if {![string match [zipfs root]* $tcl_library]} {
	    error "Build indicates embedded tcl library in zipfs but tcl_library points to $tcl_library"
	}







>
>
>















|







12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
# this file, and for a DISCLAIMER OF ALL WARRANTIES.
#

if {"::tcltest" ni [namespace children]} {
    package require tcltest 2.5
    namespace import -force ::tcltest::*
}
::tcltest::loadTestedCommands
catch [list package require -exact tcl::test [info patchlevel]]

source [file join [file dirname [info script]] tcltests.tcl]

testConstraint zipfs [expr {[llength [info commands zipfs]]}]
testConstraint thread [expr {0 == [catch {package require Thread 2.8-}]}]


set ziproot [zipfs root]
set CWD [pwd]
set tmpdir  [file join $CWD tmp]
file mkdir $tmpdir

test zipfs-0.1 {zipfs basics} -constraints zipfs -body {
    expr {${ziproot} in [file volumes]}
} -result 1

if {![llength [info commands ::tcl::test::build-info]] || [::tcl::test::build-info no-zipfs]} {
	# Tcl library is not embedded in zipfs volume
    set zipLibTop ""
} else {
    testConstraint zipfslib 1
    if {![string match [zipfs root]* $tcl_library]} {
	    error "Build indicates embedded tcl library in zipfs but tcl_library points to $tcl_library"
	}