If we fail to open one of the files in the file listing, we still need to advance `rec` along with `argv` so that the checksum we're checking against lines up with the file we're hashing. Tests added both for the -c flag, as well as the -b and -t modes of the *sum programs. PR: 267722 Reviewed by: emaste (earlier version) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D37374
45 lines
925 B
Makefile
45 lines
925 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 ${TEST_DIR}/*.in
|
|
|
|
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
|
|
|
|
ATF_TESTS_SH+= md5_test
|
|
|
|
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>
|