Mercurial > octave
annotate build-aux/update-bug-status.sh @ 23572:0703d31e1ec0
new script for updating test status for fixed bugs
* build-aux/update-bug-status.sh: New script.
* build-aux/module.mk: New file.
* Makefile.am: Include it.
* scripts/module.mk (FCN_FILES_WITH_TESTS): New variable.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 09 Jun 2017 17:40:34 -0400 |
parents | |
children | 11729ca6eb81 |
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 |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
2 |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
3 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
|
4 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
|
5 done | sort -u) |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
6 |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
7 fixed_bug_numbers=$(for num in $bug_numbers; do |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
8 status=$(wget -q -O - http://octave.org/testfailure/?$num | sed -n 's/.*>Status:<\/span><\/span> <\/td><td valign="middle" width="35%">\([^<]*\)<.*/\1/p'); |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
9 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
|
10 done) |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
11 |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
12 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
|
13 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
|
14 exit 0; |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
15 fi |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
16 |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
17 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
|
18 |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
19 for file in "$@"; do |
0703d31e1ec0
new script for updating test status for fixed bugs
John W. Eaton <jwe@octave.org>
parents:
diff
changeset
|
20 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
|
21 done |