Skip to content
Snippets Groups Projects
  1. Apr 13, 2017
  2. Apr 11, 2017
  3. Mar 04, 2017
    • Mike Pennisi's avatar
      [generation] Prevent invalid transformation · da4e798e
      Mike Pennisi authored
      In order to promote readability of the generated test material, the test
      generation tool may insert whitespace if the context a given expanded
      variable calls for it. Avoid inserting such whitespace within literal
      values that span multiple lines.
      da4e798e
  4. Oct 19, 2016
  5. Aug 22, 2016
  6. Jun 18, 2016
    • Sam Saccone's avatar
      Switch to non-positional argument. · cb4e1bcb
      Sam Saccone authored
      Since the argument is required, we mark it as so. Using this approach
      gives the user a much nicer error message, as compared to just the "not
      enough args" message.
      cb4e1bcb
  7. May 31, 2016
  8. Apr 26, 2016
  9. Apr 25, 2016
    • jugglinmike's avatar
      [generation] Support changing to existing files (#583) · 54fcbf7a
      jugglinmike authored
      When inspecting previously-generated files, a new `Test` instance should
      be used. This avoids over-writing the in-memory representation of the
      latest test, and allows previously-existing test files to be partially
      updated according to subsequent changes in their respective source/case
      files.
      54fcbf7a
  10. Apr 18, 2016
    • Mike Pennisi's avatar
      [generation] Improve file creation heuristic · 613d33ad
      Mike Pennisi authored
      In expecting "case directories" to contain a sub-directory named
      "default", the test generation tool is unable to generate tests for
      features where a directory named "default" is not appropriate.
      
      Modify the heuristic that identifies "case directories" to use a more
      fundamental aspect (i.e. the existence of at least one "case" file).
      613d33ad
    • Mike Pennisi's avatar
      [generation] Expand "comments" in string literals · b0b41775
      Mike Pennisi authored
      Extend test generation tool to recognize and expand interpolation
      patterns within string literals.
      b0b41775
  11. Mar 16, 2016
  12. Feb 19, 2016
  13. Feb 12, 2016
    • Mike Pennisi's avatar
      Make asynchronous test configuration explicit · 23d56620
      Mike Pennisi authored
      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---*\//'
      23d56620
  14. Feb 10, 2016
    • Mike Pennisi's avatar
      Runner: Re-use lock to share access to stdout · b791cc4f
      Mike Pennisi authored
      When executing multiple tests in parallel, each "child" thread would
      write to the process's standard output buffer immediately upon test
      completion. Because thread execution order and instruction interleaving
      is non-deterministic, this made it possible for characters to be emitted
      out-of-order.
      
      When extended to support multiple concurrent threads, the runner was
      outfitted with a "log lock" dedicated to sharing access to the output
      file (when applicable). Re-use this lock when writing to standard out,
      ensuring proper ordering of test result messages.
      b791cc4f
    • Mike Pennisi's avatar
      Test runner: Avoid race condition · 21781289
      Mike Pennisi authored
      A recent extension to the test runner introduced support for running
      tests in parallel using multi-threading. Following this, the runner
      would incorrectly emit the "final report" before all individual test
      results.
      
      In order to emit the "final report" at the end of the output stream, the
      parent thread would initialize all children and wait for availability of
      a "log lock" shared by all children.
      
      According to the documentation on the "threading" module's Lock object
      [1]:
      
      > When more than one thread is blocked in acquire() waiting for the state
      > to turn to unlocked, only one thread proceeds when a release() call
      > resets the state to unlocked; which one of the waiting threads proceeds
      > is not defined, and may vary across implementations.
      
      This means the primitive cannot be used by the parent thread to reliably
      detect completion of all child threads.
      
      Update the parent to maintain a reference for each child thread, and to
      explicitly wait for every child thread to complete before emitting the
      final result.
      
      [1] https://docs.python.org/2/library/threading.html#lock-objects
      21781289
  15. Feb 08, 2016
    • Till Schneidereit's avatar
      Enable parallel test execution in console runner · 7ae29d49
      Till Schneidereit authored
      Adds a `-j`/`--workers-count` parameter to `tools/packaging/test262.py`, defaulting to `[number of cores] - 1`.
      
      Speeds up running the test suite by about ~3x on my 4-core machine, with the SpiderMonkey shell. This could certainly be optimized more by just appending test results to per-thread lists and merging them at the end, but it's better than nothing.
      7ae29d49
  16. Jul 17, 2015
  17. Jul 07, 2015
    • Mike Pennisi's avatar
      Implement `raw` flag · ab7617de
      Mike Pennisi authored
      Some tests involving the directive prologue are invalidated by source
      text transformations that insert executable code in the beginning of the
      script. Implement a `raw` flag that allows these tests to opt-out of
      this transformation. Update the relevant tests to use this flag (and
      remove references to globals only available when code is injected).
      
      Update the Python runner accordingly:
      
      - Do not run tests marked as "raw" in strict mode
      - Reject invalid test configurations
      
      Update the browser runner accordingly:
      
      - Do not modify the script body of tests marked as "raw"
      ab7617de
  18. Jul 06, 2015
  19. Jul 01, 2015
    • Mike Pennisi's avatar
      Use "monkeyYaml" in all environments · 1303ef0d
      Mike Pennisi authored
      The "monkeyYaml" parser is intended to serve as a lightweight fallback
      to Python's standard YAML parser in contexts where the latter is not
      available. Any intentionally-simplified implementation will necessarily
      exhibit non-standard behavior for different input, so not all input
      accepted by the standard parser will be accepted by "monkeyYaml". If
      loaded exclusively in fallback situations, these edge cases can only be
      identified (and debugged) in the environments that require the fallback.
      This has allowed developers to unknowingly author tests that cause
      errors.
      
      Update the test runner to use "monkeyYaml" in all cases, ensuring more
      consistent behavior across contexts and precluding this class of
      regression.
      1303ef0d
    • Erik Arvidsson's avatar
      monkeyYaml: Add support for line folding · 37b1d7a7
      Erik Arvidsson authored
      Fixes #345
      37b1d7a7
  20. Jun 26, 2015
    • Mike Pennisi's avatar
      Move website scripts to a dedicated directory · b974c137
      Mike Pennisi authored
      Some JavaScript source files are only relevant in the context of the
      Test262 website. They should not be explicitly included by individual
      tests, so their presence in the `harness/` directory alongside "include"
      files is misleading.
      
      Move the scripts to a location within the `website/` directory to
      better-reflect their intended use. Update the relevant HTML templates
      with the new locations.
      b974c137
    • Mike Pennisi's avatar
      Remove support for legacy `$INCLUDE` syntax · 86c7e272
      Mike Pennisi authored
      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 d4354d14.
      86c7e272
  21. Jun 18, 2015
    • Mike Pennisi's avatar
      Update browser runner to inject `assert.js` · 73aa0627
      Mike Pennisi authored
      Since the Python runner was updated to include `assert.js` in all tests
      unconditionally, a number of tests have been written that implicitly
      rely on its presence. The browser runner does not currently provide this
      file's contents to these tests, so they fail unconditionally.
      
      Update the browser runner to inject that file's contents into every test
      context.
      
      Note: the existing approach to file retrieval (namely loading via
      synchronous XHR requests) is inefficient and deprecated in some
      browsers. It is honored here for the sake of consistency and to minimize
      the changeset necessary to fix the browser runner.
      73aa0627
  22. Jun 10, 2015
  23. May 25, 2015
  24. May 14, 2015
  25. Mar 30, 2015
    • smikes's avatar
      candidate fix for #215 · 107d786e
      smikes authored
      additional test, tests should have unique names
      improve python style thx to arv
      107d786e
  26. Feb 27, 2015
  27. Dec 09, 2014
  28. Dec 07, 2014
  29. Dec 02, 2014
Loading