user-documentation icon indicating copy to clipboard operation
user-documentation copied to clipboard

Stop using the HHVM test runner

Open fredemmott opened this issue 5 years ago • 2 comments

Future work: blocked by having a good parallelism API. Likely going to be something convenient around xbox.

We have a mostly-compatible implementation of .expectf, .expectregex already for .typechecker.expectf: we no longer use run.php --typechecker: we can assume that 'No errors' tests have been verified by the repo-level hh_client call - so we can skip them for performance.

We use it for runtime tests still as we really really want the parallelism it offers, as we can't take a similar shortcut.

Benefits are:

  • including features (like .cli_args) in run.php that are not used by HHVM is painful
  • can potentially provide a better developer experience (e.g. test failure output) by using libraries - run.php must be standalone
  • can start listing each example as a separate test in hacktest output

fredemmott avatar May 15 '20 16:05 fredemmott

It should remain compatible (or 'close enough') so that people working on features can contribute documentation examples in a format they're familiar with.

fredemmott avatar May 15 '20 16:05 fredemmott

Actually a big chain of blockers here:

  1. run tests in parallel
  2. ... add a zero-config way to do parallelism in hack
  3. decide on an entrypoint mechanism for that
  4. .... but internal teams don't want a new entrypoint mechanism that depends on PHPisms, so add a $GLOBALS-free entrypoint mechanism
  5. ... which also includes the input/output handles, so get HSL IO builtin

fredemmott avatar Jun 30 '20 22:06 fredemmott