Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Make redis test suite tcl version agnostic #877

wants to merge 2 commits into


None yet
5 participants

jbergstroem commented Jan 13, 2013

Just ran the test suite against tcl 8.6.0, which worked nicely. The test suite currently uses tclsh8.5 everywhere, so I made calls to tclsh instead. Since there's currently a 8.5 requirement, I added a check for that.


badboy commented Jan 13, 2013


djc commented Jan 13, 2013


bwright commented Jan 20, 2013

Seems like a great commit! +1


jbergstroem commented Jan 23, 2013

I haven't checked around much, but there might be issues with tcl installs where tclsh isn't a symlink to the proper version. I'll have a look at freebsd, openbsd and smartos tomorrow.


antirez commented Jan 23, 2013

Thanks, seems like a good idea if it works well everywhere.

Probably it's worth to catch "package require Tcl 8.5" and in case of errors properly format an error message where the user is told that to run the Redis test at least Tcl 8.5 is required.



jbergstroem commented Jan 23, 2013

@antirez: On catching tcl 8.5, I thought the error tcl gave you was pretty clear (never mind version numbers):

# make test
cd src && make test
make[1]: Entering directory `/home/jbergstroem/redis/src'
version conflict for package "Tcl": have 8.6.0, need 8.7
    while executing
"package require Tcl 8.7"
    (file "tests/test_helper.tcl" line 5)
make[1]: *** [test] Error 1

As for tclsh over tcl<version>, the results are pretty disappointing:

OS tcl version tclsh
smartos 8.4 YES
openbsd 5.2 8.5 NO
ubuntu 12.10 8.5 YES
freebsd 9.1 8.5 NO

There doesn't seem to be a good way to carry a patch that uses tclsh. We probably want to use which/et al from shell and perhaps communicating to tcl with ENV. If others agree, I'll whip something together.


jbergstroem commented Jan 23, 2013

Being too impatient, I went ahead and did above changes. Overall, I think its a better approach.

@antirez: I still think the tclsh version feedback is good as-is. Let me know if I should give it some more love. The shell script will also give further feedback before entering tcl.

See #906 for new branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment