Hello!
I recently wrote a script to run FiveAM tests for one of my
libraries on many different implementations on your own machine:
https://gitlab.common-lisp.net/uri-template/uri-template2/blob/master/run-t…
It would be really nice if I did not have to copy-paste that script
to my other libraries, and instead could contribute a generalized
version to Roswell (on which the script is based) and have it work
for any project using any test library.
What I would like to be able to do, for any system:
(handler-case (asdf:test-system "system")
(asdf:test-op-test-failure (condition)
(princ condition uiop:*stderr*)
(uiop:quit 1)))
The attached patch adds an ASDF:TEST-OP-TEST-FAILURE condition that
test libraries can inherit from. I also added the necessary
functionality to FiveAM:
https://github.com/sionescu/fiveam/pull/58
It should be easy to add similar functionality to other testing
libraries. This will make test automation trivial, with few, if any,
changes required to systems that use ASDF and the testing libraries.
One thing I would like to discuss is which condition
ASDF:TEST-OP-TEST-FAILURE should inherit from. It definitely should
not be ERROR - there is no error in test-op, or in running the tests;
test failures are a regular and expected occurrence of running tests.
Also problematic is widespread abuse of HANDLER-CASE to catch any
ERROR; I am afraid if signaled from popular test libraries it would
break someone's test running code somewhere. WARNING seems like a
nice parent condition, but maybe having ASDF:TEST-OP-TEST-FAILURE
inherit from CONDITION is a better idea. Thoughts?
Vladimir
Hi all,
Would anybody be willing to help me with the clfs package I have
written? The package defines contracts for all Common Lisp and UIOP
file system operations and can run random tests with them. I would
like to see what the random testing does on different combinations
of lisp implementations and file systems, and if implementation
independent contracts are feasible.
If the package works across implementations then the contracts can
help testing uiop and also each implementation's conformance to the
hyperspec. The problem is of course that the operations are not
defined that precisely, but results so far seem promising. I have run
the tests on Linux and Windows for sbcl and ccl. At this point there
are some edge cases left, but the general concept seems to work without
too many implementation specific details in the contracts.
The package can be found at https://github.com/lisper99/clfs. To run
the test you have to load the clfs-test package, create an empty
directory somewhere and call function clfs-test:test-contracts with
the directory as argument.
Any feedback or suggestions is appreciated.
Paul Griffioen