From: "Andrea Arteaga" <andyspiros@gmail.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/
Date: Thu, 27 Sep 2012 11:19:08 +0000 (UTC) [thread overview]
Message-ID: <1348744728.9cab8166f1276536155f96fb66b8d362ab1d85aa.spiros@gentoo> (raw)
commit: 9cab8166f1276536155f96fb66b8d362ab1d85aa
Author: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
AuthorDate: Thu Sep 27 11:18:48 2012 +0000
Commit: Andrea Arteaga <andyspiros <AT> gmail <DOT> com>
CommitDate: Thu Sep 27 11:18:48 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/auto-numerical-bench.git;a=commit;h=9cab8166
Added initial support for copying the reports at the end (working for
local copy).
---
numbench/benchconfig.py | 8 +++++++-
numbench/main.py | 16 +++++++++++-----
2 files changed, 18 insertions(+), 6 deletions(-)
diff --git a/numbench/benchconfig.py b/numbench/benchconfig.py
index 56ef304..ffdedba 100644
--- a/numbench/benchconfig.py
+++ b/numbench/benchconfig.py
@@ -38,6 +38,7 @@ rootsdir = None
pkgsdir = None
reportdir = None
logdir = None
+copyreport = None
# Module
module = None
@@ -50,7 +51,7 @@ tests = None
def parseArguments():
- global arguments, inputfile, clean, imageformat, basedir
+ global arguments, inputfile, clean, imageformat, basedir, copyreport
arguments = []
clean = False
@@ -82,6 +83,11 @@ def parseArguments():
imageformat = sys.argv[i + 1]
skipargs += 1
continue
+
+ if a in ('-r', '--copy-report'):
+ copyreport = sys.argv[i + 1]
+ skipargs += 1
+ continue
arguments.append(a)
diff --git a/numbench/main.py b/numbench/main.py
index cfeece5..cd0d3d7 100644
--- a/numbench/main.py
+++ b/numbench/main.py
@@ -39,14 +39,16 @@ Usage: numbench conffile [options]
numbench [ -h | --help ]
Options:
- - h, - -help Displays an help message.
- - d, - -directory < dir > Stores the data in the given directory. If
+ -h, --help Displays an help message.
+ -d, --directory <dir> Store the data in the given directory. If
not given, a directory in ~/.numbench
is chosen.
- - c, - -clean Removes the temporary data at the end.
- - i, - -imageformat < format > Selects the given format for the resulting
+ -c, --clean Remove the temporary data at the end.
+ -i, --imageformat <format> Select the given format for the resulting
images. Available are png, svg, eps, ps,
pdf. Default is svg.
+ -r, --copy-report <URI> Transfer the report directory to the given
+ path. Local paths are currently supported.
"""
modnames = modules.getModulesNames()
@@ -71,7 +73,7 @@ if len(sys.argv) < 2 or sys.argv[1] in ('-h', '--help'):
## BEGIN THE TRUE SCRIPT
# Import the packages
-import re
+import re, shutil
from fnmatch import fnmatch
from os.path import join as pjoin
@@ -251,6 +253,10 @@ report.saveReport()
if cfg.clean:
bu.rmdir(cfg.testsdir)
bu.rmdir(cfg.rootsdir)
+
+# Copy results
+if cfg.copyreport:
+ shutil.copytree(cfg.reportdir, cfg.copyreport, True)
# TODO: reintroduce the instructions feature (and remove "exit)
next reply other threads:[~2012-09-27 11:19 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-27 11:19 Andrea Arteaga [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-09-17 8:08 [gentoo-commits] proj/auto-numerical-bench:master commit in: numbench/ Andrea Arteaga
2012-09-17 8:08 Andrea Arteaga
2012-09-17 8:08 Andrea Arteaga
2012-09-02 11:41 Andrea Arteaga
2012-08-07 22:58 Andrea Arteaga
2012-08-04 20:24 Andrea Arteaga
2012-04-09 19:25 Andrea Arteaga
2012-02-28 19:20 Andrea Arteaga
2012-02-27 15:05 Andrea Arteaga
2011-12-27 0:13 Andrea Arteaga
2011-08-22 18:02 Andrea Arteaga
2011-08-19 23:19 Andrea Arteaga
2011-08-19 23:11 Andrea Arteaga
2011-08-18 19:47 Andrea Arteaga
2011-08-17 18:00 Andrea Arteaga
2011-08-17 16:21 Andrea Arteaga
2011-08-17 15:00 Andrea Arteaga
2011-08-17 14:38 Andrea Arteaga
2011-08-17 14:38 Andrea Arteaga
2011-08-17 0:00 Andrea Arteaga
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1348744728.9cab8166f1276536155f96fb66b8d362ab1d85aa.spiros@gentoo \
--to=andyspiros@gmail.com \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox