Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(426)

Unified Diff: test/mjsunit/testcfg.py

Issue 902263002: Enable compiling mjsunit tests as ES6 modules (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/harmony/modules.js ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/testcfg.py
diff --git a/test/mjsunit/testcfg.py b/test/mjsunit/testcfg.py
index 181c8478fed289ffb6ea195279947c296a5374f3..8389696f49fabf7089035ef1c9b4c5304963be79 100644
--- a/test/mjsunit/testcfg.py
+++ b/test/mjsunit/testcfg.py
@@ -34,6 +34,7 @@ from testrunner.objects import testcase
FLAGS_PATTERN = re.compile(r"//\s+Flags:(.*)")
FILES_PATTERN = re.compile(r"//\s+Files:(.*)")
SELF_SCRIPT_PATTERN = re.compile(r"//\s+Env: TEST_FILE_NAME")
+MODULE_PATTERN = re.compile(r"^// MODULE$", flags=re.MULTILINE)
class MjsunitTestSuite(testsuite.TestSuite):
@@ -80,6 +81,9 @@ class MjsunitTestSuite(testsuite.TestSuite):
if not context.no_harness:
files.append(os.path.join(self.root, "mjsunit.js"))
+
+ if MODULE_PATTERN.search(source):
+ files.append("--module")
files.append(testfilename)
flags += files
« no previous file with comments | « test/mjsunit/harmony/modules.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698