Applied patch from Alexander Botero-Lowry to fix tests on fresh
authorchristian.plesner.hansen@gmail.com <christian.plesner.hansen@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 21 Nov 2008 12:26:31 +0000 (12:26 +0000)
committerchristian.plesner.hansen@gmail.com <christian.plesner.hansen@gmail.com@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Fri, 21 Nov 2008 12:26:31 +0000 (12:26 +0000)
checkout with git-svn.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@818 ce2b1a6d-e550-0410-aec6-3dcde31c8c00

test/message/testcfg.py

index 381ad5c..f259d37 100644 (file)
@@ -27,7 +27,7 @@
 
 import test
 import os
-from os.path import join, dirname, exists, basename
+from os.path import join, dirname, exists, basename, isdir
 import re
 
 FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
@@ -93,7 +93,10 @@ class MessageTestConfiguration(test.TestConfiguration):
     super(MessageTestConfiguration, self).__init__(context, root)
 
   def Ls(self, path):
-    return [f[:-3] for f in os.listdir(path) if f.endswith('.js')]
+    if isdir(path):
+        return [f[:-3] for f in os.listdir(path) if f.endswith('.js')]
+    else:
+        return []
 
   def ListTests(self, current_path, path, mode):
     mjsunit = [current_path + [t] for t in self.Ls(self.root)]