diff options
author | 2012-03-01 12:02:49 +0100 | |
---|---|---|
committer | 2012-03-01 12:02:49 +0100 | |
commit | 0da125e3d4a0dc3c6893a2f35773a9bf68930901 (patch) | |
tree | 33204a22ec9a72dbfa4a005f816524cb899efb14 | |
parent | New CBLAS sample (diff) | |
download | auto-numerical-bench-0da125e3d4a0dc3c6893a2f35773a9bf68930901.tar.gz auto-numerical-bench-0da125e3d4a0dc3c6893a2f35773a9bf68930901.tar.bz2 auto-numerical-bench-0da125e3d4a0dc3c6893a2f35773a9bf68930901.zip |
Moved benchutils and portageutils to utils/.
-rw-r--r-- | numbench/benchprint.py | 3 | ||||
-rw-r--r-- | numbench/confinput/xmlinput.py | 4 | ||||
-rw-r--r-- | numbench/main.py | 10 | ||||
-rw-r--r-- | numbench/report.py | 2 | ||||
-rw-r--r-- | numbench/utils/benchutils.py (renamed from numbench/benchutils.py) | 0 | ||||
-rw-r--r-- | numbench/utils/btl.py | 4 | ||||
-rw-r--r-- | numbench/utils/portageutils.py (renamed from numbench/PortageUtils.py) | 6 |
7 files changed, 13 insertions, 16 deletions
diff --git a/numbench/benchprint.py b/numbench/benchprint.py index 3f3e577..0cbd0b6 100644 --- a/numbench/benchprint.py +++ b/numbench/benchprint.py @@ -22,7 +22,8 @@ except NameError: if needsinitialization: - import benchconfig as cfg, benchutils as bu + import benchconfig as cfg + from utils import benchutils as bu from os.path import dirname, join as pjoin class _Print: diff --git a/numbench/confinput/xmlinput.py b/numbench/confinput/xmlinput.py index 4743730..0a44b7c 100644 --- a/numbench/confinput/xmlinput.py +++ b/numbench/confinput/xmlinput.py @@ -4,7 +4,7 @@ import subprocess as sp from os.path import join as pjoin, dirname as pdirname, realpath as prealpath from .. import benchconfig as cfg -from .. import PortageUtils as pu +from ..utils import portageutils as pu def readFile(fs): @@ -151,4 +151,4 @@ def parseConf(fname): logdir = pjoin(cfg.logdir, tid) ) - return tests
\ No newline at end of file + return tests diff --git a/numbench/main.py b/numbench/main.py index 1285c18..fd2cf05 100644 --- a/numbench/main.py +++ b/numbench/main.py @@ -92,13 +92,10 @@ if sys.argv[2] in ('-h', '--help'): import re from fnmatch import fnmatch from os.path import join as pjoin -import benchconfig as cfg, benchutils as bu, confinput -from benchprint import Print -import PortageUtils as pu -import report -#from PortageUtils import \ -# normalize_cpv, install_dependencies, install_package, InstallException +import benchconfig as cfg, confinput, report +from utils import benchutils as bu, portageutils as pu +from benchprint import Print # Parse the configuration file @@ -109,7 +106,6 @@ if not os.path.exists(cfg.inputfile): cfg.tests = confinput.parseInput(cfg.inputfile) # Import the module -#os.chdir(cfg.scriptdir) mod = loadModule(cfg.modulename).Module(sys.argv[3:]) cfg.mod = mod diff --git a/numbench/report.py b/numbench/report.py index ecb13b0..986e641 100644 --- a/numbench/report.py +++ b/numbench/report.py @@ -20,7 +20,7 @@ import sys, numpy as np from shutil import copy as fcopy, copytree, rmtree import benchconfig as cfg -import benchutils as bu +from utils import benchutils as bu from htmlreport import HTMLreport from testdescr import testdescr from benchprint import Print diff --git a/numbench/benchutils.py b/numbench/utils/benchutils.py index 1018d72..1018d72 100644 --- a/numbench/benchutils.py +++ b/numbench/utils/benchutils.py diff --git a/numbench/utils/btl.py b/numbench/utils/btl.py index 1f06f67..541ff1e 100644 --- a/numbench/utils/btl.py +++ b/numbench/utils/btl.py @@ -15,7 +15,8 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # -from .. import benchchildren, benchutils as bu, benchconfig as cfg +from .. import benchchildren, benchconfig as cfg +from ..utils import benchutils as bu from ..benchprint import Print from os.path import join as pjoin, dirname @@ -27,7 +28,6 @@ btllibraries = ('rt',) btldefines = ('NDEBUG',) - def compileTest(test, btlconfig): # Include directories diff --git a/numbench/PortageUtils.py b/numbench/utils/portageutils.py index 1da968d..41c0cdc 100644 --- a/numbench/PortageUtils.py +++ b/numbench/utils/portageutils.py @@ -19,7 +19,7 @@ import commands as cmd import subprocess as sp import os, portage, shlex from os.path import join as pjoin, dirname -import benchutils +from utils import benchutils as bu class InstallException(Exception): def __init__(self, package, command, logfile): @@ -150,7 +150,7 @@ def installPackage(test, package=None, env=None, logfile=None): pkg = normalize_cpv(package) # Execute emerge command and log the results - benchutils.mkdir(dirname(logfile)) + bu.mkdir(dirname(logfile)) fout = file(logfile, 'w') cmd = ['emerge', '--ignore-default-opts', '-OB', '=' + pkg] p = sp.Popen(cmd, env=denv, stdout=fout, stderr=sp.STDOUT) @@ -164,7 +164,7 @@ def installPackage(test, package=None, env=None, logfile=None): # Unpack package onto root archive = pjoin(test['pkgdir'], pkg+'.tbz2') - benchutils.mkdir(test['root']) + bu.mkdir(test['root']) tarcmd = ['tar', 'xjvf', archive, '-C', test['root']] fout.write(' '.join(tarcmd) + '\n' + 80*'-' + '\n') p = sp.Popen(tarcmd, stdout=fout, stderr=sp.STDOUT) |