diff options
author | 2018-07-05 22:13:05 +0200 | |
---|---|---|
committer | 2018-07-05 22:18:11 +0200 | |
commit | 1058b343565f27b3066351b4d4a577ce81bb87dc (patch) | |
tree | d8c18127e84b81ae9d030017b0cea4b02856571b | |
parent | add an explicit snippet for package test *-useflags.sh (diff) | |
download | tatt-1058b343565f27b3066351b4d4a577ce81bb87dc.tar.gz tatt-1058b343565f27b3066351b4d4a577ce81bb87dc.tar.bz2 tatt-1058b343565f27b3066351b4d4a577ce81bb87dc.zip |
get rid of all FEATURES messing in the generator
This can now completely be handled in the templates.
-rw-r--r-- | tatt/scriptwriter.py | 5 | ||||
-rw-r--r-- | templates/revdep-snippet | 2 | ||||
-rw-r--r-- | templates/tatt_functions.sh | 6 | ||||
-rw-r--r-- | templates/use-snippet | 7 | ||||
-rw-r--r-- | templates/use-test-snippet | 2 |
5 files changed, 9 insertions, 13 deletions
diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py index d583278..7b788db 100644 --- a/tatt/scriptwriter.py +++ b/tatt/scriptwriter.py @@ -54,13 +54,11 @@ def useCombiTestString(job, pack, config, port): # the package being already installed usetestsnippet = scriptTemplate(job, config, "use-test-snippet") usetestsnippet = usetestsnippet.replace("@@CPV@@", pack.packageString() ) - usetestsnippet = usetestsnippet.replace("@@FEATURES@@", "FEATURES=\"${FEATURES} test\"") s = usetestsnippet.replace("@@USE@@", "") usecombis = findUseFlagCombis (pack, config, port) for uc in usecombis: localsnippet = usesnippet.replace("@@USE@@", uc) - localsnippet = localsnippet.replace("@@FEATURES@@", "") s = s + localsnippet return s @@ -89,9 +87,8 @@ def writeusecombiscript(job, config): ############ RDEPS ################ def rdepTestString(job, rdep, config): - rdepsnippet = scriptTemplate(job, config, "revdep-snippet") + snip = scriptTemplate(job, config, "revdep-snippet") - snip = rdepsnippet.replace("@@FEATURES@@", "FEATURES=\"${FEATURES} test\"") uflags = [] for st in rdep[1]: st = st.strip() diff --git a/templates/revdep-snippet b/templates/revdep-snippet index 72d7dd2..ca99034 100644 --- a/templates/revdep-snippet +++ b/templates/revdep-snippet @@ -1 +1 @@ -@@USE@@ T@@FEATURES@@ tatt_test_pkg "@@CPV@@" +@@USE@@ tatt_test_pkg --test "@@CPV@@" diff --git a/templates/tatt_functions.sh b/templates/tatt_functions.sh index 9aeed69..b7e4e05 100644 --- a/templates/tatt_functions.sh +++ b/templates/tatt_functions.sh @@ -38,11 +38,15 @@ function tatt_pkg_error function tatt_test_pkg { - if [ -n "${TFEATURES}" ]; then + if [ "${1:?}" == "--test" ]; then + shift if ! emerge --onlydeps -1 --with-test-deps ${TATT_EMERGEOPTS} "${1:?}"; then echo "merging test dependencies of ${1} failed" >> "${TATT_REPORTFILE}" return 0 fi + TFEATURES="${FEATURES} test" + else + TFEATURES="${FEATURES}" fi eout=$( FEATURES="${TFEATURES}" emerge -1 ${TATT_EMERGEOPTS} "${1:?}" 2>&1 1>/dev/tty ) diff --git a/templates/use-snippet b/templates/use-snippet index fc88834..50427ba 100644 --- a/templates/use-snippet +++ b/templates/use-snippet @@ -1,6 +1 @@ -eout=$( @@USE@@ @@FEATURES@@ emerge -1 @@EMERGEOPTS@@ @@CPV@@ 2>&1 1>/dev/tty ) -if [[ $? == 0 ]] ; then - echo "@@USE@@ @@FEATURES@@ succeeded for @@CPV@@" >> @@REPORTFILE@@ -else - @@USE@@ @@FEATURES@@ tatt_pkg_error "@@CPV@@" "${eout}" -fi +@@USE@@ tatt_test_pkg "@@CPV@@" diff --git a/templates/use-test-snippet b/templates/use-test-snippet index 72d7dd2..ca99034 100644 --- a/templates/use-test-snippet +++ b/templates/use-test-snippet @@ -1 +1 @@ -@@USE@@ T@@FEATURES@@ tatt_test_pkg "@@CPV@@" +@@USE@@ tatt_test_pkg --test "@@CPV@@" |