Commit Graph

13 Commits

Author SHA1 Message Date
Richard Purdie 3b39971748 classes/lib: Complete transition to python3
This patch contains all the other misc pieces of the transition to
python3 which didn't make sense to be broken into individual patches.

(From OE-Core rev: fcd6b38bab8517d83e1ed48eef1bca9a9a190f57)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-06-02 08:24:01 +01:00
Michael Wood 97531efe4d report-error: Replace the build directory path in the error text
Replace the TOPDIR in the output error file so that the error report once
submitted can then be more easily matched to find duplicate error
reports. This also reduces the need to manually redact any information that
might be in the error log path such as hostnames or home directories.

(From OE-Core rev: ffdc9550c109facf3a3ebdf90c1ba8153cac90dd)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-05-14 23:05:12 +01:00
Mariano Lopez 1f9945266a report-error.bbclass: Support Unicode reports
Currently error-report doesn't manage Unicode because
the files are opened with the default codec.

This patch changes the codec of the files to UTF-8,
this way the reports will include Unicode characters.
This is useful for the qemu output when doing the
testimage task.

[YOCTO #8225]

(From OE-Core rev: afb5308770de776181da5b44f9dc30922836bc38)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-07 00:11:20 +01:00
Martin Jansa 924348d54b report-error: send only last 5242000 characters in error logs
* otherwise whole build report submission is rejected because it's too big

(From OE-Core rev: 3544b4d4d72330eb12bb3cda25cb99ed52c8a2eb)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-09-06 15:26:22 +01:00
Ross Burton 91c1574fbe report-error: expand all variables
BUILDNAME is now composed from ${DATE} and ${TIME} so needs to be expanded to
useful.  Whilst fixing this some other variables were explicitly not expanded
for no clear reason, so expand those too.

(From OE-Core rev: d45f818026429b70d90fb3ae8e017db6516dca44)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:17 +01:00
Mariano Lopez cd379328b9 report-error.bbclass: Added file syncronization.
errorreport_handler would fail if several errors are
triggered at the same time because of two proccess
writting to the same file. This patch add the required
syncronization to handle concurrent process.

[YP #7899]

(From OE-Core rev: 8b20eaf7cbadd0cd87cfa192d60ca1b7da435216)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08 00:01:18 +01:00
Richard Purdie 86d30d756a meta: Add explict getVar param for (non) expansion
Rather than just use d.getVar(X), use the more explict d.getVar(X, False)
since at some point in the future, having the default of expansion would
be nice. This is the first step towards that.

This patch was mostly made using the command:

sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *`

(From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:57:25 +01:00
Michael Wood d5a28582be report-error: Update information on the submission process
The new send-error-report will prompt for review of items and the server is
now specified by using the -s argument.

(From OE-Core rev: c195d70f35ea522854dcdd53aeae60eec6b7ad7e)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-03-10 10:47:39 +00:00
Michael Wood bd84192866 report-error: Catch un-readable log data
If a log data cannot be decoded to utf-8 or read then handle this
gracefully. This can happen if a log file contains binary or something
goes wrong with the file open process.

(From OE-Core rev: 787ffc5e12f1639aa5e0917bb23deced53a0478e)

Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-02-03 14:30:55 +00:00
Richard Purdie 900f27a983 report-error: Handle the case no logfile exists
If the task fails early, no error log may exist. Currently we crash in
that case, this handles the situation more gracefully.

(From OE-Core rev: 1e6bfcab47f532677f87683ba2f5e5fb905e9ba5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-12-21 12:37:52 +00:00
Paul Eggleton 4d96116f1e classes/report-error: tweak summary message
* We don't want everyone to remove their identifying info, just if they
  feel the need to
* Split lines for clarity
* A couple of grammar/spelling tweaks

(From OE-Core rev: b5c7538416e4c7a9e594edf930fa7ee844a347e6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-06-29 09:04:22 +01:00
Saul Wold b882c0f995 report-error: Add posting in the public note
(From OE-Core rev: c2eb5cd1aa4632f7ee8c261414e599dcb6f40a8b)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-04-24 17:55:15 +01:00
Andreea Proca da0a4c7f8d report-error.bbclass: new class to save build information when errors occur
Class is used to save data about errors after every task that failed.
Errors saved as json files in ERROR_REPORT_DIR (defaults to tmp/log/error-report).
To use this class one has to add INHERIT += "report-error" to local.conf.

scripts/send-error-report is a simple script that sends the json file
to a HTTP server that collects data (git://git.yoctoproject.org/error-report-web
is a Django web interface that can be used to receive and visualize
the error reports). The script will give you an URL where you can
find your report.

(From OE-Core rev: f186b4c7c6c975638e60b30a512d669dc6dc390f)

Signed-off-by: Andreea Proca <andreea.b.proca@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2014-02-14 12:30:20 +00:00