Commit 115588d1 authored by Peter Pentchev's avatar Peter Pentchev

Parametrize the "test" target and add "test-p6".

parent 3a902530
......@@ -12,6 +12,7 @@ Change log for ethstats, the network traffic statistics utility
- update the "test" target in the Makefile: the Getopt::Tiny
module used by ethstats.p6 does not recognize clustered
single-letter options, so pass -V and -h separately
- parametrize the "test" target and add the "test-p6" one
1.1.0 2015/12/11
- use Getopt::Std for command-line option processing
......
......@@ -4,6 +4,7 @@ SCRIPT= ethstats
SRC= ethstats.pl
MAN1= ${SCRIPT}.1
MAN1GZ= ${MAN1}.gz
TEST_SCRIPT?= ${SCRIPT}
GZIP?= gzip -cn
INSTALL?= install
......@@ -42,24 +43,27 @@ install: all
test: all
@echo "=== Perl syntax check"
${PERL} -c ${SCRIPT}
${PERL} -c ${TEST_SCRIPT}
@echo "=== Basic version/usage functionality"
./${SCRIPT} -V -h
${PERL} ${TEST_SCRIPT} -V -h
@echo
@echo "=== Error out on invalid options"
! ./${SCRIPT} -X
! ${PERL} ${TEST_SCRIPT} -X
@echo
@if [ -r "/proc/net/dev" ]; then \
echo "=== A single run"; \
./${SCRIPT} -n3 -c2; \
${PERL} ${TEST_SCRIPT} -n3 -c2; \
else \
echo "=== Skipping the single run"; \
fi
@echo
test-p6:
${MAKE} TEST_SCRIPT=ethstats.p6 PERL=perl6 test
${SCRIPT}: ${SRC}
${INSTALL_EXEC} ${SRC} ${SCRIPT}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment