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
Hello all,
Moving this question from
https://gitlab.common-lisp.net/asdf/asdf/-/issues/52
To reiterate, I believe that the instructions in
https://common-lisp.net/project/asdf/asdf/Upgrading-ASDF.html 'Upgrading
ASDF' could use some clarification.
I am attempting to run a newer version of ASDF than that provided by my
impl. The text I'm having issue with is:
> If your implementation already provides ASDF 3 or later (and it should),
but you want a more recent ASDF version than your implementation provides,
then you just need to ensure the more recent ASDF is installed in a
configured path, like any other system. We recommend you download an
official tarball or checkout a release from git into ~/common-lisp/asdf/.
> Once the source code for ASDF is installed, you don’t need any extra step
to load it beyond the usual (require "asdf"): ASDF 3 will automatically
look whether an updated version of itself is available amongst the
regularly configured systems, before it compiles anything else.
First, it says I should download an official tarball. I looked to the best
of my ability and could not find one. Even if I had found one, I don't know
what I'd do with it.
So I moved to the second option and cloned ASDF to `~/common-lisp/asdf/`
and built it successfully.
I verify that indeed I am running a newer ASDF. However, I noticed
`~/comon-lisp/asdf/ext/` includes certain third-party libraries bundled in
the repo. These are being prioritized over Quicklisp libraries, and it's
causing conflicts.
So my question is:
May I get clarification on how I may build & install ASDF such that the
implementation-bundled one will automatically find the newer version, while
omitting the libraries ext/ directory from being picked up?
Thanks all!
--
Wilfredo Velázquez-Rodríguez
Hi!
I'd like to run a "sudo" command from Common Lisp. The following works:
--8<---------------cut here---------------start------------->8---
(uiop:launch-program '("sudo" "-S" "ls" "/root") :input :stream :output *standard-output*)
(format (uiop:process-info-input #v1) "MY-PASSWORD~%")
(finish-output (uiop:process-info-input #v1))
--8<---------------cut here---------------end--------------->8---
Note that I'm using the "-S" parameter of sudo. From the man page:
> Write the prompt to the standard error and read the password
> from the standard input instead of using the terminal device.
Without it, "sudo" terminate immediately.
Somehow, Emacs _does_ support calling the sudo process without the "-S"
flag. Try this:
--8<---------------cut here---------------start------------->8---
(make-process :name "dummy" :command '("sudo" "ls" "/root"))
--8<---------------cut here---------------end--------------->8---
and the "sudo" process is kindly waiting for input in the background.
Any idea why that is?
Is it be possible to do the same in Common Lisp?
Cheers!
--
Pierre Neidhardt
https://ambrevar.xyz/