Our config files specify two-space indents for JS files. These scripts
were probably written before that was a thing. Update the indentation of
the script and the generated tests all in one go.
The optimizations from commit e558b29b were never incorporated into the
upstream test generator. This does so now.
As far as I can tell, the changes to the Unicode ranges are purely
cosmetic. Some are formatted as 6-digit hex numbers instead of 4-digit.
Others move the low-surrogates range 0xDC00-0xDCFF to the beginning of the
array, but the union of the ranges is still the same.
This code hasn't been touched in a while, so it's probably good to bring
in the newest versions of the dependencies. We can easily tell if there
was any incompatible effect on the output.
The latest version of filenamify requires using ES modules. We also have
to adapt to a breaking change in regexpu-core (see
https://github.com/mathiasbynens/regexpu-core/pull/49).
Also convert the dependencies to devDependencies, since this tool is not
necessary for executing test262.
This runs faster and allows for future improvements.
Similar to the linter workflow, we remove the Circle-CI-specific stuff
from the file in tools/scripts/, and into .github/workflows/.
We use another external action (tj-actions/verify-changed-files) to check
that generating the tests didn't create any new changes. This is basically
a companion action to the tj-actions/changed-files used in the linter job.
After the previous commit, it doesn't do much, only passes the linting
exceptions file on the command line. Instead, make the lint.exceptions
file the default for that argument (if it exists), and remove the shell
script.
This runs faster and allows for future improvements.
I'm following a general principle of keeping code that isn't portable
between CI providers inside the config file for the CI provider. So in
this case we remove the Circle-CI-specific stuff from the file in
tools/scripts/, and into .github/workflows/. We use an external action
(tj-actions/changed-files) to gather the list of files to lint.
We do not use these anymore. Generated tests are included in PRs and not
deployed separately. The deploy key encryption relies on TravisCI which we
don't use anymore, anyway.
Recent Python gives a warning about the \s escape in a string pattern
passed to re.sub(). Apparently this is not supported. Instead, pass a
width of ∞ to yaml.dump() to avoid adding the line breaks in the first
place that the regexp was removing.
The "imp" module is deprecated in Python 3.4 and will be removed in
Python 3.12. Use it only if the current Python version is too old to use
the "importlib" module.
Previously, split() would split on whitespace, then the if-condition would
remove `#` - interpreting every word in every comment in the file as a
potential valid feature flag. We want splitlines() here.
Partial-line comments were inadvertently "supported" before, because of
this bug. Instead, support them explicitly by chopping off a `#`
character, anything after it, and any whitespace immediately preceding it.
If a specific Python interpreter is used (e.g. by invoking the script with
"/path/to/python run.py") then we should use the same Python interpreter
to execute scripts in subprocesses, not the one from the environment.
The path to the running Python interpreter is given by sys.executable.
The phase field must precede the type field for negative tests
to have a consistent style and be able to parse easier.
Related to the goal of https://github.com/tc39/test262/issues/1997
Added this check to the linting script and updated tests accordingly.
Includes key should use flow notation to be able parsed easier
as suggested in https://github.com/tc39/test262/issues/1997
Added this check to the linting script and updated tests accordingly.
* Simplify find_cases
* Improve help text
* Improve YAML-capturing regex
* Use built-in dedenting
* Fix use of built-in dedenting
* Fix use of built-in dedenting for Python 3
This change is in service of forthcoming tests for the "JSON modules"
language proposal [1]. Verifying the semantics of that proposal requires
modules whose source text is not valid ECMAScript; this change updates
the guidelines for contributing and interpreting tests so that such test
material can be handled consistently.
Differentiating JSON files with a distinct file name suffice will assist
consumers which require special handling of such files (e.g. web
browsers).
Change the pattern used to designate "fixture" files so that it may be
applied to files used for JSON modules.
Increment the project version number to alert consumers of this change
in interpreting instructions.
[1] https://github.com/tc39/proposal-json-modules
Prior to this patch, the CircleCI continuous integration environment was
configured to report test failures in a negative light, displaying red
cross-marks and reporting that "some checks were not successful" in
commits and GitHub Pull Requests which included them.
The passing/failing status of tests does not influence their
desirability for Test262. (In practice, engines very commonly fail
newly-contributed tests.)
Although these conflicting interpretations does not technically
interfere with the maintainers' ability to merge new contributions, it
does create confusion for many contributors who interpreted the UI as a
rejection of their work.
In addition, this behavior made it impossible to distinguish between the
benign test failures and disruptive infrastructural problems (e.g. the
crashing of engines).
Reconfigure the continuous integration environment to accept passing and
failing tests equally, and to only report a problem when the Test262
project's testing infrastructure behaves unexpectedly.