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

Unified Diff: test/benchmarks/testcfg.py

Issue 6670045: Use full paths for cctests. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 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 | « no previous file | test/cctest/testcfg.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/benchmarks/testcfg.py
diff --git a/test/benchmarks/testcfg.py b/test/benchmarks/testcfg.py
index a88bd93488554a1dba853212f11986f10409971d..f0ff15b1fa77a1ed994a1ae775db6c8130c8276e 100644
--- a/test/benchmarks/testcfg.py
+++ b/test/benchmarks/testcfg.py
@@ -41,8 +41,8 @@ def IsNumber(string):
class BenchmarkTestCase(test.TestCase):
def __init__(self, path, context, mode):
- super(BenchmarkTestCase, self).__init__(context, path, mode)
- self.root = '/'.join(self.path)
+ super(BenchmarkTestCase, self).__init__(context, split(path), mode)
+ self.root = path
def GetLabel(self):
return '%s benchmark %s' % (self.mode, self.GetName())
@@ -67,11 +67,10 @@ class BenchmarkTestCase(test.TestCase):
return 'V8'
def BeforeRun(self):
- self.dir_before = os.getcwd()
os.chdir(self.root)
def AfterRun(self, result):
- os.chdir(self.dir_before)
+ os.chdir(self.context.buildspace)
def GetSource(self):
return open(join(self.root, 'run.js')).read()
@@ -86,8 +85,8 @@ class BenchmarkTestConfiguration(test.TestConfiguration):
super(BenchmarkTestConfiguration, self).__init__(context, root)
def ListTests(self, current_path, path, mode):
- path = self.root.split(os.path.sep)[:-2]
- path.append('benchmarks')
+ path = self.context.workspace
+ path = join(path, 'benchmarks')
test = BenchmarkTestCase(path, self.context, mode)
return [test]
« no previous file with comments | « no previous file | test/cctest/testcfg.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698