Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Way to run run-fiveam without roswell #10

Open
jgarte opened this issue Dec 12, 2023 · 2 comments
Open

Feature Request: Way to run run-fiveam without roswell #10

jgarte opened this issue Dec 12, 2023 · 2 comments

Comments

@jgarte
Copy link

jgarte commented Dec 12, 2023

Hi,

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

@jgarte jgarte changed the title Way to run run-fiveam without roswell Feature Request: Way to run run-fiveam without roswell Dec 12, 2023
@vindarel
Copy link

vindarel commented Dec 15, 2023

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,

@neil-lindquist
Copy link
Owner

@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.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants