提交 cf6d3625 编写于 作者: E Eric Blake 提交者: Daniel Veillard

tests: work around pdwtags 1.9 failure

On rawhide, gcc is new enough to output new DWARF information that
pdwtags has not yet learned, but the resulting 'make check' output
was rather confusing:

$ make -C src check
...
  GEN    virkeepaliveprotocol-structs
die__process_function: DW_TAG_INVALID (0x4109) @ <0x58c> not handled!
WARNING: your pdwtags program is too old
WARNING: skipping the virkeepaliveprotocol-structs test
WARNING: install dwarves-1.3 or newer
...
$ pdwtags --version
v1.9

I've filed the pdwtags deficiency as
https://bugzilla.redhat.com/show_bug.cgi?id=772358

* src/Makefile.am (PDWTAGS): Don't leave -t file behind on version
mismatch.  Soften warning message, since 1.9 is newer than 1.3.
Don't leak stderr from broken version.
上级 03ea5673
## Process this file with automake to produce Makefile.in ## Process this file with automake to produce Makefile.in
## Copyright (C) 2005-2011 Red Hat, Inc. ## Copyright (C) 2005-2012 Red Hat, Inc.
## See COPYING.LIB for the License of this software ## See COPYING.LIB for the License of this software
# No libraries with the exception of LIBXML should be listed # No libraries with the exception of LIBXML should be listed
...@@ -248,8 +248,12 @@ struct_prefix = (remote_|qemu_|virNet|keepalive_) ...@@ -248,8 +248,12 @@ struct_prefix = (remote_|qemu_|virNet|keepalive_)
PDWTAGS = \ PDWTAGS = \
$(AM_V_GEN)if (pdwtags --help) > /dev/null 2>&1; then \ $(AM_V_GEN)if (pdwtags --help) > /dev/null 2>&1; then \
pdwtags --verbose $(<:.lo=.$(OBJEXT)) \ pdwtags --verbose $(<:.lo=.$(OBJEXT)) > $(@F)-t1 2> $(@F)-t2; \
| perl -0777 -n \ if test -s $(@F)-t2; then \
rm -rf $(@F)-t?; \
echo 'WARNING: pdwtags appears broken; skipping the $@ test' >&2;\
else \
perl -0777 -n \
-e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {' \ -e 'foreach my $$p (split m!\n*(?:$(r1)|$(r2))\n!) {' \
-e ' if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||' \ -e ' if ($$p =~ /^(struct|enum) $(struct_prefix)/ ||' \
-e ' $$p =~ /^enum {/) {' \ -e ' $$p =~ /^enum {/) {' \
...@@ -272,9 +276,10 @@ PDWTAGS = \ ...@@ -272,9 +276,10 @@ PDWTAGS = \
-e ' exit 8;' \ -e ' exit 8;' \
-e ' }' \ -e ' }' \
-e '}' \ -e '}' \
> $(@F)-t; \ < $(@F)-t1 > $(@F)-t3; \
case $$? in 8) exit 0;; 0) ;; *) exit 1;; esac; \ case $$? in 8) rm -f $(@F)-t?; exit 0;; 0) ;; *) exit 1;; esac;\
diff -u $(@F)-t $@; st=$$?; rm -f $(@F)-t; exit $$st; \ diff -u $(@F)-t3 $@; st=$$?; rm -f $(@F)-t?; exit $$st; \
fi; \
else \ else \
echo 'WARNING: you lack pdwtags; skipping the $@ test' >&2; \ echo 'WARNING: you lack pdwtags; skipping the $@ test' >&2; \
echo 'WARNING: install the dwarves package to get pdwtags' >&2; \ echo 'WARNING: install the dwarves package to get pdwtags' >&2; \
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册