2021-10-27 14:22:44 +02:00
|
|
|
.PHONY: all all-tests test test-install format
|
2021-10-06 05:50:51 +02:00
|
|
|
NIXPKGS_REV := nixpkgs-unstable
|
|
|
|
NIX_PATH := nixpkgs=https://github.com/NixOS/nixpkgs/archive/${NIXPKGS_REV}.tar.gz
|
2021-10-01 05:49:45 +02:00
|
|
|
|
2021-10-27 14:22:44 +02:00
|
|
|
all: all-tests test-install
|
2021-10-01 05:49:45 +02:00
|
|
|
|
|
|
|
all-tests:
|
|
|
|
$(MAKE) test TEST=all
|
|
|
|
|
|
|
|
test:
|
|
|
|
ifndef TEST
|
|
|
|
$(error Use 'make test TEST=<test_name>' to run desired test)
|
|
|
|
endif
|
|
|
|
nix-shell --pure tests -I ${NIX_PATH} -A run.${TEST}
|
2021-10-06 05:50:51 +02:00
|
|
|
|
2021-10-27 14:22:44 +02:00
|
|
|
test-install:
|
|
|
|
HOME=$(shell mktemp -d) NIX_PATH=${NIX_PATH} nix-shell . -A install
|
|
|
|
|
2021-10-06 05:50:51 +02:00
|
|
|
format:
|
|
|
|
./format
|