diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-18 21:23:09 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2019-03-18 21:23:09 +0000 |
commit | 10f47d3d1dc2e1267a32fa6459655b4645a9adad (patch) | |
tree | 97d68e0e70fb780b04f3171a0f53102a39c23f41 /contrib | |
parent | f8c264049036ace8b02a73fe76b4470b8e0df0c0 (diff) | |
parent | a8b58d84bf4fd9c925a835ba39c1c552383bc61b (diff) | |
download | gcc-10f47d3d1dc2e1267a32fa6459655b4645a9adad.zip gcc-10f47d3d1dc2e1267a32fa6459655b4645a9adad.tar.gz gcc-10f47d3d1dc2e1267a32fa6459655b4645a9adad.tar.bz2 |
Merge from trunk revision 269780.
From-SVN: r269782
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/ChangeLog | 30 | ||||
-rwxr-xr-x | contrib/check-internal-format-escaping.py | 64 | ||||
-rwxr-xr-x | contrib/check-params-in-docs.py | 5 | ||||
-rw-r--r-- | contrib/dg-extract-results.py | 4 | ||||
-rwxr-xr-x | contrib/dg-extract-results.sh | 1 | ||||
-rwxr-xr-x | contrib/download_prerequisites | 2 |
6 files changed, 101 insertions, 5 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog index cd4eef3..74e9592 100644 --- a/contrib/ChangeLog +++ b/contrib/ChangeLog @@ -1,3 +1,33 @@ +2019-03-11 Martin Liska <mliska@suse.cz> + + * check-internal-format-escaping.py: Uncomment apostrophes + check. + +2019-03-11 Martin Liska <mliska@suse.cz> + + * check-internal-format-escaping.py: New file. + +2019-03-10 Tommy Nguyen <remyabel@gmail.com> + + PR contrib/82704 + * download_prerequisites: Use -c instead of --check for sha512sum. + +2019-03-06 Martin Liska <mliska@suse.cz> + + * check-params-in-docs.py: Ignore a param. + +2019-03-05 Christophe Lyon <christophe.lyon@linaro.org> + + contrib/ + * dg-extract-results.py: Handle case where a WARNING happens with + the first test of a harness. + +2019-03-05 Christophe Lyon <christophe.lyon@linaro.org> + + contrib/ + * dg-extract-results.sh: Fix order of WARNING and following test + result. + 2019-02-04 Christophe Lyon <christophe.lyon@linaro.org> contrib/ diff --git a/contrib/check-internal-format-escaping.py b/contrib/check-internal-format-escaping.py new file mode 100755 index 0000000..5da56b5 --- /dev/null +++ b/contrib/check-internal-format-escaping.py @@ -0,0 +1,64 @@ +#!/usr/bin/env python3 +# +# Check gcc.pot file for gcc-internal-format and print all strings +# that contain an option that is not wrapped by %<-option_name%>. +# +# This file is part of GCC. +# +# GCC is free software; you can redistribute it and/or modify it under +# the terms of the GNU General Public License as published by the Free +# Software Foundation; either version 3, or (at your option) any later +# version. +# +# GCC is distributed in the hope that it will be useful, but WITHOUT ANY +# WARRANTY; without even the implied warranty of MERCHANTABILITY or +# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +# for more details. +# +# You should have received a copy of the GNU General Public License +# along with GCC; see the file COPYING3. If not see +# <http://www.gnu.org/licenses/>. */ +# +# +# + +import argparse +import re + +parser = argparse.ArgumentParser(description='') +parser.add_argument('file', help = 'pot file') + +args = parser.parse_args() + +origin = None +internal = False + +lines = open(args.file).readlines() +for i, l in enumerate(lines): + l = l.strip() + s = 'msgid ' + if l.startswith('#: '): + origin = l + elif '#, gcc-internal-format' in l: + internal = True + if l.startswith(s) and origin and internal: + j = 0 + while not lines[i + j].startswith('msgstr'): + l = lines[i + j] + if l.startswith(s): + l = l[len(s):] + text = l.strip('"').strip() + if text: + parts = text.split(' ') + for p in parts: + if p.startswith('-'): + if len(p) >= 2 and (p[1].isalpha() and p != '-INF'): + print('%s: %s' % (origin, text)) + elif p.startswith('__builtin_'): + print('%s: %s' % (origin, text)) + if re.search("[a-zA-Z]'[a-zA-Z]", p): + print('%s: %s' % (origin, text)) + j += 1 + + origin = None + internal = False diff --git a/contrib/check-params-in-docs.py b/contrib/check-params-in-docs.py index eb36f4b..6cff090 100755 --- a/contrib/check-params-in-docs.py +++ b/contrib/check-params-in-docs.py @@ -39,6 +39,7 @@ parser.add_argument('params_output') args = parser.parse_args() +ignored = set(['logical-op-non-short-circuit']) params = {} for line in open(args.params_output).readlines(): @@ -56,8 +57,8 @@ token = '@item ' texi = [x[len(token):] for x in texi if x.startswith(token)] sorted_texi = sorted(texi) -texi_set = set(texi) -params_set = set(params.keys()) +texi_set = set(texi) - ignored +params_set = set(params.keys()) - ignored extra = texi_set - params_set if len(extra): diff --git a/contrib/dg-extract-results.py b/contrib/dg-extract-results.py index ed62f73..5bf2f87 100644 --- a/contrib/dg-extract-results.py +++ b/contrib/dg-extract-results.py @@ -307,8 +307,8 @@ class Prog: has_warning = 0 key = (name, len (harness.results)) harness.results.append ((key, line)) - if not first_key and sort_logs: - first_key = key + if not first_key and sort_logs: + first_key = key if line.startswith ('ERROR: (DejaGnu)'): for i in range (len (self.count_names)): if 'DejaGnu errors' in self.count_names[i]: diff --git a/contrib/dg-extract-results.sh b/contrib/dg-extract-results.sh index e9833c1..86c4246 100755 --- a/contrib/dg-extract-results.sh +++ b/contrib/dg-extract-results.sh @@ -350,6 +350,7 @@ BEGIN { if (timeout_cnt != 0) { printf "%s %08d|%s program timed out.\n", testname, timeout_cnt, timeout_msg >> curfile timeout_cnt = 0 + cnt = cnt + 1 } printf "%s %08d|", testname, cnt >> curfile cnt = cnt + 1 diff --git a/contrib/download_prerequisites b/contrib/download_prerequisites index b50f47c..72976c4 100755 --- a/contrib/download_prerequisites +++ b/contrib/download_prerequisites @@ -51,7 +51,7 @@ case $OS in chksum='shasum -a 512 --check' ;; *) - chksum='sha512sum --check' + chksum='sha512sum -c' ;; esac |