Gentoo Archives: gentoo-commits

From: Richard Farina <zerochaos@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qa-scripts:master commit in: tinderbox/
Date: Thu, 28 Aug 2014 18:12:51
Message-Id: 1409247562.6f206114aa3b978fc7206cd2d329114db461ea55.zerochaos@gentoo
1 commit: 6f206114aa3b978fc7206cd2d329114db461ea55
2 Author: Rick Farina (Zero_Chaos) <zerochaos <AT> gentoo <DOT> org>
3 AuthorDate: Thu Aug 28 17:39:22 2014 +0000
4 Commit: Richard Farina <zerochaos <AT> gentoo <DOT> org>
5 CommitDate: Thu Aug 28 17:39:22 2014 +0000
6 URL: http://sources.gentoo.org/gitweb/?p=proj/qa-scripts.git;a=commit;h=6f206114
7
8 check ${T}"/logging/* existence before grepping
9
10 sometimes there are no files in ${T}"/logging/ and grep makes an ugly
11 error. check for files there before grepping. Fix check to remove
12 portageqa, it seem the opposite of test -s ( file exists and has size
13 greater than zero ) matched when the file doesn't exist... well, that is
14 the opposite after all.
15
16 ---
17 tinderbox/bashrc | 6 ++++--
18 1 file changed, 4 insertions(+), 2 deletions(-)
19
20 diff --git a/tinderbox/bashrc b/tinderbox/bashrc
21 index 8533e2b..6d21868 100644
22 --- a/tinderbox/bashrc
23 +++ b/tinderbox/bashrc
24 @@ -108,9 +108,11 @@ tinderbox_postinst_checks() {
25
26 SANDBOX_ON=0 cp "${T}"/testsfailed "${BUILD_DATA_DIR}" 2> /dev/null
27 SANDBOX_ON=0 find "${T}" -name "tinderbox-*.log" -not -empty -execdir mv '{}' "${BUILD_DATA_DIR}" \;
28 - SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* > "${BUILD_DATA_DIR}"/portageqa
29 + if [ ls "${T}"/logging/* > /dev/null 2>&1 ] ; then
30 + SANDBOX_ON=0 grep --no-filename QA "${T}"/logging/* > "${BUILD_DATA_DIR}"/portageqa
31 + fi
32
33 - if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] ; then
34 + if [[ ! -s "${BUILD_DATA_DIR}"/portageqa ]] && [ -f "${BUILD_DATA_DIR}"/portageqa ] ; then
35 SANDBOX_ON=0 rm "${BUILD_DATA_DIR}"/portageqa
36 fi