summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorspiros <andyspiros@gmail.com>2011-06-14 01:52:50 +0200
committerspiros <andyspiros@gmail.com>2011-06-14 01:52:50 +0200
commit351b0455f1858ec0f8d19edfba0e0620a4133052 (patch)
treebb1eb5685bc0e968fb6635a50775c53e7bea649d
parentStarting code cleanup. Created btlutils. (diff)
downloadauto-numerical-bench-351b0455f1858ec0f8d19edfba0e0620a4133052.tar.gz
auto-numerical-bench-351b0455f1858ec0f8d19edfba0e0620a4133052.tar.bz2
auto-numerical-bench-351b0455f1858ec0f8d19edfba0e0620a4133052.zip
Some bugs solved.
-rw-r--r--blas.py7
-rw-r--r--blastests.in4
-rw-r--r--main.py23
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):
@staticmethod
def get_impls(root):
- return [i for i in os.listdir(root + "/etc/env.d/alternatives/blas") \
- if i[0] != '_']
+ output = sp.Popen(
+ ['eselect', '--no-color', '--brief', 'blas', 'list'],
+ env={'ROOT' : root}, stdout=sp.PIPE
+ ).communicate()[0]
+ return output.strip().split('\n')
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=g++ CXXFLAGS='-O2'
-eigen-O3 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O3'
+eigen-O2 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O2 -march=native'
+eigen-O3 dev-cpp/eigen-3.0.0-r1 CXX=g++ CXXFLAGS='-O3 -march=native'
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=1):
self._level = max(self._level+n, 0)
-Print = _Print(2)
+Print = _Print(3)
# Retrieve relevant directories
@@ -54,19 +54,18 @@ def tests_from_input(input):
continue
if line[0] == '#':
continue
- avail = available_packages(spl[1])
env = {}
# TODO: add @file for env set based on external file
# TODO: add -impl for skipping implementation
for var in spl[2:]:
- s = var.split('=')
+ s = var.split('=', 1)
env[s[0]] = s[1]
- avail = available_packages(spl[1])
- if len(avail) > 1:
+ avail = available_packages(spl[1])
+ if len(avail) > 1:
for n,p in enumerate(avail):
- tests[spl[0]+"_%02i"%n] = {'package':p , 'env':env}
- else:
- tests[spl[0]] = {'package':avail[0] , 'env':env}
+ tests[spl[0]+"_%02i"%n] = {'package':p , 'env':env}
+ else:
+ tests[spl[0]] = {'package':avail[0] , 'env':env}
return tests
@@ -135,6 +134,14 @@ dictionary; the line has to contain:
input = file(testsfname).read()
tests = tests_from_input(input)
+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+'="'+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))