Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Unified Diff: media/tools/layout_tests/layouttest_analyzer.py

Issue 7778048: Add README file and parametrize result directory in layout test analzyer tool. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Modify comments in trend_graph.py based on CR comments. Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/tools/layout_tests/README ('k') | media/tools/layout_tests/trend_graph.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/tools/layout_tests/layouttest_analyzer.py
diff --git a/media/tools/layout_tests/layouttest_analyzer.py b/media/tools/layout_tests/layouttest_analyzer.py
index 431a9f37620106706ee30c5f3cb559c23b6df3d2..b7045a689b41fc996e0f92b8e2264034b23e9608 100644
--- a/media/tools/layout_tests/layouttest_analyzer.py
+++ b/media/tools/layout_tests/layouttest_analyzer.py
@@ -19,11 +19,12 @@ from test_expectations import TestExpectations
from trend_graph import TrendGraph
# Predefined result directory.
-RESULT_DIR = 'result'
+DEFAULT_RESULT_DIR = 'result'
DEFAULT_ANNO_FILE = os.path.join('anno', 'anno.csv')
DEFAULT_GRAPH_FILE = os.path.join('graph', 'graph.html')
# Predefined result files for debug.
-CURRENT_RESULT_FILE_FOR_DEBUG = os.path.join(RESULT_DIR, '2011-08-19-21')
+CURRENT_RESULT_FILE_FOR_DEBUG = os.path.join(DEFAULT_RESULT_DIR,
+ '2011-08-19-21')
PREV_TIME_FOR_DEBUG = '2011-08-19-11'
DEFAULT_TEST_GROUP_FILE = os.path.join('testname', 'media.csv')
@@ -73,6 +74,11 @@ def parse_option():
help=('Name of test group '
'(default to %default)'),
default=DEFAULT_TEST_GROUP_NAME)
+ option_parser.add_option('-d', '--result-directory-location',
+ dest='result_directory_location',
+ help=('Name of result directory location '
+ '(default to %default)'),
+ default=DEFAULT_RESULT_DIR)
return option_parser.parse_args()[0]
@@ -94,7 +100,7 @@ def main():
prev_time = PREV_TIME_FOR_DEBUG
prev_analyzer_result_map = (
layouttest_analyzer_helpers.AnalyzerResultMap.Load(
- os.path.join(RESULT_DIR, prev_time)))
+ os.path.join(options.result_directory_location, prev_time)))
# Read bug annotations and generate an annotation map used for the status
# email.
@@ -113,7 +119,7 @@ def main():
if not options.debug:
# Save the current result.
date = start_time.strftime('%Y-%m-%d-%H')
- file_path = os.path.join(RESULT_DIR, date)
+ file_path = os.path.join(options.result_directory_location, date)
analyzer_result_map.Save(file_path)
# Trend graph update (if specified in the command-line argument).
« no previous file with comments | « media/tools/layout_tests/README ('k') | media/tools/layout_tests/trend_graph.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698