diff --git a/tools/test.py b/tools/test.py index b1213d2382668b..626dd2cec6af99 100755 --- a/tools/test.py +++ b/tools/test.py @@ -1476,6 +1476,13 @@ def SplitPath(s): stripped = [ c.strip() for c in s.split('/') ] return [ Pattern(s) for s in stripped if len(s) > 0 ] +def NormalizePath(path): + # strip the extra path information of the specified test + if path.startswith('test/'): + path = path[5:] + if path.endswith('.js'): + path = path[:-3] + return path def GetSpecialCommandProcessor(value): if (not value) or (value.find('@') == -1): @@ -1548,7 +1555,7 @@ def Main(): else: paths = [ ] for arg in args: - path = SplitPath(arg) + path = SplitPath(NormalizePath(arg)) paths.append(path) # Check for --valgrind option. If enabled, we overwrite the special