Skip to content

Commit e181bd2

Browse files
author
ager@chromium.org
committed
Use full paths for cctests.
Review URL: http://codereview.chromium.org/6670045 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
1 parent 6c6a998 commit e181bd2

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

test/benchmarks/testcfg.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ def IsNumber(string):
4141
class BenchmarkTestCase(test.TestCase):
4242

4343
def __init__(self, path, context, mode):
44-
super(BenchmarkTestCase, self).__init__(context, path, mode)
45-
self.root = '/'.join(self.path)
44+
super(BenchmarkTestCase, self).__init__(context, split(path), mode)
45+
self.root = path
4646

4747
def GetLabel(self):
4848
return '%s benchmark %s' % (self.mode, self.GetName())
@@ -67,11 +67,10 @@ def GetName(self):
6767
return 'V8'
6868

6969
def BeforeRun(self):
70-
self.dir_before = os.getcwd()
7170
os.chdir(self.root)
7271

7372
def AfterRun(self, result):
74-
os.chdir(self.dir_before)
73+
os.chdir(self.context.buildspace)
7574

7675
def GetSource(self):
7776
return open(join(self.root, 'run.js')).read()
@@ -86,8 +85,8 @@ def __init__(self, context, root):
8685
super(BenchmarkTestConfiguration, self).__init__(context, root)
8786

8887
def ListTests(self, current_path, path, mode):
89-
path = self.root.split(os.path.sep)[:-2]
90-
path.append('benchmarks')
88+
path = self.context.workspace
89+
path = join(path, 'benchmarks')
9190
test = BenchmarkTestCase(path, self.context, mode)
9291
return [test]
9392

test/cctest/testcfg.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def GetName(self):
4949
def BuildCommand(self, name):
5050
serialization_file = join('obj', 'test', self.mode, 'serdes')
5151
serialization_file += '_' + self.GetName()
52+
serialization_file = join(self.context.buildspace, serialization_file)
5253
serialization_option = '--testing_serialization_file=' + serialization_file
5354
result = [ self.executable, name, serialization_option ]
5455
result += self.context.GetVmFlags(self, self.mode)
@@ -78,6 +79,7 @@ def ListTests(self, current_path, path, mode):
7879
executable = join('obj', 'test', mode, 'cctest')
7980
if utils.IsWindows():
8081
executable += '.exe'
82+
executable = join(self.context.buildspace, executable)
8183
output = test.Execute([executable, '--list'], self.context)
8284
if output.exit_code != 0:
8385
print output.stdout

0 commit comments

Comments
 (0)