freebsd-dev/sbin/md5/tests/Makefile
Stefan Eßer c2870e576b sbin/md5: improve compatibility with coreutils -c option
The -c option expects a digest file in either BSD or coreutils format.

The output for matched and mismatched files is identical to that
of the coreutils version.

The review of these changes included test cases that have already
been committed for the functionality that existed before.
Another test script is added to cover the coreutils compatible
extension implemented by this patch.

This commit contains a tests/Makefile that has been cleaned up
compared to the review version, using an implicit rule to apply the
TESTBASE path at build time (and the scripts have been renamed to
have an extension of .SH instead of .sh to trigger this rule).

Reviewed by:    imp
Differential Revision:  https://reviews.freebsd.org/D30812
2021-06-25 08:54:36 +02:00

43 lines
882 B
Makefile

# $FreeBSD$
.include <bsd.own.mk>
PACKAGE= tests
TEST_DIR= ${SRCTOP}/sbin/md5/tests
.PATH: ${TEST_DIR}
FILESGROUPS+= FILESinputs
FILESinputsPACKAGE= ${PACKAGE}
FILESinputsDIR= ${TESTSDIR}
FILESinputs!= echo ${TEST_DIR}/*.inp
FILESGROUPS+= FILESchkfiles
FILESchkfilesPACKAGE= ${PACKAGE}
FILESchkfilesDIR= ${TESTSDIR}
FILESchkfiles!= echo ${TEST_DIR}/*.chk
FILESGROUPS+= FILESdigests
FILESdigestsPACKAGE= ${PACKAGE}
FILESdigestsDIR= ${TESTSDIR}
FILESdigests!= echo ${TEST_DIR}/*.digest
FILESGROUPS+= FILESparam
FILESparamPACKAGE= ${PACKAGE}
FILESparamDIR= ${TESTSDIR}
FILESparam!= echo ${TEST_DIR}/*.txt
PLAIN_TESTS_SH+= self-test
PLAIN_TESTS_SH+= bsd-c-test
PLAIN_TESTS_SH+= bsd-p-test
PLAIN_TESTS_SH+= bsd-s-test
PLAIN_TESTS_SH+= coreutils-c-test
.SUFFIXES: .SH
.SH.sh:
sed 's|%%TESTSBASE%%|${TESTSBASE}|g' ${.ALLSRC} > ${.TARGET}
.include <bsd.test.mk>