buildroot-test: failure reason regex update
PATCH 1/1 buildroot-test: failure reason regex update
- Sub-make required one additional line tailed
- Both regex to truncate end log and import which sets the failure reason on the report are updated
--- scripts/autobuild-run | 4 ++-- web/import.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)
scripts/autobuild-run +2 -2
@@ -648,10 +648,10 @@ def send_results(result, **kwargs): def get_failure_reason(): # Output is a tuple (package, version), or None. lastlines = decode_bytes(subprocess.Popen( - ["tail", "-n", "3", os.path.join(outputdir, "logfile")], + ["tail", "-n", "4", os.path.join(outputdir, "logfile")], stdout=subprocess.PIPE).communicate()[0]).splitlines() - regexp = re.compile(r'make: \*\*\* .*/(?:build|toolchain)/([^/]*)/') + regexp = re.compile("make.* \*\*\* .*/(?:build|toolchain)/([^/]*)/") for line in lastlines: m = regexp.search(line) if m:
web/import.inc.php +1 -1
@@ -102,7 +102,7 @@ function import_result($buildid, $filename) $reason = "none"; else { $tmp = Array(); - exec("tail -3 " . $thisbuildfinaldir . "build-end.log | grep -v '\[_all\]' | grep 'make.*: \*\*\*' | sed 's,.*\[\([^\]*\)\] Error.*,\\1,' | sed 's,.*/build/\([^/]*\)/.*,\\1,'", $tmp); + exec("tail -4 " . $thisbuildfinaldir . "build-end.log | grep -v '\[_all\]' | grep 'make.* \*\*\*' | sed 's,.*\[\([^\]*\)\] Error.*,\\1,' | sed 's,.*/build/\([^/]*\)/.*,\\1,'", $tmp); if (trim($tmp[0])) $reason = $tmp[0]; else
Signature · 1 line
2.5.0
PATCH 1/1 buildroot-test: failure reason regex update
Hello,
Quoted 32 lines · Matt Weber
- Sub-make required one additional line tailed
- Both regex to truncate end log and import which sets the failure reason on the report are updatedSigned-off-by Matt Weber <[email protected]>--- scripts/autobuild-run | 4 ++-- web/import.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)scripts/autobuild-run +2
-2@@ -648,10 +648,10 @@ def send_results(result, **kwargs): def get_failure_reason(): # Output is a tuple (package, version), or None. lastlines = decode_bytes(subprocess.Popen( - ["tail", "-n", "3", os.path.join(outputdir, "logfile")], + ["tail", "-n", "4", os.path.join(outputdir, "logfile")], stdout=subprocess.PIPE).communicate()[0]).splitlines() - regexp = re.compile(r'make: \*\*\* .*/(?:build|toolchain)/([^/]*)/') + regexp = re.compile("make.* \*\*\* .*/(?:build|toolchain)/([^/]*)/") for line in lastlines: m = regexp.search(line) if m:web/import.inc.php +0
-0
web/import.inc.php function import_result($buildid, $filename) · line 105
Quoted 5 lines
web/import.inc.php +1
-1@@ -102,7 +102,7 @@ function import_result($buildid, $filename) $reason = "none"; else { $tmp = Array(); - exec("tail -3 " . $thisbuildfinaldir . "build-end.log | grep -v '\[_all\]' | grep 'make.*: \*\*\*' | sed 's,.*\[\([^\]*\)\] Error.*,\\1,' | sed 's,.*/build/\([^/]*\)/.*,\\1,'", $tmp); + exec("tail -4 " . $thisbuildfinaldir . "build-end.log | grep -v '\[_all\]' | grep 'make.* \*\*\*' | sed 's,.*\[\([^\]*\)\] Error.*,\\1,' | sed 's,.*/build/\([^/]*\)/.*,\\1,'", $tmp);
I don't see why you are making this change. The ':' is really there:
make[1]: ...
Do you have a case where it isn't present ?
Also why you are changing 3 lines to 4 lines ?
In the autobuilder outputs, I see two cases:
1/ When the correct umask is used, we get:
make: *** [/home/peko/autobuild/instance-2/output/build/tvheadend-cd9f07fb865e5700156546ee326fbaf42ee99cf8/.stamp_configured] Error 1
make: Leaving directory `/home/peko/autobuild/instance-2/buildroot'
2/ When the incorrect umask is used, we get:
make[1]: *** [/home/buildroot/autobuild/run/instance-2/output/build/ffmpeg-2.8.6/.stamp_configured] Error 1
make: *** [_all] Error 2
make: Leaving directory `/home/buildroot/autobuild/run/instance-2/buildroot'
So 3 lines should be fine. Or do you have other cases ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 buildroot-test: failure reason regex update
Thomas,
Quoted 43 lines · Thomas Petazzoni
Hello,
Quoted 32 lines · Matt Weber
- Sub-make required one additional line tailed
- Both regex to truncate end log and import which sets the failure reason on the report are updatedSigned-off-by Matt Weber <[email protected]>--- scripts/autobuild-run | 4 ++-- web/import.inc.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-)scripts/autobuild-run +2
-2@@ -648,10 +648,10 @@ def send_results(result, **kwargs): def get_failure_reason(): # Output is a tuple (package, version), or None. lastlines = decode_bytes(subprocess.Popen( - ["tail", "-n", "3", os.path.join(outputdir, "logfile")], + ["tail", "-n", "4", os.path.join(outputdir, "logfile")], stdout=subprocess.PIPE).communicate()[0]).splitlines() - regexp = re.compile(r'make: \*\*\* .*/(?:build|toolchain)/([^/]*)/') + regexp = re.compile("make.* \*\*\* .*/(?:build|toolchain)/([^/]*)/") for line in lastlines: m = regexp.search(line) if m:web/import.inc.php +0
-0web/import.inc.php function import_result($buildid, $filename) · line 105
Quoted 5 lines
web/import.inc.php +1
-1@@ -102,7 +102,7 @@ function import_result($buildid, $filename) $reason = "none"; else { $tmp = Array(); - exec("tail -3 " . $thisbuildfinaldir . "build-end.log | grep -v '\[_all\]' | grep 'make.*: \*\*\*' | sed 's,.*\[\([^\]*\)\] Error.*,\\1,' | sed 's,.*/build/\([^/]*\)/.*,\\1,'", $tmp); + exec("tail -4 " . $thisbuildfinaldir . "build-end.log | grep -v '\[_all\]' | grep 'make.* \*\*\*' | sed 's,.*\[\([^\]*\)\] Error.*,\\1,' | sed 's,.*/build/\([^/]*\)/.*,\\1,'", $tmp);I don't see why you are making this change. The ':' is really there:
Quoted 3 lines
make[1]: ...Do you have a case where it isn't present ?
I had thought with a regex "make.*:" wouldn't catch "make:". Let me go back and test what might have masked my results when I tested "make.*:".
Quoted 10 lines
Also why you are changing 3 lines to 4 lines ?
In the autobuilder outputs, I see two cases:
1/ When the correct umask is used, we get:
make: *** [
/home/peko/autobuild/instance-2/output/build/tvheadend-cd9f07fb865e5700156546ee326fbaf42ee99cf8/.stamp_configured] Error 1
make: Leaving directory `/home/peko/autobuild/instance-2/buildroot'
Quoted 7 lines
2/ When the incorrect umask is used, we get:
make[1]: *** [
/home/buildroot/autobuild/run/instance-2/output/build/ffmpeg-2.8.6/.stamp_configured] Error 1
make: *** [_all] Error 2
make: Leaving directory `/home/buildroot/autobuild/run/instance-2/buildroot'So 3 lines should be fine. Or do you have other cases ?
I see 2 or less lines for 1/ when I set the umask to 0022 prior to building (I forced this fail, otherwise I'd match your 1/)
package/pkg-generic.mk:128: recipe for target '/opt/buildroot_testing/buildroot/output/build/host-binutils-2.25.1/.stamp_extracted' failed
make: *** [/opt/buildroot_testing/buildroot/output/build/host-binutils-2.25.1/.stamp_extracted] Interrupt
I see the following for 2/
make[1]: *** [/opt/buildroot_testing/buildroot-test/instance-0/output/build/host-genimage-8/.stamp_downloaded] Error 1
Makefile:36: recipe for target '_all' failed
make: *** [_all] Error 2
make: Leaving directory
'/opt/buildroot_testing/buildroot-test/instance-0/buildroot'
Quoted 8 lines
Thanks,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Signature · 2 lines
Thanks, Matt