From 66d9dbfa36f59748e06bb30cd98b3f4ad76cd482 Mon Sep 17 00:00:00 2001 From: Thiago Kenji Okada Date: Fri, 1 Oct 2021 00:49:45 -0300 Subject: [PATCH] Makefile: init (#2351) The idea of this file is to make it easier to run tests. It will ensure that the tests are running with the correct NIX_PATH (pointing it to e.g.: unstable), and also allowing it to run either one or all tests. --- .github/CODEOWNERS | 2 ++ Makefile | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 Makefile diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index f5d35eff9..aa7c0d2ea 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -361,3 +361,5 @@ /modules/xsession.nix @rycee /modules/services/volnoti.nix @IvanMalison + +Makefile @thiagokokada diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..b3d57978b --- /dev/null +++ b/Makefile @@ -0,0 +1,13 @@ +.PHONY: all all-tests test +NIX_PATH := nixpkgs=https://github.com/NixOS/nixpkgs/archive/nixpkgs-unstable.tar.gz + +all: all-tests + +all-tests: + $(MAKE) test TEST=all + +test: +ifndef TEST + $(error Use 'make test TEST=' to run desired test) +endif + nix-shell --pure tests -I ${NIX_PATH} -A run.${TEST}