├── LICENSE ├── README.md ├── cookiecutter.json ├── hooks └── post_gen_project.py └── {{cookiecutter.repo_name}} ├── .gitignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── roswell ├── README.md └── {{cookiecutter.project_name}}.ros ├── run-tests.lisp ├── run.lisp ├── src ├── packages.lisp └── {{cookiecutter.project_name}}.lisp ├── tests ├── packages.lisp └── test-{{cookiecutter.project_name}}.lisp ├── {{cookiecutter.project_name}}-tests.asd └── {{cookiecutter.project_name}}.asd /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2017, Hilton Bristow 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, this 8 | list of conditions and the following disclaimer. 9 | 10 | * Redistributions in binary form must reproduce the above copyright notice, 11 | this list of conditions and the following disclaimer in the documentation 12 | and/or other materials provided with the distribution. 13 | 14 | * Neither the name of the copyright holder nor the names of its 15 | contributors may be used to endorse or promote products derived from 16 | this software without specific prior written permission. 17 | 18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 21 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 22 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 23 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 24 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 25 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 26 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # cl-cookieproject 2 | 3 | A [cookiecutter](https://github.com/audreyr/cookiecutter) template for Common Lisp projects featuring: 4 | 5 | - Canonical Common Lisp project structure, a ready-to-use project with an entry point and unit tests. 6 | - Run project from sources 7 | - Build a binary 8 | - and choose your Lisp implementation 9 | - Test suite using [Fiveam](https://common-lisp.net/project/fiveam/docs/) 10 | - a [travis](https://travis-ci.org/) CI configuration file (untested) 11 | - [Roswell](https://github.com/roswell/roswell/) recipe to build, install and share a binary 12 | - example use of command line arguments 13 | (`uiop:command-line-arguments`). Proper parsing is left to do with a 14 | third-party library ([clingon](https://github.com/dnaeon/clingon), unix-opts, defmain, adopt…). 15 | 16 | We are also shaping out a template for a web project, see [cl-cookieweb](https://github.com/vindarel/cl-cookieweb). 17 | 18 | NEW! 🎥 See our demo video: https://www.youtube.com/watch?v=XFc513MJjos 19 | 20 | ## Usage 21 | 22 | Create a new project. You'll be prompted to provide some basic 23 | information about your new project, which will then be auto-generated 24 | in the current working directory: 25 | 26 | ```bash 27 | $ pip install cookiecutter 28 | $ cookiecutter https://github.com/vindarel/cl-cookieproject 29 | project_name [cookie-lisp-project]: 30 | repo_name [cookie-lisp-project]: 31 | description []: A test project 32 | version [0.0.1]: 33 | year [1984]: 34 | author [CL User]: me 35 | email [me@mail.com]: 36 | username [me]: 37 | Initialised empty Git repository in /home/vince/bacasable/lisp-projects/cookie-lisp-project/.git/ 38 | ``` 39 | 40 | Run it straight away: 41 | 42 | ```bash 43 | $ cd cookie-lisp-project 44 | $ sudo apt install rlwrap # a utility to bring readline keybindings and history to SBCL on the terminal. 45 | $ make run 46 | rlwrap sbcl --load run.lisp 47 | This is SBCL 2.0.10, an implementation of ANSI Common Lisp. 48 | More information about SBCL is available at . 49 | 50 | SBCL is free software, provided as is, with absolutely no warranty. 51 | It is mostly in the public domain; some portions are provided under 52 | BSD-style licenses. See the CREDITS and COPYING files in the 53 | distribution for more information. 54 | To load "cffi": 55 | Load 1 ASDF system: 56 | cffi 57 | ; Loading "cffi" 58 | . 59 | To load "cookie-lisp-project": 60 | Load 1 ASDF system: 61 | cookie-lisp-project 62 | ; Loading "cookie-lisp-project" 63 | [package cookie-lisp-project] 64 | Hello from cookie-lisp-project! 65 | * 66 | ``` 67 | 68 | You can see the `Hello` from the `main` function, and we are given a Lisp REPL. 69 | 70 | Build an executable: 71 | 72 | ```bash 73 | $ make build 74 | […] 75 | [saving current Lisp image into /home/vince/bacasable/lisp-projects/cookie-lisp-project/cookie-lisp-project: 76 | writing 0 bytes from the read-only space at 0x50000000 77 | writing 736 bytes from the static space at 0x50100000 78 | writing 37060608 bytes from the dynamic space at 0x1000000000 79 | writing 2154496 bytes from the immobile space at 0x50200000 80 | writing 13910016 bytes from the immobile space at 0x52000000 81 | done] 82 | 83 | $ ./cookie-lisp-project me 84 | Hello me from cookie-lisp-project! 85 | 86 | $ ./cookie-lisp-project -h 87 | Usage: 88 | 89 | cookie-lisp-project [name] 90 | ``` 91 | 92 | Build it with Roswell: 93 | 94 | ``` 95 | $ ros build roswell/cookie-lisp-project.ros 96 | ``` 97 | 98 | A binary is created in the `roswell` directory. 99 | 100 | Your users can install the application with: 101 | 102 | ``` 103 | $ ros install github_username/project_name 104 | ``` 105 | 106 | 107 | ### Cookiecutter options 108 | 109 | You can use command line options: https://cookiecutter.readthedocs.io/en/1.7.2/advanced/cli_options.html 110 | 111 | - `--no-input`: do not prompt for parameters and only use cookiecutter.json file content 112 | - ` --replay`: do not prompt for parameters and only use information entered previously 113 | - ` -f, --overwrite-if-exists`: overwrite the contents of the output directory if it already exists 114 | - ` -s, --skip-if-file-exists`: skip the files in the corresponding directories if they already exist 115 | - ` -o, --output-dir`: where to output the generated project dir into 116 | - ` --config-file`: user configuration file 117 | 118 | The first time you run `cookiecutter` with a link to a GitHub repository, the skeleton is saved under `~/.cookiecutters/`. You can run the command for the second time with only the skeleton name: 119 | 120 | cookiecutter cl-cookieproject 121 | 122 | 123 | ## TODOs 124 | 125 | - [ ] initialize a git repository 126 | - [ ] better guess the author 127 | - [ ] include a documentation system 128 | - [X] [web project skeleton](https://github.com/vindarel/cl-cookieweb) 129 | - [ ] more CI setup 130 | - [ ] build a .deb (and .rpm) 131 | 132 | 133 | ## See also 134 | 135 | - https://github.com/kjinho/cl-cookieproject/ (new) 136 | - a fork that uses Qlot for dependency management and ASDF package-inferred-system. 137 | 138 | and: 139 | 140 | - https://github.com/dnaeon/cl-skeleton 141 | - the newest of skeletons (late 2022), by an author with great contributed libraries. 142 | - an ASDF system, a test system, scripts for running the tests, Dockerfiles for ECL, CCL and SBCL implementations and Github Actions for building Docker images and running the test suite of the project. 143 | - just a shell script to fill-in the template files. 144 | - from what I see, the generated project is very simple, the .asd is barebones (no default op to build a binary with asdf:make for example). The value lies in the files around: the 3 little Dockerfiles (they use clfoundation's images, like I do for Gitlab CI), the script to run tests (they use `rove`, the script returns the correct error code). 145 | - https://github.com/fukamachi/cl-project 146 | - one-package per file style (called "modern" but I find it too cumbersome to use) 147 | - uses the Rove test system (and I think it is not ready, see [this discussion](https://github.com/LispCookbook/cl-cookbook/issues/297) and its own issues) 148 | - less integration (no recipe to build binaries, use CLI args or use Roswell). Pure CL, doesn't need Cookiecutter (Python). 149 | - https://github.com/triclops200/quickapp and [quickapp-cli](https://github.com/triclops200/quickapp-cli) 150 | - last commit 2016 / 2015 151 | - its `internal-quit` in app-utils.lisp should be `uiop:quit` 152 | - uses buildapp: kind of old and not needed now with `asdf:make` or Roswell? (proove me wrong) 153 | - includes an args parsing utility (it should probably use a more complete library though) 154 | - https://www.xach.com/lisp/quickproject/ 155 | - doesn't include a test definition 156 | - simple, nothing fancy. 157 | - https://github.com/40ants/cl-project-with-docs 158 | - uses Sphinx and reStructured text to render nice and readable HTML documentation. 159 | - automatic gh-pages 160 | - includes tests, CI (Travis), Roswell 161 | - needs Sphinx (Python) and cl-launch. 162 | - 2018: I suspect the author has now another favourite documentation generator (MGLPAX, 40ants/doc) and might not update much this skeleton. 163 | - https://github.com/40ants/project-templates : templates to create a CL library or a web app with Reblocks. 164 | - uses Quicklisp, Ultralisp, Qlot, CLPM, has Rove tests, has a GitHub CI, has docs (based on 40ants-doc). Based on the [mystic](https://github.com/roswell/mystic) templating system. 165 | - [Youtube demo](https://www.youtube.com/watch?v=lwcmOZ0DQf0) 166 | - created in 2023 167 | - as of writing, doesn't have a utility to quickly run the web app project from the terminal, but from the editor, so all in all maybe a bit hard to use for total beginners. Otherwise, it's a configuration totally worth checking out. 168 | 169 | --- 170 | 171 | Acknowledgement: we forked [cookiecutter-cl](https://github.com/hbristow/cookiecutter-cl). 172 | -------------------------------------------------------------------------------- /cookiecutter.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_name": "cookie-lisp-project", 3 | "repo_name": "{{ cookiecutter.project_name }}", 4 | "description": "", 5 | "version": "0.0.1", 6 | "year": 1984, 7 | "author": "CL User", 8 | "email": "{{ cookiecutter.author.split()|join('.')|lower }}@mail.com", 9 | "username": "{{ cookiecutter.author|first|lower }}{{ cookiecutter.author.split()|last|lower }}", 10 | "licence": "MIT" 11 | } 12 | -------------------------------------------------------------------------------- /hooks/post_gen_project.py: -------------------------------------------------------------------------------- 1 | """Post-project generation hooks""" 2 | 3 | if __name__ == '__main__': 4 | """Initialize a git repository.""" 5 | 6 | import subprocess 7 | subprocess.call(('git', 'init')) 8 | 9 | print("Project {{ cookiecutter.project_name }} created succesfully.") 10 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/.gitignore: -------------------------------------------------------------------------------- 1 | ### CommonLisp ### 2 | *.FASL 3 | *.fasl 4 | *.lisp-temp 5 | 6 | 7 | ### Emacs ### 8 | # -*- mode: gitignore; -*- 9 | *~ 10 | \#*\# 11 | /.emacs.desktop 12 | /.emacs.desktop.lock 13 | *.elc 14 | auto-save-list 15 | tramp 16 | .\#* 17 | 18 | # Org-mode 19 | .org-id-locations 20 | *_archive 21 | 22 | # flymake-mode 23 | *_flymake.* 24 | 25 | # eshell files 26 | /eshell/history 27 | /eshell/lastdir 28 | 29 | # elpa packages 30 | /elpa/ 31 | 32 | # reftex files 33 | *.rel 34 | 35 | # AUCTeX auto folder 36 | /auto/ 37 | 38 | # cask packages 39 | .cask/ 40 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/.travis.yml: -------------------------------------------------------------------------------- 1 | language: lisp 2 | 3 | sudo: required 4 | 5 | env: 6 | matrix: 7 | - LISP=abcl # Armed Bear Common Lisp 8 | - LISP=allegro # Allegro Common Lisp 9 | - LISP=ccl # Clozure Common Lisp 10 | - LISP=clisp # CLISP 11 | - LISP=sbcl # Steel Bank Common Lisp 12 | 13 | matrix: 14 | allow_failures: 15 | - env: LISP=allegro 16 | - env: LISP=clisp 17 | 18 | install: 19 | # Install CL Travis Handler 20 | - curl https://raw.githubusercontent.com/luismbo/cl-travis/master/install.sh | bash 21 | 22 | script: 23 | # Run the {{ cookiecutter.project_name }} tests using lisp-unit 24 | cl -e '(ql:quickload :{{ cookiecutter.project_name }}-tests) 25 | (unless ({{ cookiecutter.project_name }}-tests:run) 26 | (uiop:quit 1))' 27 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) {{ cookiecutter.year }}, {{ cookiecutter.author }} 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without 5 | modification, are permitted provided that the following conditions are met: 6 | 7 | * Redistributions of source code must retain the above copyright notice, 8 | this list of conditions and the following disclaimer. 9 | * Redistributions in binary form must reproduce the above copyright 10 | notice, this list of conditions and the following disclaimer in the 11 | documentation and/or other materials provided with the distribution. 12 | * Neither the name of nor the names of its contributors may be used to 13 | endorse or promote products derived from this software without specific 14 | prior written permission. 15 | 16 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 20 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26 | POSSIBILITY OF SUCH DAMAGE. 27 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/Makefile: -------------------------------------------------------------------------------- 1 | LISP ?= sbcl 2 | 3 | all: test 4 | 5 | run: 6 | rlwrap $(LISP) --load run.lisp 7 | 8 | build: 9 | $(LISP) --non-interactive \ 10 | --load {{ cookiecutter.project_name}}.asd \ 11 | --eval '(ql:quickload :{{ cookiecutter.project_name}})' \ 12 | --eval '(asdf:make :{{ cookiecutter.project_name}})' 13 | 14 | test: 15 | $(LISP) --non-interactive \ 16 | --load run-tests.lisp 17 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/README.md: -------------------------------------------------------------------------------- 1 | # {{ cookiecutter.project_name }} 2 | 3 | {{ cookiecutter.description }} 4 | 5 | # Usage 6 | 7 | Run from sources: 8 | 9 | make run 10 | # aka sbcl --load run.lisp 11 | 12 | choose your lisp: 13 | 14 | LISP=ccl make run 15 | 16 | or build and run the binary: 17 | 18 | ``` 19 | $ make build 20 | $ ./{{ cookiecutter.project_name }} [name] 21 | Hello [name] from {{ cookiecutter.project_name }} 22 | ``` 23 | 24 | ## Roswell integration 25 | 26 | Roswell is an implementation manager and [script launcher](https://github.com/roswell/roswell/wiki/Roswell-as-a-Scripting-Environment). 27 | 28 | A POC script is in the roswell/ directory. 29 | 30 | Your users can install the script with `{{ cookiecutter.username }}/{{ cookiecutter.project_name }}`. 31 | 32 | # Dev 33 | 34 | Tests are defined with [Fiveam](https://common-lisp.net/project/fiveam/docs/). 35 | 36 | Run them from the terminal with `make test`. You should see a failing test. 37 | 38 | ```bash 39 | $ make test 40 | Running test suite TESTMAIN 41 | Running test TEST1 f 42 | Did 1 check. 43 | Pass: 0 ( 0%) 44 | Skip: 0 ( 0%) 45 | Fail: 1 (100%) 46 | 47 | Failure Details: 48 | -------------------------------- 49 | TEST1 in TESTMAIN []: 50 | 51 | 3 52 | 53 | evaluated to 54 | 55 | 3 56 | 57 | which is not 58 | 59 | = 60 | 61 | to 62 | 63 | 2 64 | 65 | Makefile:15: recipe for target 'test' failed 66 | 67 | $ echo $? 68 | 2 69 | ``` 70 | 71 | On Slime, load the test package and run `run!`. 72 | 73 | --- 74 | 75 | Licence: BSD 76 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/roswell/README.md: -------------------------------------------------------------------------------- 1 | 2 | ## How to use Roswell to build and share binaries 3 | 4 | From the project root: 5 | 6 | Run as a script: 7 | 8 | chmod +x roswell/{{ cookiecutter.project_name}}.ros 9 | ./roswell/{{ cookiecutter.project_name }}.ros 10 | 11 | Build a binary: 12 | 13 | ros build roswell/{{ cookiecutter.project_name}}.ros 14 | 15 | and run it: 16 | 17 | ./roswell/{{ cookiecutter.project_name}} 18 | 19 | Or install it in ~/.roswell/bin: 20 | 21 | ros install roswell/{{ cookiecutter.project_name}}.ros 22 | 23 | It creates the binary in ~/.roswell/bin/ 24 | Run it: 25 | 26 | ~/.roswell/bin/{{ cookiecutter.project_name}} [name]~& 27 | 28 | Your users can install the script with ros install {{ cookiecutter.username }}/{{ cookiecutter.project_name }} 29 | 30 | Use `+Q` if you don't have Quicklisp dependencies to save startup time. 31 | Use `ros build --disable-compression` to save on startup time and loose on application size. 32 | 33 | 34 | ## See 35 | 36 | - https://github.com/roswell/roswell/wiki/ 37 | - https://github.com/roswell/roswell/wiki/Reducing-Startup-Time 38 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/roswell/{{cookiecutter.project_name}}.ros: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | #|-*- mode:lisp -*-|# 3 | #| 4 | exec ros -Q -- $0 "$@" 5 | |# 6 | 7 | ;; Use `+Q` if you don't have Quicklisp dependencies to save startup time. 8 | 9 | (defun help () 10 | (format t "~&Usage: 11 | 12 | {{ cookiecutter.project_name }} [name] 13 | ")) 14 | 15 | ;; XXX: this load does not load from everywhere 16 | ;; It doesn't work when run as a script. 17 | (load (truename "{{ cookiecutter.project_name}}.asd")) 18 | (ql:quickload "{{ cookiecutter.project_name }}") 19 | 20 | (defun main (&rest argv) 21 | "Optional name parameter." 22 | ;; CLI args parsing is done in %main. 23 | ({{ cookiecutter.project_name}}::%main argv)) 24 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/run-tests.lisp: -------------------------------------------------------------------------------- 1 | 2 | (load "{{ cookiecutter.project_name}}.asd") 3 | (load "{{ cookiecutter.project_name}}-tests.asd") 4 | 5 | (ql:quickload "{{ cookiecutter.project_name}}-tests") 6 | 7 | (in-package :{{ cookiecutter.project_name}}-tests) 8 | 9 | (uiop:quit (if (run-all-tests) 0 1)) 10 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/run.lisp: -------------------------------------------------------------------------------- 1 | " 2 | Usage: 3 | 4 | rlwrap sbcl --load run.lisp 5 | 6 | This loads the project's asd, loads the quicklisp dependencies, and 7 | calls the main function. 8 | 9 | Then, we are given the lisp prompt. 10 | 11 | If you don't want to land in the REPL, you can (quit) below or call lisp with the --non-interactive flag. 12 | 13 | Another solution to run the app is to build and run a binary (see README). 14 | " 15 | 16 | (load "{{ cookiecutter.project_name}}.asd") 17 | 18 | (ql:quickload "{{ cookiecutter.project_name}}") 19 | 20 | (in-package :{{ cookiecutter.project_name}}) 21 | (handler-case 22 | (main) 23 | (error (c) 24 | (format *error-output* "~&An error occured: ~a~&" c) 25 | (uiop:quit 1))) 26 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/src/packages.lisp: -------------------------------------------------------------------------------- 1 | (defpackage :{{ cookiecutter.project_name }} 2 | (:use :cl) 3 | (:export :main)) 4 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/src/{{cookiecutter.project_name}}.lisp: -------------------------------------------------------------------------------- 1 | (in-package :{{ cookiecutter.project_name }}) 2 | 3 | ;; Define your project functionality here... 4 | 5 | (defun greet (&optional (name "{{ cookiecutter.author }}")) 6 | (format t "Hello ~a from ~a!~&" name "{{ cookiecutter.project_name }}")) 7 | 8 | (defun help () 9 | (format t "~&Usage: 10 | 11 | {{ cookiecutter.project_name }} [name]~&")) 12 | 13 | (defun %main (argv) 14 | "Parse CLI args." 15 | (when (member "-h" argv :test #'equal) 16 | ;; To properly parse command line arguments, use a third-party library such as 17 | ;; clingon, unix-opts, defmain, adopt… when needed. 18 | (help) 19 | (uiop:quit)) 20 | (greet (or (first argv) 21 | "dear lisp user"))) 22 | 23 | (defun main () 24 | "Entry point for the executable. 25 | Reads command line arguments." 26 | ;; uiop:command-line-arguments returns a list of arguments (sans the script name). 27 | ;; We defer the work of parsing to %main because we call it also from the Roswell script. 28 | (%main (uiop:command-line-arguments))) 29 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/tests/packages.lisp: -------------------------------------------------------------------------------- 1 | (in-package :asdf-user) 2 | (defpackage :{{ cookiecutter.project_name }}-tests 3 | (:use :common-lisp 4 | :fiveam 5 | :{{ cookiecutter.project_name }})) 6 | 7 | 8 | (in-package :{{ cookiecutter.project_name }}-tests) 9 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/tests/test-{{cookiecutter.project_name}}.lisp: -------------------------------------------------------------------------------- 1 | (in-package :{{ cookiecutter.project_name }}-tests) 2 | 3 | ;; Define your project tests here... 4 | 5 | (def-suite testmain 6 | :description "test suite 1") 7 | 8 | (in-suite testmain) 9 | 10 | (test test1 11 | (is (= (+ 1 1) 12 | 3))) 13 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}-tests.asd: -------------------------------------------------------------------------------- 1 | (in-package :asdf-user) 2 | (defsystem "{{ cookiecutter.project_name }}-tests" 3 | :description "Test suite for the {{ cookiecutter.project_name }} system" 4 | :author "{{ cookiecutter.author }} <{{ cookiecutter.email }}>" 5 | :version "{{ cookiecutter.version }}" 6 | :depends-on (:{{ cookiecutter.project_name }} 7 | :fiveam) 8 | :license "BSD" 9 | :serial t 10 | :components ((:module "tests" 11 | :serial t 12 | :components ((:file "packages") 13 | (:file "test-{{ cookiecutter.project_name }}")))) 14 | 15 | ;; The following would not return the right exit code on error, but still 0. 16 | ;; :perform (test-op (op _) (symbol-call :fiveam :run-all-tests)) 17 | ) 18 | -------------------------------------------------------------------------------- /{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}.asd: -------------------------------------------------------------------------------- 1 | (in-package :asdf-user) 2 | 3 | (defsystem "{{ cookiecutter.project_name }}" 4 | :author "{{ cookiecutter.author }} <{{ cookiecutter.email }}>" 5 | :version "{{ cookiecutter.version }}" 6 | :license "{{ cookiecutter.licence }}" 7 | :description "{{ cookiecutter.description }}" 8 | :homepage "" 9 | :bug-tracker "" 10 | :source-control (:git "") 11 | 12 | ;; Dependencies. 13 | :depends-on () 14 | 15 | ;; Project stucture. 16 | :serial t 17 | :components ((:module "src" 18 | :serial t 19 | :components ((:file "packages") 20 | (:file "{{ cookiecutter.project_name }}")))) 21 | 22 | ;; Build a binary: 23 | ;; don't change this line. 24 | :build-operation "program-op" 25 | ;; binary name: adapt. 26 | :build-pathname "{{ cookiecutter.project_name }}" 27 | ;; entry point: here "main" is an exported symbol. Otherwise, use a double :: 28 | :entry-point "{{ cookiecutter.project_name}}:main") 29 | --------------------------------------------------------------------------------