Test file error: can't find package tcltests
This was reported to Fedora downstream as:
https://bugzilla.redhat.com/show_bug.cgi?id=1833701
There is the following error during the build when running internal tests:
env.test
Test file error: can't find package tcltests
while executing
"package require tcltests"
(file "/tmp/B.C57E02/BUILD/tcl8.6.9/tests/env.test" line 19)
In Fedora we fixed it by the following patch:
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 99bdf05..0b2f660 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -788,7 +788,7 @@ topDirName:
# This keeps tcltest from picking up an already installed version of the Tcl
# library.
SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \
- TCLLIBPATH="@abs_builddir@/pkgs" \
+ TCLLIBPATH="@abs_builddir@/pkgs @abs_builddir@/../tests" \
TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"
${TCLTEST_EXE}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST}
Well, the fedora version of Tcl 8.6 makes modifications to init.tcl, I duplicated this modification here: https://core.tcl-lang.org/tcl/fdiff?v1=af164e8d04f43d39&v2=d16b5889fb8d2ae3. What this fedora's patch is doing is make sure that Tcl cannot find its packages any more in all directories it's expecting to. The Travis build shows that this fedora's patch is what making the internal test-cases fail.
The additional patch you are proposing might well correct this problem for fedora, making the internal test-cases work again. But it's not appropriate upstream, because the unmodified Tcl code, without the other fedora patches, don't show the problem you are reporting here.
Sorry! But I have no other choice to mark this ticket as 'Invalid'. But - of course - feel free to use this patch for fedora's modified code: Fedora has the right to modify Tcl's package layout for its own distribution. And if this modification makes the internal test-cases fail, Fedora has the right to modify the test environment to make them pass again.... ;-) No hard feelings ...