summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRolf Eike Beer <eike@sf-mail.de>2017-12-27 00:25:27 +0100
committerRolf Eike Beer <eike@sf-mail.de>2017-12-27 00:25:27 +0100
commit88884091543f7f3bbd40ccbf8ff874fe52794575 (patch)
tree9ddd0bfb4f6a314f7697b003996d980981a6d593
parentfix generating list of useflag combinations (diff)
downloadtatt-88884091543f7f3bbd40ccbf8ff874fe52794575.tar.gz
tatt-88884091543f7f3bbd40ccbf8ff874fe52794575.tar.bz2
tatt-88884091543f7f3bbd40ccbf8ff874fe52794575.zip
keep logfiles of failed logs
-rw-r--r--README.md4
-rw-r--r--tatt/dot-tatt-spec1
-rw-r--r--tatt/scriptwriter.py1
-rw-r--r--templates/revdep-header8
-rw-r--r--templates/use-header8
5 files changed, 22 insertions, 0 deletions
diff --git a/README.md b/README.md
index 0dda590..3cea768 100644
--- a/README.md
+++ b/README.md
@@ -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@@