tests: run file via libtool to determine shell scripts
authorFelipe Sateler <fsateler@gmail.com>
Sun, 3 Jul 2016 15:19:38 +0000 (11:19 -0400)
committerFelipe Sateler <fsateler@gmail.com>
Sun, 3 Jul 2016 22:33:02 +0000 (18:33 -0400)
The actual output file might be a wrapper script, so lets follow the indirection

Fixes: #3644

Makefile.am

index 0ec4075..fa81400 100644 (file)
@@ -6417,7 +6417,7 @@ install-tree: all
 .PHONY: valgrind-tests
 valgrind-tests: $(TESTS)
        $(AM_V_GEN)for f in $(filter-out %.pl %.py, $^); do \
-               if file $$f | grep -q shell; then \
+               if $(LIBTOOL) --mode=execute file $$f | grep -q shell; then \
                echo -e "$${x}Skipping non-binary $$f"; else \
                echo -e "$${x}Running $$f"; \
                $(LIBTOOL) --mode=execute valgrind -q --leak-check=full --max-stackframe=5242880 --error-exitcode=55 $(builddir)/$$f ; fi; \