~ubuntu-branches/ubuntu/edgy/e2fsprogs/edgy

« back to all changes in this revision

Viewing changes to tests/Makefile.in

  • Committer: Bazaar Package Importer
  • Author(s): Yann Dirson
  • Date: 2002-03-21 23:58:48 UTC
  • Revision ID: james.westby@ubuntu.com-20020321235848-cmmy98hy0nihp922
Tags: upstream-1.27
ImportĀ upstreamĀ versionĀ 1.27

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Makefile for the tests directory
 
3
#
 
4
 
 
5
srcdir = @srcdir@
 
6
top_srcdir = @top_srcdir@
 
7
VPATH = @srcdir@
 
8
top_builddir = ..
 
9
my_dir = tests
 
10
INSTALL = @INSTALL@
 
11
 
 
12
@MCONFIG@
 
13
 
 
14
all:: @DO_TEST_SUITE@
 
15
 
 
16
test_script: test_script.in Makefile
 
17
        @echo "Creating test_script..."
 
18
        @echo "#!/bin/sh" > test_script
 
19
        @echo "SRCDIR=@srcdir@" >> test_script
 
20
        @cat $(srcdir)/test_script.in >> test_script
 
21
        @chmod +x test_script
 
22
 
 
23
check:: test_script
 
24
        @echo "Running e2fsprogs test suite..."
 
25
        @echo " "
 
26
        @./test_script
 
27
 
 
28
TDIR=f_testnew
 
29
# Target which creates a new testcase to simplify adding new regression tests.
 
30
testnew:
 
31
        @echo "Creating a new e2fsck testcase in ${TDIR}"
 
32
        @mkdir -p ${TDIR}
 
33
        dd if=/dev/zero of=${TDIR}/image bs=1k count=8k
 
34
        mke2fs -j -F -N 256 ${TDIR}/image
 
35
        @echo "new test description" > ${TDIR}/name
 
36
        @echo; echo; echo "New test filesystem at ${TDIR}/image."
 
37
        @echo "Now, break the filesystem as appropriate, and run 'make testend'"
 
38
 
 
39
EXPECT1=${TDIR}/expect.1
 
40
EXPECT2=${TDIR}/expect.2
 
41
# Target which generates the expect files for the new testcase.
 
42
testend: test_script ${TDIR}/image
 
43
        gzip -9 ${TDIR}/image
 
44
        @OUT1=${EXPECT1} OUT2=${EXPECT2} ./test_script ${TDIR}
 
45
        @echo; echo; echo "*** output from first e2fsck run (${EXPECT1}) ***"
 
46
        @cat ${EXPECT1}
 
47
        @echo "*** output from second e2fsck run (${EXPECT2}) ***"
 
48
        @cat ${EXPECT2}
 
49
        @echo "*** end of e2fsck output ***"
 
50
        @echo; echo "Hopefully e2fsck now fixes this problem properly."
 
51
        @echo "If all is well, edit ${TDIR}/name and rename ${TDIR}."
 
52
 
 
53
clean::
 
54
        $(RM) -f *.log *.new *.failed *.ok test.img test_script
 
55
 
 
56
distclean:: clean
 
57
        $(RM) -f Makefile
 
58
        $(RM) -rf ${TDIR}
 
59