Skip to content

Commit

Permalink
keep logfiles of failed logs
Browse files Browse the repository at this point in the history
  • Loading branch information
DerDakon committed Dec 26, 2017
1 parent 8dd9253 commit 8888409
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions README.md
Expand Up @@ -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"
```
1 change: 1 addition & 0 deletions tatt/dot-tatt-spec
Expand Up @@ -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="")
1 change: 1 addition & 0 deletions tatt/scriptwriter.py
Expand Up @@ -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):
Expand Down
8 changes: 8 additions & 0 deletions templates/revdep-header
Expand Up @@ -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@@
8 changes: 8 additions & 0 deletions templates/use-header
Expand Up @@ -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@@

0 comments on commit 8888409

Please sign in to comment.