diff options
author | 2019-12-20 15:30:10 +0100 | |
---|---|---|
committer | 2019-12-20 20:56:45 +0100 | |
commit | 41442dc25c6fe59858376c9c6964215341237bc4 (patch) | |
tree | 75fe3a89d1f830595aef4f8d8c764140da543515 | |
parent | remove primary packages from rdeps script (diff) | |
download | tatt-41442dc25c6fe59858376c9c6964215341237bc4.tar.gz tatt-41442dc25c6fe59858376c9c6964215341237bc4.tar.bz2 tatt-41442dc25c6fe59858376c9c6964215341237bc4.zip |
add a return code to the use test script
Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
-rw-r--r-- | tatt/scriptwriter.py | 3 | ||||
-rw-r--r-- | templates/tatt_functions.sh | 1 | ||||
-rw-r--r-- | templates/use-footer | 2 | ||||
-rw-r--r-- | templates/use-header | 2 | ||||
-rw-r--r-- | templates/use-snippet | 2 | ||||
-rw-r--r-- | templates/use-test-snippet | 2 |
6 files changed, 10 insertions, 2 deletions
diff --git a/tatt/scriptwriter.py b/tatt/scriptwriter.py index fa26608..b4bee69 100644 --- a/tatt/scriptwriter.py +++ b/tatt/scriptwriter.py @@ -84,6 +84,9 @@ def writeusecombiscript(job, config): loop = useloop.replace("@@LOOP_BODY@@", useCombiTestString(job, p, config, port)) loop = loop.replace("@@CPV@@", p.packageString()) outfile.write(loop) + if os.path.exists(config['template-dir'] + "use-footer"): + footer = scriptTemplate(job, config, "use-footer") + outfile.write(footer) # Note: fchmod needs the filedescriptor which is an internal # integer retrieved by fileno(). os.fchmod(outfile.fileno(), 0o744) # rwxr--r-- diff --git a/templates/tatt_functions.sh b/templates/tatt_functions.sh index 92db9ba..d2b5bc8 100644 --- a/templates/tatt_functions.sh +++ b/templates/tatt_functions.sh @@ -63,5 +63,6 @@ function tatt_test_pkg echo "USE='${USE}' succeeded for ${1:?}" >> "${TATT_REPORTFILE}" else FEATURES="${TFEATURES}" tatt_pkg_error "${1:?}" "${eout}" + return 1 fi } diff --git a/templates/use-footer b/templates/use-footer new file mode 100644 index 0000000..90349dc --- /dev/null +++ b/templates/use-footer @@ -0,0 +1,2 @@ + +exit ${test_ret} diff --git a/templates/use-header b/templates/use-header index d18e080..9ae0cdb 100644 --- a/templates/use-header +++ b/templates/use-header @@ -11,3 +11,5 @@ export TATT_EMERGEOPTS="@@EMERGEOPTS@@" source "@@TEMPLATEDIR@@tatt_functions.sh" echo -e "USE tests started on $(date)\n" >> @@REPORTFILE@@ + +test_ret=0 diff --git a/templates/use-snippet b/templates/use-snippet index 50427ba..7404452 100644 --- a/templates/use-snippet +++ b/templates/use-snippet @@ -1 +1 @@ -@@USE@@ tatt_test_pkg "@@CPV@@" +@@USE@@ tatt_test_pkg "@@CPV@@" || test_ret=1 diff --git a/templates/use-test-snippet b/templates/use-test-snippet index ca99034..7a5a8a9 100644 --- a/templates/use-test-snippet +++ b/templates/use-test-snippet @@ -1 +1 @@ -@@USE@@ tatt_test_pkg --test "@@CPV@@" +@@USE@@ tatt_test_pkg --test "@@CPV@@" || test_ret=1 |