From 23d566209a2bccc14d572e0bd81394a9f99ca272 Mon Sep 17 00:00:00 2001 From: Mike Pennisi Date: Fri, 12 Feb 2016 12:59:51 -0500 Subject: Make asynchronous test configuration explicit For asynchronous tests, the contract between test file and test runner is implicit: runners are expected to inspect the source code for references to a global `$DONE` identifier. Promote a more explicit contract between test file and test runner by introducing a new frontmatter "tag", `async`. This brings asynchronous test configuration in-line with other configuration mechanisms and also provides a more natural means of test filtering. The modifications to test files was made programatically using the `grep` and `sed` utilities: $ grep "\$DONE" test/ -r --files-with-match --null | \ xargs -0 sed -i 's/^\(flags:\s*\)\[/\1[async, /g' $ grep "\$DONE" test/ -rl --null | \ xargs -0 grep -E '^flags:' --files-without-match --null | \ xargs -0 sed -i 's/^---\*\//flags: [async]\n---*\//' --- tools/packaging/test262.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tools') diff --git a/tools/packaging/test262.py b/tools/packaging/test262.py index 1192005fc..551d6d3e0 100755 --- a/tools/packaging/test262.py +++ b/tools/packaging/test262.py @@ -309,7 +309,7 @@ class TestCase(object): return 'raw' in self.testRecord def IsAsyncTest(self): - return '$DONE' in self.test + return 'async' in self.testRecord def GetIncludeList(self): if self.testRecord.get('includes'): -- cgit v1.2.1