Add PYTHON macro to the makefile
Signed-off-by: David A. Wheeler <dwheeler@dwheeler.com>
This commit is contained in:
parent
596b63164f
commit
a59ca71bc2
10
makefile
10
makefile
|
@ -16,6 +16,7 @@ VERSIONEDNAME=$(NAME)-$(VERSION)
|
||||||
ARCH=noarch
|
ARCH=noarch
|
||||||
|
|
||||||
SAMPLE_DIR=/usr/src/linux-2.2.16
|
SAMPLE_DIR=/usr/src/linux-2.2.16
|
||||||
|
PYTHON=python
|
||||||
|
|
||||||
# Flawfinder has traditionally used INSTALL_DIR, INSTALL_DIR_BIN, and
|
# Flawfinder has traditionally used INSTALL_DIR, INSTALL_DIR_BIN, and
|
||||||
# INSTALL_DIR_MAN. Here we add support for GNU variables like prefix, etc.;
|
# INSTALL_DIR_MAN. Here we add support for GNU variables like prefix, etc.;
|
||||||
|
@ -126,13 +127,14 @@ time:
|
||||||
|
|
||||||
test: flawfinder test.c test2.c
|
test: flawfinder test.c test2.c
|
||||||
# Omit time report so that results are always the same textually.
|
# Omit time report so that results are always the same textually.
|
||||||
./flawfinder --omittime test.c test2.c > test-results.txt
|
# Set PYTHON as needed, including to ""
|
||||||
./flawfinder --csv test.c test2.c > test-results.csv
|
$(PYTHON) ./flawfinder --omittime test.c test2.c > test-results.txt
|
||||||
|
$(PYTHON) ./flawfinder --csv test.c test2.c > test-results.csv
|
||||||
echo >> test-results.txt
|
echo >> test-results.txt
|
||||||
echo "Testing for no ending newline:" >> test-results.txt
|
echo "Testing for no ending newline:" >> test-results.txt
|
||||||
./flawfinder --omittime no-ending-newline.c | \
|
$(PYTHON) ./flawfinder --omittime no-ending-newline.c | \
|
||||||
grep 'Lines analyzed' >> test-results.txt
|
grep 'Lines analyzed' >> test-results.txt
|
||||||
./flawfinder --omittime --html --context test.c test2.c > test-results.html
|
$(PYTHON) ./flawfinder --omittime --html --context test.c test2.c > test-results.html
|
||||||
@echo "Differences from expected results:"
|
@echo "Differences from expected results:"
|
||||||
@diff -u correct-results.txt test-results.txt
|
@diff -u correct-results.txt test-results.txt
|
||||||
@diff -u correct-results.html test-results.html
|
@diff -u correct-results.html test-results.html
|
||||||
|
|
Loading…
Reference in New Issue