Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tatt.5
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,13 @@ which usually resides \fI /usr/lib/${python}/site-packages/tatt \fI
.br
#emergeopts="-v"

.br
# Whether to depclean package dependencies before each build test
.br
# (only applies to usecombis). Set any non-empty value to use.
.br
#cleandeps="yes"

.br
# Bugzilla API key, generated at \fIhttps://bugs.gentoo.org/userprefs.cgi?tab=apikey\fP
.br
Expand Down
1 change: 1 addition & 0 deletions tatt/dot-tatt-spec
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ unmaskdir=string(default="/etc/portage/package.accept_keywords")
arch=string(default="x86")
defaultopts=string(default="")
emergeopts=string(default="")
cleandeps=string(default="")
rdeps=integer(0,512,default=10)
usecombis=integer(0,512,default=12)
repodir=string(default="")
Expand Down
1 change: 1 addition & 0 deletions tatt/scriptwriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def scriptTemplate(job, config, filename):

snippet = snippetfile.read()
snippet = snippet.replace("@@EMERGEOPTS@@", config['emergeopts'])
snippet = snippet.replace("@@CLEANDEPS@@", config['cleandeps'])
if job.bugnumber:
snippet = snippet.replace("@@BUG@@", job.bugnumber)
else:
Expand Down
10 changes: 10 additions & 0 deletions templates/tatt_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ function tatt_pkg_error

function tatt_test_pkg
{
# unmerge dependencies before tests
if [[ -n $TATT_CLEANDEPS ]]; then
CLEAN_DELAY=0 emerge -cq
fi

if [ "${1:?}" == "--test" ]; then
shift
if ! emerge --onlydeps -1 --with-test-deps ${TATT_EMERGEOPTS} "${1:?}"; then
Expand All @@ -53,6 +58,11 @@ function tatt_test_pkg
TFEATURES="${FEATURES} test"
else
TFEATURES="${FEATURES}"
# if not testing, install regular deps first
if ! emerge --onlydeps -1 ${TATT_EMERGEOPTS} "${1:?}"; then
echo "merging dependencies of $1 failed" >> "${TATT_REPORTFILE}"
return 0
fi
fi

# --usepkg-exclude needs the package name, so let's extract it
Expand Down
1 change: 1 addition & 0 deletions templates/use-header
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export TATT_TEST_TYPE="use"
export TATT_REPORTFILE="@@REPORTFILE@@"
export TATT_BUILDLOGDIR="@@BUILDLOGDIR@@"
export TATT_EMERGEOPTS="@@EMERGEOPTS@@"
export TATT_CLEANDEPS="@@CLEANDEPS@@"

source "@@TEMPLATEDIR@@tatt_functions.sh"

Expand Down