Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: automate WPT updates with drivers in test/wpt #24035

Closed
wants to merge 7 commits into from

Commits on Nov 2, 2018

  1. test: use git node wpt to pull WPT into test/fixtures

    This patch uses the `git node wpt` command in node-core-utils
    to initialize `test/fixtures/wpt` with a subset of the Web
    Platform Tests (https://github.com/web-platform-tests/wpt),
    including:
    
    - console tests
    - url tests
    - interfaces (.idl WebIDL files)
    - test harness located in `resources`, including the WebIDL
      parser
    
    Also initializes the README.md, LICENSE and versions.json in the
    `test/fixtures/wpt`.
    
    In later patches, we will use these files to run WPT
    and move away from the manually maintained copy-pasted files
    in `test/parallel/test-whatwg-*`.
    
    https://github.com/nodejs/node-core-utils/blob/master/docs/git-node.md#git-node-wpt
    joyeecheung committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    4212728 View commit details
    Browse the repository at this point in the history
  2. test: remove WPT tests that are now .any.js in the upstream

    In favor of actual .any.js tests that will be run with the WPT
    harness in a subsequent patch.
    
    The other types of .js tests (e.g. .window.js tests) and the .html
    tests remained to be supported or migrated in the upstream.
    joyeecheung committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    531d0e2 View commit details
    Browse the repository at this point in the history
  3. test: use URL fixtures under test/fixtures/wpt/url/resources

    Removes the following files:
    
    - test/fixtures/url-tests.js
    - test/fixtures/url-setter-tests.js
    - test/fixtures/url-toascii.js
    
    in favor of:
    
    - test/fixtures/wpt/url/resources/urltestdata.json
    - test/fixtures/wpt/url/resources/setters_tests.json
    - test/fixtures/wpt/url/resources/toascii.json
    
    Also removes dependency of `fixtures/url-tests.js` in http2 tests
    and use `fixtures/person-large.jpg` instead since they are just
    looking for a big enough file to transfer.
    joyeecheung committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    8f84ff3 View commit details
    Browse the repository at this point in the history
  4. test: initialize test/wpt to run URL and console .js tests

    This patch:
    
    - Creates a new test suite `wpt` that can be used to run a subset
      of Web Platform Tests
    - Adds a `WPTRunner` in `test/common/wpt.js` that can run the WPT
      subset in `test/fixtures/wpt` with a vm and the WPT harness
      while taking the status file in `test/wpt/status` into account.
      Here we use a new format of status file (in JSON) to handle specific
      requirements (like ICU requirements) in the tests and to handle
      expected failures and TODOs.
    - Adds documentation on how the runner and the update automation works
    - Runs the WHATWG URL tests and the console tests with the new test
      runner.
    
    With this patch we eliminates the need of copy-pasting with manual
    modifications to update a large chunk of our WPT subset previously
    maintained in `test/parallel`. Now the tests run in `test/wpt` can
    be automatically updated with `git node wpt` without modifications
    by the actual WPT harness instead of our home-grown mock.
    
    There are still a few URL tests left that need to be migrated in the
    upstream to be placed in .js instead of .html - we currently still use
    the legacy harness mock in the test files.
    joyeecheung committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    20aa8be View commit details
    Browse the repository at this point in the history
  5. doc: remove legacy WPT integration guide

    Point to the new guide in test/wpt/README.md instead.
    joyeecheung committed Nov 2, 2018
    Configuration menu
    Copy the full SHA
    c6a7738 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    d82e25b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    b9e0036 View commit details
    Browse the repository at this point in the history