From: "Andrea Arteaga" <andyspiros@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/utils/
Date: Fri, 30 Mar 2012 07:55:42 +0000 (UTC) [thread overview]
Message-ID: <1333094001.1c12401d70b92dcbbe034c8b0c81ab276525e728.spiros@gentoo> (raw)
commit: 1c12401d70b92dcbbe034c8b0c81ab276525e728
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Fri Mar 30 07:53:21 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Fri Mar 30 07:53:21 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=1c12401d
Added exception handling for starting BTL. Solved portage exception handling.
---
numbench/utils/btl.py | 12 +++++++++---
numbench/utils/portageutils.py | 2 +-
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/numbench/utils/btl.py b/numbench/utils/btl.py
index d464d38..c081ef4 100644
--- a/numbench/utils/btl.py
+++ b/numbench/utils/btl.py
@@ -187,9 +187,15 @@ def runTest(test, btlconfig):
logfs.flush()
# Open pipe
- proc = sp.Popen(args, bufsize=1, stdout=sp.PIPE, stderr=sp.PIPE, \
- env=runenv, cwd=btlconfig['testdir'])
- benchchildren.append(proc)
+ try:
+ proc = sp.Popen(args, bufsize=1, stdout=sp.PIPE, stderr=sp.PIPE, \
+ env=runenv, cwd=btlconfig['testdir'])
+ benchchildren.append(proc)
+ except OSError:
+ Print('Execution failed to start')
+ Print('Command line: ' + ' '.join(args))
+ return -1, None
+
result = {}
diff --git a/numbench/utils/portageutils.py b/numbench/utils/portageutils.py
index f58bb2b..6fa864a 100644
--- a/numbench/utils/portageutils.py
+++ b/numbench/utils/portageutils.py
@@ -158,7 +158,7 @@ def installPackage(test, package=None, env=None, logfile=None):
if p.returncode != 0:
# In case of error, print the whole emerge command
- raise InstallException(p, ' '.join(cmd), logfile)
+ raise InstallException(pkg, ' '.join(cmd), logfile)
fout.write('\n\n' + 80*'#' + '\n\n')
reply other threads:[~2012-03-30 7:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333094001.1c12401d70b92dcbbe034c8b0c81ab276525e728.spiros@gentoo \
--to=andyspiros@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox