CI-Utils icon indicating copy to clipboard operation
CI-Utils copied to clipboard

Feature Request: Way to run run-fiveam without roswell

Open jgarte opened this issue 2 years ago • 2 comments

Hi,

Is there currently a way to install run-fiveam without using roswell?

jgarte avatar Dec 12 '23 03:12 jgarte

I think it is convoluted to "install" this script without roswell, since we can already run fiveam tests without Roswell, all this script does is make it easier, but yes we can, by copying the script and replacing the shebang line to

#!/usr/bin/sbcl --script

and by calling (main (uiop:command-line-arguments)) at the end. Or something like that.

BTW, the bulk of the script is:

  • quickload a project and its dependencies
  • run fiveam, if tests fail quit with error status of 1 (indicating error to the shell, hence the CI)
(unless (fiveam:run! (mapcar 'read-from-string tests))
          (uiop:quit 1))

It is "simple" but oh boy it was hard to understand for me when starting out.

my 2c! Best,

vindarel avatar Dec 15 '23 23:12 vindarel

@vindarel summarized things well. Without Roswell, you have to ensure that Quicklisp is installed, figure out the command line arguments for your implementation, deal with your PATH, etc. Given the time I've had for hobby-programming recently, I don't want to take on implementing & supporting a robust, general-purpose, Roswell-free version of this script.

For converting the Roswell script to SBCL, I wouldn't recommend using the --script option, since it doesn't load your init file which is where Quicklisp is normally loaded.

You can script the conversion to SBCL-specific usage as

$ tail -n +2 run-fiveam.ros > run-fiveam.sbcl
$ echo "(apply #'ros.script.run-fiveam::main (uiop:command-line-arguments)) (uiop:quit 0)" >> run-fiveam.sbcl

Then (if your userinit script includes quicklisp), you should be able to run in from the command line as

$ sbcl --noinform --disable-debugger --load run-fiveam.sbcl $(SCRIPT_ARGUMENTS)

(I think there are someother arguments to disable, e.g., the low-level debugger, if you're going to use this for CI purposes.)

neil-lindquist avatar Dec 16 '23 02:12 neil-lindquist