Skip to content

Commit

Permalink
Add test target for easily running tests.
Browse files Browse the repository at this point in the history
Common development tests should be as seamless and simple as
possible, but the `cask exec buttercup -L .` command which runs the
specs for the project is not the most user friendliest.

This adds the `test` target which is an alias for that command.

> Note: in order to force make to "rebuild" the `test` command every
  time, it needs to be marked as a `.PHONY` target (one that does not
  produce an actual physical artifact)

See
https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html#Phony-Targets
  • Loading branch information
cowboyd committed May 17, 2019
1 parent 40834d3 commit eab9a96
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ script:
# off the network and boot up succesfull
- make init-test
# run individual tests
- cask exec buttercup -L .
- make test
# build the archive for uploading to elpa.frontside.io
- make archive

Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ clean:
rm -rf build
rm -rf dist

test:
cask exec buttercup -L .

# Run Emacs locally with a sandboxed home directory, using the
# frontmacs config. We point Emacs to the local archive that we built
# on the system, and also erase it if it was there befor.
Expand All @@ -28,3 +31,5 @@ archive: build/packages/archive-contents
# downloads everything off of the internet
init-test: build archive
FRONTMACS_ARCHIVE=`pwd`/dist/packages/ HOME=`pwd`/build/home emacs -Q --batch --no-init-file --script scripts/init-frontmacs.el

.PHONY: test

0 comments on commit eab9a96

Please sign in to comment.