diff options
Diffstat (limited to 'meta/recipes-support')
-rw-r--r-- | meta/recipes-support/libpcre/libpcre/Makefile | 183 | ||||
-rw-r--r-- | meta/recipes-support/libpcre/libpcre/run-ptest | 3 | ||||
-rw-r--r-- | meta/recipes-support/libpcre/libpcre_8.34.bb | 19 |
3 files changed, 203 insertions, 2 deletions
diff --git a/meta/recipes-support/libpcre/libpcre/Makefile b/meta/recipes-support/libpcre/libpcre/Makefile new file mode 100644 index 0000000000..5419d71f7f --- /dev/null +++ b/meta/recipes-support/libpcre/libpcre/Makefile | |||
@@ -0,0 +1,183 @@ | |||
1 | TESTS = pcre_stringpiece_unittest RunTest RunGrepTest | ||
2 | subdir = . | ||
3 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
4 | am__vpath_adj = case $$p in \ | ||
5 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
6 | *) f=$$p;; \ | ||
7 | esac; | ||
8 | am__tty_colors_dummy = \ | ||
9 | mgn= red= grn= lgn= blu= brg= std=; \ | ||
10 | am__color_tests=no | ||
11 | am__tty_colors = { \ | ||
12 | $(am__tty_colors_dummy); \ | ||
13 | if test "X$(AM_COLOR_TESTS)" = Xno; then \ | ||
14 | am__color_tests=no; \ | ||
15 | elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ | ||
16 | am__color_tests=yes; \ | ||
17 | elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ | ||
18 | am__color_tests=yes; \ | ||
19 | fi; \ | ||
20 | if test $$am__color_tests = yes; then \ | ||
21 | red='[0;31m'; \ | ||
22 | grn='[0;32m'; \ | ||
23 | lgn='[1;32m'; \ | ||
24 | blu='[1;34m'; \ | ||
25 | mgn='[0;35m'; \ | ||
26 | brg='[1m'; \ | ||
27 | std='[m'; \ | ||
28 | fi; \ | ||
29 | } | ||
30 | am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } | ||
31 | am__sh_e_setup = case $$- in *e*) set +e;; esac | ||
32 | am__common_driver_flags = \ | ||
33 | --color-tests "$$am__color_tests" \ | ||
34 | --enable-hard-errors "$$am__enable_hard_errors" \ | ||
35 | --expect-failure "$$am__expect_failure" | ||
36 | am__check_pre = \ | ||
37 | $(am__sh_e_setup); \ | ||
38 | $(am__vpath_adj_setup) $(am__vpath_adj) \ | ||
39 | $(am__tty_colors); \ | ||
40 | srcdir=$(srcdir); export srcdir; \ | ||
41 | case "$@" in \ | ||
42 | */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ | ||
43 | *) am__odir=.;; \ | ||
44 | esac; \ | ||
45 | test "x$$am__odir" = x"." || test -d "$$am__odir" \ | ||
46 | || $(MKDIR_P) "$$am__odir" || exit $$?; \ | ||
47 | if test -f "./$$f"; then dir=./; \ | ||
48 | elif test -f "$$f"; then dir=; \ | ||
49 | else dir="$(srcdir)/"; fi; \ | ||
50 | tst=$$dir$$f; log='$@'; \ | ||
51 | if test -n '$(DISABLE_HARD_ERRORS)'; then \ | ||
52 | am__enable_hard_errors=no; \ | ||
53 | else \ | ||
54 | am__enable_hard_errors=yes; \ | ||
55 | fi; | ||
56 | am__set_TESTS_bases = \ | ||
57 | bases='$(TEST_LOGS)'; \ | ||
58 | bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ | ||
59 | bases=`echo $$bases` | ||
60 | RECHECK_LOGS = $(TEST_LOGS) | ||
61 | TEST_SUITE_LOG = test-suite.log | ||
62 | TEST_EXTENSIONS = .test | ||
63 | LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver | ||
64 | am__test_logs1 = $(TESTS:=.log) | ||
65 | am__test_logs2 = $(am__test_logs1:.log=.log) | ||
66 | TEST_LOGS = $(am__test_logs2:.test.log=.log) | ||
67 | MKDIR_P = /bin/mkdir -p | ||
68 | PACKAGE_STRING = PCRE 8.34 | ||
69 | SHELL = /bin/sh | ||
70 | srcdir = . | ||
71 | top_srcdir = . | ||
72 | $(TEST_SUITE_LOG): $(TEST_LOGS) | ||
73 | @$(am__set_TESTS_bases); \ | ||
74 | am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ | ||
75 | redo_bases=`for i in $$bases; do \ | ||
76 | am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ | ||
77 | done`; \ | ||
78 | st=0; \ | ||
79 | errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ | ||
80 | for i in $$redo_bases; do \ | ||
81 | test -f $$i.trs && test -r $$i.trs \ | ||
82 | || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ | ||
83 | test -f $$i.log && test -r $$i.log \ | ||
84 | || { echo "$$errmsg $$i.log" >&2; st=1; }; \ | ||
85 | done; \ | ||
86 | test $$st -eq 0 || exit 1; | ||
87 | @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ | ||
88 | ws='[ ]'; \ | ||
89 | results=`for b in $$bases; do echo $$b.trs; done`; \ | ||
90 | test -n "$$results" || results=/dev/null; \ | ||
91 | all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ | ||
92 | pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ | ||
93 | fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ | ||
94 | skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ | ||
95 | xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ | ||
96 | xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ | ||
97 | error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ | ||
98 | if test `expr $$fail + $$xpass + $$error` -eq 0; then \ | ||
99 | success=true; \ | ||
100 | else \ | ||
101 | success=false; \ | ||
102 | fi; \ | ||
103 | br='==================='; br=$$br$$br$$br$$br; \ | ||
104 | result_count () \ | ||
105 | { \ | ||
106 | if test x"$$1" = x"--maybe-color"; then \ | ||
107 | maybe_colorize=yes; \ | ||
108 | elif test x"$$1" = x"--no-color"; then \ | ||
109 | maybe_colorize=no; \ | ||
110 | else \ | ||
111 | echo "$@: invalid 'result_count' usage" >&2; exit 4; \ | ||
112 | fi; \ | ||
113 | shift; \ | ||
114 | desc=$$1 count=$$2; \ | ||
115 | if test $$maybe_colorize = yes && test $$count -gt 0; then \ | ||
116 | color_start=$$3 color_end=$$std; \ | ||
117 | else \ | ||
118 | color_start= color_end=; \ | ||
119 | fi; \ | ||
120 | echo "$${color_start}# $$desc $$count$${color_end}"; \ | ||
121 | }; \ | ||
122 | create_testsuite_report () \ | ||
123 | { \ | ||
124 | result_count $$1 "TOTAL:" $$all "$$brg"; \ | ||
125 | result_count $$1 "PASS: " $$pass "$$grn"; \ | ||
126 | result_count $$1 "SKIP: " $$skip "$$blu"; \ | ||
127 | result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ | ||
128 | result_count $$1 "FAIL: " $$fail "$$red"; \ | ||
129 | result_count $$1 "XPASS:" $$xpass "$$red"; \ | ||
130 | result_count $$1 "ERROR:" $$error "$$mgn"; \ | ||
131 | }; \ | ||
132 | { \ | ||
133 | echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ | ||
134 | $(am__rst_title); \ | ||
135 | create_testsuite_report --no-color; \ | ||
136 | echo; \ | ||
137 | echo ".. contents:: :depth: 2"; \ | ||
138 | echo; \ | ||
139 | for b in $$bases; do echo $$b; done; \ | ||
140 | } >$(TEST_SUITE_LOG).tmp || exit 1; \ | ||
141 | mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ | ||
142 | if $$success; then \ | ||
143 | col="$$grn"; \ | ||
144 | else \ | ||
145 | col="$$red"; \ | ||
146 | test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ | ||
147 | fi; \ | ||
148 | echo "$${col}$$br$${std}"; \ | ||
149 | echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ | ||
150 | echo "$${col}$$br$${std}"; \ | ||
151 | create_testsuite_report --maybe-color; \ | ||
152 | echo "$$col$$br$$std"; \ | ||
153 | if $$success; then :; else \ | ||
154 | echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ | ||
155 | echo "$$col$$br$$std"; \ | ||
156 | fi; \ | ||
157 | $$success || exit 1 | ||
158 | check-TESTS: | ||
159 | @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list | ||
160 | @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) | ||
161 | @set +e; $(am__set_TESTS_bases); \ | ||
162 | log_list=`for i in $$bases; do echo $$i.log; done`; \ | ||
163 | log_list=`echo $$log_list`; \ | ||
164 | $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ | ||
165 | exit $$?; | ||
166 | pcre_stringpiece_unittest.log: pcre_stringpiece_unittest$(EXEEXT) | ||
167 | @p='pcre_stringpiece_unittest$(EXEEXT)'; \ | ||
168 | b='pcre_stringpiece_unittest'; \ | ||
169 | $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ | ||
170 | --log-file $$b.log --trs-file $$b.trs \ | ||
171 | $(am__common_driver_flags) -- "$$tst" | ||
172 | RunTest.log: RunTest | ||
173 | @p='RunTest'; \ | ||
174 | b='RunTest'; \ | ||
175 | $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ | ||
176 | --log-file $$b.log --trs-file $$b.trs \ | ||
177 | $(am__common_driver_flags) -- "$$tst" | ||
178 | RunGrepTest.log: RunGrepTest | ||
179 | @p='RunGrepTest'; \ | ||
180 | b='RunGrepTest'; \ | ||
181 | $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ | ||
182 | --log-file $$b.log --trs-file $$b.trs \ | ||
183 | $(am__common_driver_flags) -- "$$tst" | ||
diff --git a/meta/recipes-support/libpcre/libpcre/run-ptest b/meta/recipes-support/libpcre/libpcre/run-ptest new file mode 100644 index 0000000000..990d4a12ad --- /dev/null +++ b/meta/recipes-support/libpcre/libpcre/run-ptest | |||
@@ -0,0 +1,3 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | make check-TESTS | ||
diff --git a/meta/recipes-support/libpcre/libpcre_8.34.bb b/meta/recipes-support/libpcre/libpcre_8.34.bb index 0c2b0828b1..5c5072cb90 100644 --- a/meta/recipes-support/libpcre/libpcre_8.34.bb +++ b/meta/recipes-support/libpcre/libpcre_8.34.bb | |||
@@ -9,7 +9,10 @@ LICENSE = "BSD" | |||
9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=0920cc1a9f7ba95464491fa83c86afd8" | 9 | LIC_FILES_CHKSUM = "file://LICENCE;md5=0920cc1a9f7ba95464491fa83c86afd8" |
10 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/pcre/pcre/${PV}/pcre-${PV}.tar.bz2 \ | 10 | SRC_URI = "${SOURCEFORGE_MIRROR}/project/pcre/pcre/${PV}/pcre-${PV}.tar.bz2 \ |
11 | file://pcre-cross.patch \ | 11 | file://pcre-cross.patch \ |
12 | file://fix-pcre-name-collision.patch" | 12 | file://fix-pcre-name-collision.patch \ |
13 | file://run-ptest \ | ||
14 | file://Makefile \ | ||
15 | " | ||
13 | 16 | ||
14 | SRC_URI[md5sum] = "5439e321351bddd5533551bbce128d07" | 17 | SRC_URI[md5sum] = "5439e321351bddd5533551bbce128d07" |
15 | SRC_URI[sha256sum] = "b6043ae1ff2720be665ffa28dc22b7c637cdde96f389a116c0c3020caeae583f" | 18 | SRC_URI[sha256sum] = "b6043ae1ff2720be665ffa28dc22b7c637cdde96f389a116c0c3020caeae583f" |
@@ -21,7 +24,7 @@ DEPENDS += "bzip2 zlib" | |||
21 | 24 | ||
22 | PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline," | 25 | PACKAGECONFIG[pcretest-readline] = "--enable-pcretest-libreadline,--disable-pcretest-libreadline,readline," |
23 | 26 | ||
24 | inherit autotools binconfig | 27 | inherit autotools binconfig ptest |
25 | 28 | ||
26 | PARALLEL_MAKE = "" | 29 | PARALLEL_MAKE = "" |
27 | 30 | ||
@@ -56,3 +59,15 @@ FILES_pcretest = "${bindir}/pcretest" | |||
56 | FILES_pcretest-doc = "${mandir}/man1/pcretest.1" | 59 | FILES_pcretest-doc = "${mandir}/man1/pcretest.1" |
57 | 60 | ||
58 | BBCLASSEXTEND = "native nativesdk" | 61 | BBCLASSEXTEND = "native nativesdk" |
62 | |||
63 | do_install_ptest() { | ||
64 | t=${D}${PTEST_PATH} | ||
65 | cp ${WORKDIR}/Makefile $t | ||
66 | cp -r ${S}/testdata $t | ||
67 | for i in pcre_stringpiece_unittest pcregrep pcretest; \ | ||
68 | do cp ${B}/.libs/$i $t; \ | ||
69 | done | ||
70 | for i in RunTest RunGrepTest test-driver; \ | ||
71 | do cp ${S}/$i $t; \ | ||
72 | done | ||
73 | } | ||