diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | tatt/dot-tatt-spec | 1 | ||||
-rw-r--r-- | tatt/scriptwriter.py | 1 | ||||
-rw-r--r-- | templates/revdep-header | 8 | ||||
-rw-r--r-- | templates/use-header | 8 |
5 files changed, 22 insertions, 0 deletions
@@ -124,4 +124,8 @@ The specification of the configuration file can be found in dot-tatt-spec which # All emerge runs in the generated scripts are automatically passed # the -1 option. Here you can specify additional options. # emergeopts="-v" + +# directory where logs of failed builds will be stored +# the exact name of the log will be shown in the report file +# buildlogdir="./tatt/logs" ``` diff --git a/tatt/dot-tatt-spec b/tatt/dot-tatt-spec index 9c6686d..fb6cdf4 100644 --- a/tatt/dot-tatt-spec +++ b/tatt/dot-tatt-spec @@ -12,3 +12,4 @@ tinderbox-url=string(default="http://qa-reports.gentoo.org/output/genrdeps/rinde safedir=string(default="") bugzilla-url=string(default="https://bugs.gentoo.org") bugzilla-key=string(default="") +buildlogdir=string(default="") diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py index 6a51433..9eabdc0 100644 --- a/tatt/scriptwriter.py +++ b/tatt/scriptwriter.py @@ -26,6 +26,7 @@ def scriptTemplate(jobname, config, filename): snippet = snippet.replace("@@JOB@@", jobname) snippet = snippet.replace("@@ARCH@@", config['arch']) snippet = snippet.replace("@@REPORTFILE@@", reportname) + snippet = snippet.replace("@@BUILDLOGDIR@@", config['buildlogdir']) return snippet def useCombiTestString(jobname, pack, config, port): diff --git a/templates/revdep-header b/templates/revdep-header index e408efe..5d01821 100644 --- a/templates/revdep-header +++ b/templates/revdep-header @@ -29,6 +29,14 @@ function tatt_pkg_error else echo " failed for ${1:?}" >> @@REPORTFILE@@ fi + + CP=${1#=} + BUILDLOG=/var/tmp/portage/${CP}/temp/build.log + if [[ -n "@@BUILDLOGDIR@@" && -s "${BUILDLOG}" ]]; then + LOGNAME=$(mktemp -p "@@BUILDLOGDIR@@" "${CP/\//_}_rdep_XXXXX") + mv "${BUILDLOG}" "${LOGNAME}" + echo " log has been saved as ${LOGNAME}" >> @@REPORTFILE@@ + fi } echo -e "revdep tests started on $(date)\n" >> @@REPORTFILE@@ diff --git a/templates/use-header b/templates/use-header index ab1f334..4000a68 100644 --- a/templates/use-header +++ b/templates/use-header @@ -29,6 +29,14 @@ function tatt_pkg_error else echo " failed for ${1:?}" >> @@REPORTFILE@@ fi + + CP=${1#=} + BUILDLOG=/var/tmp/portage/${CP}/temp/build.log + if [[ -n "@@BUILDLOGDIR@@" && -s "${BUILDLOG}" ]]; then + LOGNAME=$(mktemp -p "@@BUILDLOGDIR@@" "${CP/\//_}_use_XXXXX") + mv "${BUILDLOG}" "${LOGNAME}" + echo " log has been saved as ${LOGNAME}" >> @@REPORTFILE@@ + fi } echo -e "USE tests started on $(date)\n" >> @@REPORTFILE@@ |