Ross Berteig wrote:
I think this is a remnant of history. Once upon a time, the tests were
expected to be run with "make test" in the build directory. The block in
src/main.mk that implements the test target has a very scary warning
about running the tests tainting the repository so discard it when done.
A number of the test cases really did require that the run from within
not just some checkout, but a checkout of fossil's own repository.

At some point, the test case implementation style began a slow shift
towards independence of the main fossil repository, and that is likely
when this fragment was introduced.

When I began poking at the test framework recently, most cases were
independent of the fossil checkout and tree. But there were a few
lingering cases that needed the checkout. Those got fixed so that the
entire test suite can (and really should) run from outside fossil
checkout, and the remaining *very few* cases that need the checkout
follow the path to tester.tcl to find it and are bound to make no
changes to it.

Ah. I've always run tester.tcl directly and didn't even think of make test. Thanks for enlightening me!

That does seem sane. Assuming tester.tcl also guards against being run
in the test folder (which it really should do) then just using the name
of the test file would be a simple change. So it would run amend.test in
a folder named amend.test.

It would also be trivial to add a suffix. The '#' looks ugly, but is
legal in file names on Unix, OSX, and Windows. There may be safer
characters to pick as well.

Just using the full filename was something I considered and would be fine with. The ugly suffix is just an option to make it even less likely to clash with an existing directory.

Thanks for the info, Ross!

_______________________________________________
fossil-dev mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/fossil-dev

Reply via email to