Revision: 7201
Author: [email protected]
Date: Wed Mar 16 04:16:18 2011
Log: Use full paths for cctests.

Review URL: http://codereview.chromium.org/6670045
http://code.google.com/p/v8/source/detail?r=7201

Modified:
 /branches/bleeding_edge/test/benchmarks/testcfg.py
 /branches/bleeding_edge/test/cctest/testcfg.py

=======================================
--- /branches/bleeding_edge/test/benchmarks/testcfg.py Wed Mar 16 02:45:28 2011 +++ /branches/bleeding_edge/test/benchmarks/testcfg.py Wed Mar 16 04:16:18 2011
@@ -41,8 +41,8 @@
 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 @@
     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 @@
     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]

=======================================
--- /branches/bleeding_edge/test/cctest/testcfg.py      Mon Jan 10 05:54:42 2011
+++ /branches/bleeding_edge/test/cctest/testcfg.py      Wed Mar 16 04:16:18 2011
@@ -49,6 +49,7 @@
   def BuildCommand(self, name):
     serialization_file = join('obj', 'test', self.mode, 'serdes')
     serialization_file += '_' + self.GetName()
+    serialization_file = join(self.context.buildspace, serialization_file)
serialization_option = '--testing_serialization_file=' + serialization_file
     result = [ self.executable, name, serialization_option ]
     result += self.context.GetVmFlags(self, self.mode)
@@ -78,6 +79,7 @@
     executable = join('obj', 'test', mode, 'cctest')
     if utils.IsWindows():
       executable += '.exe'
+    executable = join(self.context.buildspace, executable)
     output = test.Execute([executable, '--list'], self.context)
     if output.exit_code != 0:
       print output.stdout

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to