* [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/utils/
@ 2012-03-30 7:55 Andrea Arteaga
0 siblings, 0 replies; only message in thread
From: Andrea Arteaga @ 2012-03-30 7:55 UTC (permalink / raw
To: gentoo-commits
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')
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-03-30 7:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 7:55 [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/utils/ Andrea Arteaga
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox