~ubuntu-branches/debian/experimental/apparmor/experimental

« back to all changes in this revision

Viewing changes to .pc/0103-kfreebsd-compile.patch/parser/tst/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Kees Cook
  • Date: 2011-05-01 19:29:07 UTC
  • Revision ID: james.westby@ubuntu.com-20110501192907-49snsnhfzlej5i71
Tags: 2.6.1-3
* debian/control: add sneaky missing Build-Dep on liblocale-gettext-perl
  (fixes FTBFS on some extremely minimal chroots, Closes: 624566).
* debian/patches/0101-declarations.patch: add missing declarations needed
  for sensitive compilers (fixes FTBFS on mips/mipsel).
* debian/patches/0102-manpage-release-name.patch: update manpage release
  names to match others.
* debian/patches/0103-kfreebsd-compile.patch, debian/{control,rules}:
  attempt to build as much as possible (no parser) on non-Linux systems.
* debian/po/ru.po: add translation, thanks to Yuri Kozlov (Closes: 624741).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
PROVE=/usr/bin/prove
 
3
TESTS=simple.pl
 
4
PARSER_DIR=..
 
5
PARSER_BIN=apparmor_parser
 
6
PARSER=$(PARSER_DIR)/$(PARSER_BIN)
 
7
 
 
8
ifeq ($(VERBOSE),1)
 
9
  PROVE_ARG=-v
 
10
endif
 
11
 
 
12
all: tests
 
13
 
 
14
.PHONY: tests error_output gen_xtrans parser_sanity caching
 
15
tests: error_output gen_xtrans parser_sanity caching
 
16
 
 
17
gen_xtrans:
 
18
        ./gen-xtrans.pl
 
19
 
 
20
error_output: $(PARSER)
 
21
        $(PARSER) -S -I errors >/dev/null errors/okay.sd
 
22
        LANG=C $(PARSER) -S -I errors 2>&1 >/dev/null errors/single.sd | \
 
23
                grep -q "AppArmor parser error for errors/single.sd in errors/single.sd at line 3: Could not open 'failure'"
 
24
        LANG=C $(PARSER) -S -I errors 2>&1 >/dev/null errors/double.sd | \
 
25
                grep -q "AppArmor parser error for errors/double.sd in errors/includes/busted at line 66: Could not open 'does-not-exist'"
 
26
        LANG=C $(PARSER) -S -I errors 2>&1 >/dev/null errors/modefail.sd | \
 
27
                grep -q "AppArmor parser error for errors/modefail.sd in errors/modefail.sd at line 6: syntax error"
 
28
        LANG=C $(PARSER) -S -I errors 2>&1 >/dev/null errors/multi_include.sd | \
 
29
                grep -q "AppArmor parser error for errors/multi_include.sd in errors/multi_include.sd at line 12: Could not open 'failure'"
 
30
        @echo "Error Output: PASS"
 
31
 
 
32
parser_sanity: $(PARSER)
 
33
        $(Q)${PROVE} ${PROVE_ARG} ${TESTS}
 
34
 
 
35
caching: $(PARSER)
 
36
        LANG=C ./caching.sh
 
37
 
 
38
$(PARSER):
 
39
        make -C $(PARSER_DIR) $(PARSER_BIN)
 
40
 
 
41
clean:
 
42
        rm -f simple_tests/generated_x/*
 
43
        rm -f simple_tests/generated_perms_leading/*
 
44
        rm -f simple_tests/generated_perms_safe/*