annotate build-aux/update-bug-status.sh @ 33584:3fe954c2fd25 default tip @

maint: merge stable to default
author Rik <rik@octave.org>
date Mon, 13 May 2024 11:41:11 -0700
parents 2e484f9f1f18
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23572
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
1 #! /bin/sh
29357
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
2
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
3 ########################################################################
29357
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
4 ##
32632
2e484f9f1f18 maint: update Octave Project Developers copyright for the new year
John W. Eaton <jwe@octave.org>
parents: 31706
diff changeset
5 ## Copyright (C) 2017-2024 The Octave Project Developers
29357
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
6 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
7 ## See the file COPYRIGHT.md in the top-level directory of this
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
8 ## distribution or <https://octave.org/copyright/>.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
9 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
10 ## This file is part of Octave.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
11 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
12 ## Octave is free software: you can redistribute it and/or modify it
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
13 ## under the terms of the GNU General Public License as published by
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
14 ## the Free Software Foundation, either version 3 of the License, or
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
15 ## (at your option) any later version.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
16 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
17 ## Octave is distributed in the hope that it will be useful, but
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
18 ## WITHOUT ANY WARRANTY; without even the implied warranty of
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
19 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
20 ## GNU General Public License for more details.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
21 ##
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
22 ## You should have received a copy of the GNU General Public License
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
23 ## along with Octave; see the file COPYING. If not, see
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
24 ## <https://www.gnu.org/licenses/>.
bbbe4dcc7200 use the same comment style for copyright headers in .m files and shell scripts
John W. Eaton <jwe@octave.org>
parents: 27923
diff changeset
25 ##
27923
bd51beb6205e update formatting of copyright notices
John W. Eaton <jwe@octave.org>
parents: 27919
diff changeset
26 ########################################################################
23572
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
27
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
28 bug_numbers=$(for file in "$@"; do
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
29 sed -n "s/.*<\([0-9][0-9][0-9][0-9]*\)>.*/\1/p" "$file"
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
30 done | sort -u)
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
31
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
32 fixed_bug_numbers=$(for num in $bug_numbers; do
26945
05db50358377 * update-bug-status.sh: Delete newline chars in wget output
John W. Eaton <jwe@octave.org>
parents: 26376
diff changeset
33 status=$(wget -q -O - https://octave.org/testfailure/?$num | tr -d '\n' | sed -n 's/.*>Status:<\/span><\/span>&nbsp;<\/td> *<td valign="middle" width="35%">\([^<]*\)<.*/\1/p');
23572
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
34 if [ "$status" = "Fixed" ]; then echo "$num"; fi
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
35 done)
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
36
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
37 if [ -z "$fixed_bug_numbers" ]; then
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
38 echo "no change in bug status"
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
39 exit 0;
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
40 fi
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
41
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
42 fixed_bug_pattern=`echo $fixed_bug_numbers | sed 's/ /\\\\|/g; s/^/<\\\\(/; s/$/\\\\)>/'`
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
43
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
44 for file in "$@"; do
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
45 sed -i "s/$fixed_bug_pattern/<*\1>/" "$file"
0703d31e1ec0 new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff changeset
46 done