Makefile revision 1.4
1# $NetBSD: Makefile,v 1.4 2006/05/05 19:38:30 perseant Exp $ 2# 3# Note: this test must be run with LFSDEV defined, e.g. "LFSDEV=wd0g". 4# It will destroy the existing contents of $LFSDEV to perform the test. 5# The test also requires the availability of two files each the size 6# of ${LFSDEV} to store temporary filesystem images in, during the course 7# of the run. 8# 9# This test requires that Perl be installed to run. 10# 11 12NOMAN= # defined 13TMPMP= /tmp/lfsregresstest_mount 14SRCDIR?= ${.CURDIR} 15CLEAN= clean 16LFSBDEV="/dev/${LFSDEV}" 17LFSCDEV="/dev/r${LFSDEV}" 18GFILE?= "good_fs.img" # "Good" file - will be as large as the FS 19WFILE?= "work_fs.img" # Work file - will also be as large as the FS 20COUNT?= 20 21PLEX?= 2 22FSIZE?= 16384 23 24regress: test_ckckp 25 26.ifndef REGRESS_LOG 27REGRESS_LOG=/dev/null 28.endif 29 30test_ckckp: ckckp cleanalot_async run_ckckp 31.ifndef LFSDEV 32 @echo "*** Checkpoint validity test skipped" 33 @echo ${.CURDIR} SKIPPED "LFSDEV not defined" >> ${REGRESS_LOG} 34.else 35 @echo "*** Checkpoint validity test" 36 @echo "*** WARNING: will newfs_lfs ${LFSCDEV} in 10 seconds" 37 @sleep 10 38 newfs_lfs ${LFSCDEV} 39 -mkdir ${TMPMP} 40 mount ${LFSBDEV} ${TMPMP} 41 ./run_ckckp ${TMPMP} ${LFSCDEV} ${GFILE} ${WFILE} ${PLEX} ${COUNT} ${FSIZE} || \ 42 echo ${.CURDIR} FAILED | tee -a ${REGRESS_LOG} 43 umount ${TMPMP} 44 rmdir ${TMPMP} 45 echo ${.CURDIR} PASSED | tee -a ${REGRESS_LOG} 46.endif 47 48abort: go 49 -kill -9 `ps auxww | grep ckckp | grep -v grep | awk '{print $$2}'` 50 ./go ${TMPMP} 51 umount ${TMPMP} 52 53clean: 54 rm -f ckckp cleanalot_async go *~ *.core ${GFILE} ${WFILE} 55 56.include <bsd.prog.mk> 57