Skip to content

Commit

Permalink
Fix test execution and top-level targets
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
kevans91 committed Jan 23, 2024
1 parent 047d7e2 commit 350c59d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <bsd.subdir.mk>
4 changes: 0 additions & 4 deletions lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 <bsd.lib.mk>
2 changes: 1 addition & 1 deletion tests/basic_test.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 350c59d

Please sign in to comment.