Skip to content

Commit

Permalink
tests: shellcheck the debug progs
Browse files Browse the repository at this point in the history
  • Loading branch information
hramrach committed Jan 17, 2024
1 parent 06bd510 commit 989f387
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,12 @@ MANPAGES := $(LIBMAN3FILES) $(LIBMAN5FILES) $(PROGDETECTMAN8FILES) $(PROGDUMPMAN

check:: test

test:: lib/test/test-scanner
test:: shellcheck test-lib

shellcheck::
shellcheck $(SHELLCHECKFILES)

test-lib:: lib/test/test-scanner
cd lib/test ; ./test-scanner.pl

user ::
Expand Down
2 changes: 2 additions & 0 deletions prog/debug/Module.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ PROGDEBUGTARGETS += $(MODULE_DIR)/sensors-save
REMOVEDEBUGBIN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(BINDIR)/%,$(PROGDEBUGTARGETS))
REMOVEDEBUGMAN := $(patsubst $(MODULE_DIR)/%,$(DESTDIR)$(PROGDEBUGMAN1DIR)/%,$(PROGDEBUGMAN1FILES))

SHELLCHECKFILES += $(PROGDEBUGTARGETS)

install-prog-debug: $(PROGDEBUGTARGETS)
$(MKDIR) $(DESTDIR)$(BINDIR) $(DESTDIR)$(PROGDEBUGMAN1DIR)
$(INSTALL) -m 755 $(PROGDEBUGTARGETS) $(DESTDIR)$(BINDIR)
Expand Down
2 changes: 1 addition & 1 deletion prog/debug/sensors-find-driver
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ while true; do
DRIVER_DIR=$(readlink -f "$DEVICE/driver")
DRIVER=$(basename "$DRIVER_DIR")
if [ -L "$DRIVER_DIR/module" ]; then
MODULE=$(basename $(readlink "$DRIVER_DIR/module"))
MODULE="$(basename "$(readlink "$DRIVER_DIR/module")")"
fi
break
elif [ -L "$DEVICE/device" ]; then
Expand Down

0 comments on commit 989f387

Please sign in to comment.