Makefile: improvements (#2374)
- Add NIXPKGS_REV, so we can pass arbitrary revisions for testing (for example, `release-21.05` so we can test backports). - Add format target, that calls the format script.
This commit is contained in:
parent
592da767bd
commit
c100bd0c4b
8
Makefile
8
Makefile
|
@ -1,5 +1,6 @@
|
||||||
.PHONY: all all-tests test
|
.PHONY: all all-tests test format
|
||||||
NIX_PATH := nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz
|
NIXPKGS_REV := nixpkgs-unstable
|
||||||
|
NIX_PATH := nixpkgs=https://github.com/NixOS/nixpkgs/archive/${NIXPKGS_REV}.tar.gz
|
||||||
|
|
||||||
all: all-tests
|
all: all-tests
|
||||||
|
|
||||||
|
@ -11,3 +12,6 @@ ifndef TEST
|
||||||
$(error Use 'make test TEST=<test_name>' to run desired test)
|
$(error Use 'make test TEST=<test_name>' to run desired test)
|
||||||
endif
|
endif
|
||||||
nix-shell --pure tests -I ${NIX_PATH} -A run.${TEST}
|
nix-shell --pure tests -I ${NIX_PATH} -A run.${TEST}
|
||||||
|
|
||||||
|
format:
|
||||||
|
./format
|
||||||
|
|
Loading…
Reference in a new issue