~daniel-mehrmann/e2fsprogs/master

« back to all changes in this revision

Viewing changes to tests/Makefile.in

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs
  • Date: 2012-06-14 13:01:21 UTC
  • mfrom: (8.4.18 sid)
  • Revision ID: package-import@ubuntu.com-20120614130121-t2gct0d09jepx0y6
Tags: 1.42.4-3ubuntu1
* Merge from Debian unstable (LP: #978012), remainging changes:
  - debian/control.in: 
      Build-depend on gettext:any instead of on gettext for (cross-building)
      Drop build dependency on dc, which hasn't been needed for some time.
      Update maintainer field.
  - debian/rules:
      Block pkg-create-dbgsym from operating on this package.
      Build without dietlibc-dev, which is in universe 
  - debian/control:
      Regenerate with ./debian/rules debian/control

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
@MCONFIG@
13
13
 
14
 
all:: @DO_TEST_SUITE@
15
 
 
16
 
test_script: test_script.in Makefile mke2fs.conf
 
14
all:: @DO_TEST_SUITE@ test_one test_script
 
15
 
 
16
test_one: $(srcdir)/test_one.in Makefile mke2fs.conf
 
17
        @echo "Creating test_one script..."
 
18
        @echo "#!/bin/sh" > test_one
 
19
@HTREE_CMT@     @echo "HTREE=y" >> test_one
 
20
        @echo "SRCDIR=@srcdir@" >> test_one
 
21
        @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_one
 
22
        @cat $(srcdir)/test_one.in >> test_one
 
23
        @chmod +x test_one
 
24
 
 
25
test_script: test_one test_script.in Makefile mke2fs.conf
17
26
        @echo "Creating test_script..."
18
27
        @echo "#!/bin/sh" > test_script
19
 
@HTREE_CMT@     @echo "HTREE=y" >> test_script
20
 
        @echo 'EGREP="@EGREP@"' >> test_script
21
28
        @echo "SRCDIR=@srcdir@" >> test_script
22
 
        @echo "DIFF_OPTS=@UNI_DIFF_OPTS@" >> test_script
23
29
        @cat $(srcdir)/test_script.in >> test_script
24
30
        @chmod +x test_script
25
31
 
26
32
mke2fs.conf: $(srcdir)/mke2fs.conf.in
27
33
        $(CP) $(srcdir)/mke2fs.conf.in mke2fs.conf
28
34
 
29
 
check:: test_script
 
35
.PHONY : test_pre test_post check always_run
 
36
 
 
37
TESTS=$(wildcard $(srcdir)/[a-z]_*)
 
38
$(TESTS):: test_one always_run
 
39
        @./test_one $@
 
40
 
 
41
test_pre:
 
42
        @$(RM) -f *.failed
30
43
        @echo "Running e2fsprogs test suite..."
31
44
        @echo " "
32
 
        @./test_script
33
 
 
34
 
check-failed:
35
 
        @a=`/bin/ls *.failed 2> /dev/null | sed -e 's/.failed//'`; \
36
 
        if test "$$a"x == x ; then \
37
 
                echo "No failed tests" ; \
38
 
        else \
39
 
                ./test_script $$a ; \
40
 
        fi
 
45
 
 
46
test_post: test_pre $(TESTS)
 
47
        @$(srcdir)/test_post
 
48
 
 
49
check:: test_pre test_post test_script
 
50
 
 
51
check-failed: $(basename $(wildcard *.failed))
 
52
        @$(srcdir)/test_post
41
53
 
42
54
 
43
55
TDIR=f_testnew
54
66
EXPECT1=${TDIR}/expect.1
55
67
EXPECT2=${TDIR}/expect.2
56
68
# Target which generates the expect files for the new testcase.
57
 
testend: test_script ${TDIR}/image
 
69
testend: test_one ${TDIR}/image
58
70
        gzip -9 ${TDIR}/image
59
 
        @OUT1=${EXPECT1} OUT2=${EXPECT2} ./test_script ${TDIR}
 
71
        @OUT1=${EXPECT1} OUT2=${EXPECT2} ./test_one ${TDIR}
60
72
        @echo; echo; echo "*** output from first e2fsck run (${EXPECT1}) ***"
61
73
        @cat ${EXPECT1}
62
74
        @echo "*** output from second e2fsck run (${EXPECT2}) ***"
66
78
        @echo "If all is well, edit ${TDIR}/name and rename ${TDIR}."
67
79
 
68
80
clean::
69
 
        $(RM) -f *~ *.log *.new *.failed *.ok test.img test_script mke2fs.conf
 
81
        $(RM) -f *~ *.log *.new *.failed *.ok *.tmp test_one test_script mke2fs.conf
70
82
 
71
83
distclean:: clean
72
84
        $(RM) -f Makefile