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 1QWGx9-0003I3-U7 for garchives@archives.gentoo.org; Mon, 13 Jun 2011 23:53:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id EAAEE1C00A; Mon, 13 Jun 2011 23:53:45 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A68B91C00A for ; Mon, 13 Jun 2011 23:53:45 +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 07FC91B4020 for ; Mon, 13 Jun 2011 23:53:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by pelican.gentoo.org (Postfix) with ESMTP id 664F58003C for ; Mon, 13 Jun 2011 23:53:44 +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: <351b0455f1858ec0f8d19edfba0e0620a4133052.spiros@gentoo> Subject: [gentoo-commits] proj/auto-numerical-bench:master commit in: / X-VCS-Repository: proj/auto-numerical-bench X-VCS-Files: blas.py blastests.in main.py X-VCS-Directories: / X-VCS-Committer: spiros X-VCS-Committer-Name: Andrea Arteaga X-VCS-Revision: 351b0455f1858ec0f8d19edfba0e0620a4133052 Date: Mon, 13 Jun 2011 23:53:44 +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: 83955e1061bd2fc6aceba4030be9271f commit: 351b0455f1858ec0f8d19edfba0e0620a4133052 Author: spiros gmail com> AuthorDate: Mon Jun 13 23:52:50 2011 +0000 Commit: Andrea Arteaga gmail com> CommitDate: Mon Jun 13 23:52:50 2011 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/auto-numerica= l-bench.git;a=3Dcommit;h=3D351b0455 Some bugs solved. --- blas.py | 7 +++++-- blastests.in | 4 ++-- main.py | 23 +++++++++++++++-------- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/blas.py b/blas.py index 295e833..b9d6ed8 100644 --- a/blas.py +++ b/blas.py @@ -4,8 +4,11 @@ import subprocess as sp class Module(blasbase.ModuleBase):=20 @staticmethod def get_impls(root): - return [i for i in os.listdir(root + "/etc/env.d/alternatives/bl= as") \ - if i[0] !=3D '_'] + output =3D sp.Popen( + ['eselect', '--no-color', '--brief', 'blas', 'list'], + env=3D{'ROOT' : root}, stdout=3Dsp.PIPE + ).communicate()[0] + return output.strip().split('\n') =20 def _get_flags(self, root, impl, libdir): # Retrieve pkgconfig settings and map the directories to the new= root diff --git a/blastests.in b/blastests.in index a5f5998..3b80df7 100644 --- a/blastests.in +++ b/blastests.in @@ -1,2 +1,2 @@ -eigen-O2 dev-cpp/eigen-3.0.0-r1 CXX=3Dg++ CXXFLAGS=3D'-O2' -eigen-O3 dev-cpp/eigen-3.0.0-r1 CXX=3Dg++ CXXFLAGS=3D'-O3' +eigen-O2 dev-cpp/eigen-3.0.0-r1 CXX=3Dg++ CXXFLAGS=3D'-O2 -march=3Dnativ= e' +eigen-O3 dev-cpp/eigen-3.0.0-r1 CXX=3Dg++ CXXFLAGS=3D'-O3 -march=3Dnativ= e' diff --git a/main.py b/main.py index a992e58..ea459a4 100644 --- a/main.py +++ b/main.py @@ -22,7 +22,7 @@ class _Print: def down(self, n=3D1): self._level =3D max(self._level+n, 0) =20 -Print =3D _Print(2) +Print =3D _Print(3) =20 =20 # Retrieve relevant directories @@ -54,19 +54,18 @@ def tests_from_input(input): continue if line[0] =3D=3D '#': continue - avail =3D available_packages(spl[1]) env =3D {} # TODO: add @file for env set based on external file # TODO: add -impl for skipping implementation for var in spl[2:]: - s =3D var.split('=3D') + s =3D var.split('=3D', 1) env[s[0]] =3D s[1] - avail =3D available_packages(spl[1]) - if len(avail) > 1: + avail =3D available_packages(spl[1]) + if len(avail) > 1: for n,p in enumerate(avail): - tests[spl[0]+"_%02i"%n] =3D {'package':p , 'env':env} - else: - tests[spl[0]] =3D {'package':avail[0] , 'env':env} + tests[spl[0]+"_%02i"%n] =3D {'package':p , 'env':env} + else: + tests[spl[0]] =3D {'package':avail[0] , 'env':env} return tests =20 =20 @@ -135,6 +134,14 @@ dictionary; the line has to contain: input =3D file(testsfname).read() tests =3D tests_from_input(input) =20 +print "The following tests will be run:" +for tname, ttest in tests.items(): + print "Tests: " + tname + print " - Package: " + "%s/%s-%s-%s" % ttest['package'] + print " - Environment: " + \ + ' '.join([n+'=3D"'+v+'"' for n,v in ttest['env'].items()]) + print + for tn,(name,test) in enumerate(tests.items(),1): Print("BEGIN TEST %i - %s" % (tn, name)) =20