Skip to content
  • Sponsor exercism/common-lisp

  • Notifications You must be signed in to change notification settings
  • Fork 84

Commit b49abd6

Browse files
authoredNov 16, 2023
Incorporate Roswell
<ul dir="auto"> <li>INSTALLATION and TESTS docs updated.</li> <li>exercises/shared/.docs/tests.md updated (used to create HELP.md for downloads)</li> <li>Updated exercise generator script to create test launcher scripts.</li> <li>Added launcher scripts to all exercises</li> </ul> <p dir="auto">You might want to review this by commit, the "Add launcher scripts to all exercises" commit is large and repetitive.</p> <p dir="auto"><span class="issue-keyword tooltipped tooltipped-se" aria-label="This pull request closes issue #759.">Closes</span> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1967070272" data-permission-text="Title is private" data-url="#759" data-hovercard-type="issue" data-hovercard-url="//issues/759/hovercard" href="https://github.com/exercism/common-lisp/issues/759">#759</a></p>
1 parent bd90953 commit b49abd6

File tree

3 files changed

+53
-14
lines changed

3 files changed

+53
-14
lines changed
 

‎docs/INSTALLATION.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,37 @@ The basic items needed for developing in Common Lisp are:
88
- A Text editor with facilities for Lisp code.
99
- (Nice to have) The often-used reference for the Common Lisp language, the ["Common Lisp Hyperspec"][hyperspec].
1010

11-
## Fast Start
11+
## Roswell
12+
13+
[Roswell][roswell] is a command to install and manage Common Lisp implementations, and many features to make developing and distrubuting Lisp applications easy.
14+
We're using it to simplify the install and testing steps.
15+
16+
### Install Roswell
17+
18+
See the [Installation Guide][ros-inst] and follow the instructions for your platform.
19+
For most users, the following will be sufficient:
20+
21+
* For MacOS and Linux, [Homebrew][brew] makes this simple:
22+
```sh
23+
brew install roswell
24+
```
25+
* For Windows, use [Scoop][scoop]:
26+
```powershell
27+
scoop install roswell
28+
```
29+
30+
The first time you use Roswell, it will fetch and install SBCL and Quicklisp.
31+
Just run this:
32+
```sh
33+
ros help
34+
```
35+
36+
Enter the REPL with
37+
```sh
38+
ros run
39+
```
40+
41+
## Configure your text editor
1242

1343
For people new to Common Lisp, particularly ones with previous experience with Emacs, can get an easy & quick start by installing [Portacle, the Portable Common Lisp Environment][portacle].
1444
Free and full featured, it works in all common platforms and comes preconfigured "out of the box". This will supply:
@@ -47,3 +77,7 @@ If you prefer installing the needed tools separately you will need to install an
4777
[vim]: https://www.google.com/search?q=vim
4878
[vscode-plugin]: https://marketplace.visualstudio.com/items?itemName=ailisp.commonlisp-vscode
4979
[vscode]:https://code.visualstudio.com
80+
[roswell]: https://roswell.github.io/
81+
[ros-inst]: https://github.com/roswell/roswell/wiki/Installation
82+
[brew]: https://brew.sh/
83+
[scoop]: https://scoop.sh/

‎docs/TESTS.md

+8-13
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Tests
22

3+
## Testing interactively
4+
35
Start up your Common Lisp implementation in the directory of the exercise you are working on (or change the current directory for an already running Common Lisp implementation to that directory).
6+
Using roswell, do this with `ros run`.
47

5-
(All examples here assume an exercise called `exercise-name` - adjust s needed.)
8+
(All examples here assume an exercise called `exercise-name` - adjust as needed.)
69

710
Load the test file into your running Lisp implementation, for example, `(load "exercise-name-test")`.
811
(This will also load the solution file for you.)
@@ -14,19 +17,11 @@ Remember to evaluate `(exercise-name-test:run-tests)` to re-run the tests after
1417

1518
## Testing from the command line
1619

17-
Executing the tests from the command line is possible, but it depends on which Common Lisp implementation you have chosen.
18-
For example, with SBCL you could execute this in the directory for exercise "foo"
20+
You can launch the tests with this command line invocation (again, replace "exercise" with the appropriate name in two places)
1921

2022
```sh
21-
sbcl --noinform \
22-
--load foo-test \
23-
--eval '(exit :code (if (foo-test:run-tests) 0 1))'
23+
ros run --load exercise-test.lisp --eval '(uiop:quit (if (exercise-test:run-tests) 0 1))'
2424
```
2525

26-
Other Common Lisp implementations will have similar but slightly different command-line options and exit commands.
27-
28-
This assumes you have already installed SBCL and Quicklisp.
29-
See [Installing Common Lisp locally](https://exercism.org/docs/tracks/common-lisp/installation)
30-
31-
That command is somewhat unwieldy.
32-
A method to wrap that into the `exercism` CLI is [shown here](https://glennj.github.io/exercism/cli).
26+
That command is pretty unwieldy.
27+
A contributor has written some notes about [how to make it easier to invoke](https://glennj.github.io/exercism/cli).

‎exercises/shared/.docs/tests.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,19 @@
11
# Tests
22

3+
## Testing interactively
4+
35
Start the REPL from the directory that you downloaded the exercise to.
46

57
You can run the tests by loading the test file into the REPL with `(load "exercise-test")` (replacing "exercise" with appropriate name). Then evaluate `(exercise-test:run-tests)` to run all the tests.
68

79
If you write your code directly in the REPL then simply evaluate `(exercise-test:run-tests)`.
810

911
If you write your code in the exercise lisp file then load it with `(load "exercise")` then evaluate `(exercise-test:run-tests)`.
12+
13+
## Testing from the command line
14+
15+
You can launch the tests with this command line invocation (again, replace "exercise" with the appropriate name in two places)
16+
17+
```sh
18+
ros run --load exercise-test.lisp --eval '(uiop:quit (if (exercise-test:run-tests) 0 1))'
19+
```

0 commit comments

Comments
 (0)
Please sign in to comment.