From 350c59d4ce5c1b07ee1a6082ef1ebd12885bc871 Mon Sep 17 00:00:00 2001 From: Kyle Evans Date: Mon, 22 Jan 2024 20:35:39 -0600 Subject: [PATCH] Fix test execution and top-level targets lint should descend into the lib dir, since that's where we keep orch.lua. check should still descend into tests, but it was in the wrong Makefile and ORCHLUA_PATH needs to be adjusted now that orch.lua doesn't live at the root. Finally, basic_test.sh needs to know to look in src/ instead of the top-level directory before falling back to $PATH. Signed-off-by: Kyle Evans --- Makefile | 7 +++++++ lib/Makefile | 4 ---- tests/basic_test.sh | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 552e545..3b5c08e 100644 --- a/Makefile +++ b/Makefile @@ -3,4 +3,11 @@ SUBDIR+= lib SUBDIR+= man SUBDIR+= src +lint: + $(MAKE) -C lib lint + +# Just pass this on for now. +check: + env ORCHLUA_PATH=${.CURDIR}/lib $(MAKE) -C tests check + .include diff --git a/lib/Makefile b/lib/Makefile index ff094d3..41143ef 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -12,9 +12,5 @@ FILESDIR= ${LUA_MODSHAREDIR} lint: luacheck orch.lua -# Just pass this on for now. -check: - env ORCHLUA_PATH=${.CURDIR} $(MAKE) -C tests check - .include "Makefile.inc" .include diff --git a/tests/basic_test.sh b/tests/basic_test.sh index 8e42ee1..d6e39ce 100644 --- a/tests/basic_test.sh +++ b/tests/basic_test.sh @@ -1,7 +1,7 @@ #!/bin/sh scriptdir=$(dirname $(realpath "$0")) -orchbin="$scriptdir/../orch" +orchbin="$scriptdir/../src/orch" if [ ! -x "$orchbin" ]; then orchbin="$(which orch)" fi