From 86c7e272a6e4d978bb60da899a8187b04c8190cb Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Thu, 18 Jun 2015 12:06:20 -0400 Subject: [PATCH] Remove support for legacy `$INCLUDE` syntax Although test files once expressed dependencies on external files using a global `$INCLUDE` function, that pattern was removed in favor of declarative meta-data [1]. Remove the associated logic from the Python runner and the browser. [1] See commit d4354d14d534abaf2bcb1f82b3daae0702f3b8ee. --- harness/sth.js | 7 +------ tools/packaging/test262.py | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/harness/sth.js b/harness/sth.js index 2ac4245e84..a25a8c1ac7 100644 --- a/harness/sth.js +++ b/harness/sth.js @@ -173,12 +173,7 @@ function BrowserRunner() { include; includes = test.includes; - if (!includes || !(includes.length)) { - // includes not specified via frontmatter; find all of the $INCLUDE statements - includes = code.match(/\$INCLUDE\(([^\)]+)\)/g); - } - - if (includes !== null) { + if (includes && includes.length) { // We have some includes, so loop through each include and // pull in the dependencies. for (var i = 0; i < includes.length; i++) { diff --git a/tools/packaging/test262.py b/tools/packaging/test262.py index ed8939e00a..5a606bb187 100755 --- a/tools/packaging/test262.py +++ b/tools/packaging/test262.py @@ -277,7 +277,7 @@ class TestCase(object): def GetIncludeList(self): if self.testRecord.get('includes'): return self.testRecord['includes'] - return re.findall('\$INCLUDE\([\'"]([^\)]+)[\'"]\)', self.test) + return [] def GetAdditionalIncludes(self): return '\n'.join([self.suite.GetInclude(include) for include in self.GetIncludeList()])