aboutsummaryrefslogtreecommitdiff
path: root/crosperf/crosperf.py
diff options
context:
space:
mode:
authorLuis Lozano <llozano@chromium.org>2013-03-15 14:44:13 -0700
committerChromeBot <chrome-bot@google.com>2013-03-15 15:51:37 -0700
commitf81680c018729fd4499e1e200d04b48c4b90127c (patch)
tree940608da8374604b82edfdb2d7df55d065f05d4c /crosperf/crosperf.py
parent2296ee0b914aba5bba07becab4ff68884ce9b8a5 (diff)
downloadtoolchain-utils-f81680c018729fd4499e1e200d04b48c4b90127c.tar.gz
Cleaned up directory after copy of tools from perforce directory
Got rid of stale copies of some tools like "crosperf" and moved all files under v14 directory (that came from perforce) into the top directory. BUG=None TEST=None Change-Id: I408d17a36ceb00e74db71403d2351fd466a14f8e Reviewed-on: https://gerrit-int.chromium.org/33887 Tested-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'crosperf/crosperf.py')
-rwxr-xr-xcrosperf/crosperf.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/crosperf/crosperf.py b/crosperf/crosperf.py
index cfb48d7c..cb7911fd 100755
--- a/crosperf/crosperf.py
+++ b/crosperf/crosperf.py
@@ -18,8 +18,6 @@ from utils import logger
import test_flag
-l = logger.GetLogger()
-
class MyIndentedHelpFormatter(optparse.IndentedHelpFormatter):
def format_description(self, description):
@@ -65,12 +63,20 @@ def Main(argv):
description=Help().GetHelp(),
formatter=MyIndentedHelpFormatter(),
version="%prog 0.1")
+
+ parser.add_option("-l", "--log_dir",
+ dest="log_dir",
+ default="",
+ help="The log_dir, default is under <crosperf_logs>/logs")
+
SetupParserOptions(parser)
options, args = parser.parse_args(argv)
# Convert the relevant options that are passed in into a settings
# object which will override settings in the experiment file.
option_settings = ConvertOptionsToSettings(options)
+ log_dir = os.path.abspath(os.path.expanduser(options.log_dir))
+ logger.GetLogger(log_dir)
if len(args) == 2:
experiment_filename = args[1]
@@ -87,7 +93,8 @@ def Main(argv):
experiment_name = os.path.basename(experiment_filename)
experiment_file.GetGlobalSettings().SetField("name", experiment_name)
experiment = ExperimentFactory().GetExperiment(experiment_file,
- working_directory)
+ working_directory,
+ log_dir)
atexit.register(Cleanup, experiment)