From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1QlJGY-0000WU-Gg for garchives@archives.gentoo.org; Mon, 25 Jul 2011 11:24:06 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0931121C364; Mon, 25 Jul 2011 11:23:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id BCDB421C364 for ; Mon, 25 Jul 2011 11:23:57 +0000 (UTC) Received: from pelican.gentoo.org (unknown [66.219.59.40]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 0A7A12AC001 for ; Mon, 25 Jul 2011 11:23:57 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 69EA68003D for ; Mon, 25 Jul 2011 11:23:56 +0000 (UTC) From: "Andrea Arteaga" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andrea Arteaga" Message-ID: Subject: [gentoo-commits] proj/auto-numerical-bench:unstable commit in: / X-VCS-Repository: proj/auto-numerical-bench X-VCS-Files: basemodule.py btlbase.py main.py pblas.py X-VCS-Directories: / X-VCS-Committer: spiros X-VCS-Committer-Name: Andrea Arteaga X-VCS-Revision: f737882e10972a73328f57e35a394246d6837b19 Date: Mon, 25 Jul 2011 11:23:56 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: X-Archives-Hash: 810da1bdc61bf22219946331b5dd59db commit: f737882e10972a73328f57e35a394246d6837b19 Author: spiros gmail com> AuthorDate: Mon Jul 25 11:23:20 2011 +0000 Commit: Andrea Arteaga gmail com> CommitDate: Mon Jul 25 11:23:20 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/auto-numerica= l-bench.git;a=3Dcommit;h=3Df737882e Merge some changes. --- basemodule.py | 2 +- btlbase.py | 12 +++++------- main.py | 26 ++++---------------------- pblas.py | 1 + 4 files changed, 11 insertions(+), 30 deletions(-) diff --git a/basemodule.py b/basemodule.py index 71e2bea..169744b 100644 --- a/basemodule.py +++ b/basemodule.py @@ -238,7 +238,7 @@ class BaseTest: logfile =3D pjoin(self.logdir, name+"_run.log") retcode =3D self._executeTest(exe) if retcode !=3D 0: - Print("Test failed") + Print("Test failed with code " + str(retcode)) Print("See log: " + logfile) return Print("Test successful") diff --git a/btlbase.py b/btlbase.py index 7ac0818..4b28e0c 100644 --- a/btlbase.py +++ b/btlbase.py @@ -22,11 +22,9 @@ class BTLBase(basemodule.BaseModule): =20 class BTLTest(basemodule.BaseTest): =20 - compileenv =3D {} - runenv =3D {} - =20 def _compileTest(self): self.compileenv =3D {} + self.runenv =3D {} =20 # Includes includes =3D [pjoin(cfg.btldir, i) for i in \ @@ -105,13 +103,12 @@ class BTLTest(basemodule.BaseTest): # Open pipe logfile =3D file(pjoin(self.logdir, 'btlrun.log'), 'w') args =3D preargs + [exe] + list(self.tests) - logfile.write(' '.join([n+'=3D'+v for n,v in self.runenv.items()= ]) + ' ') + logfile.write(' '.join( \ + [n + '=3D"'+v+'"' for n,v in self.runenv.items()] ) + ' ') logfile.write(' '.join(args) + '\n') logfile.write(80*'-' + '\n') proc =3D sp.Popen(args, bufsize=3D1, stdout=3Dsp.PIPE, stderr=3D= sp.PIPE,=20 - #env=3Dself.runenv, - env=3D{'LD_LIBRARY_PATH' : self.runenv['LD_LIBRARY_PATH']}, - cwd=3Dself.testdir) + env=3Dself.runenv, cwd=3Dself.testdir) =20 # Interpret output while True: @@ -138,4 +135,5 @@ class BTLTest(basemodule.BaseTest): Print.up() logfile.close() proc.wait() + Print("Execution finished with return code " + str(proc.returnco= de)) return proc.returncode \ No newline at end of file diff --git a/main.py b/main.py index 561d5d9..f0a6200 100755 --- a/main.py +++ b/main.py @@ -24,10 +24,13 @@ try: mod =3D tmp.Module(sys.argv[3:]) del tmp cfg.makedirs() -except ImportError, IndexError: +except ImportError as e: print e print_usage() exit(1) +except IndexError: + print_usage() + exit(1) =20 =20 def tests_from_input(input): @@ -84,27 +87,6 @@ used at compile-time as dictionary (it can just be a v= oid one). After the tests every successful tested item will contain the item "resu= lt", which can contain any type of data and will be used for the final report= . """ -#tests =3D { -# "reference-gfortran" : { -# "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'), -# "env" : {'FC' : 'gfortran'} -# }, -# =20 -# "eigen-gcc" : { -# "package" : ('dev-cpp', 'eigen', '3.0.0', 'r1'), -# "env" : {'CXX' : 'g++', 'CXXFLAGS' : '-O2'} -# }, -# =20 -# "eigen-icc" : { -# "package" : ('dev-cpp', 'eigen', '3.0.0', 'r1'), -# "env" : {'CXX' : 'icc', 'CXXFLAGS' : '-O3'} -# }, -# -# "reference-ifort" : { -# "package" : ('sci-libs', 'blas-reference', '3.3.1', 'r1'), -# "env" : {'FC' : 'ifort'} -# } -#} =20 =20 """ diff --git a/pblas.py b/pblas.py index 64d1eb7..9f136c6 100644 --- a/pblas.py +++ b/pblas.py @@ -54,6 +54,7 @@ class PBLASTest(btlbase.BTLTest): return shlex.split(out)[1:] + btlbase.BTLTest._get_flags(self) =20 def _executeTest(self, exe): + self.runenv =3D os.environ btlbase.BTLTest._executeTest(self, exe, ['mpirun', '-n', str(num= proc)]) =20 @staticmethod