Don't mix every http request in with the tests output.
Don't print that the file servers are starting unless
-vv flag is passed.
Capture the output of run with run_output which returns
stdout, stderr and exit_code. Test against this rather
than relying on sys.exit.
* use subclass of unittest.TestCase for all test cases
* allow to run single test file (eg. python tools/integration_tests.py)
* test filtering (via --pattern/-p CLI flag)
* use common CLI parser for all tests:
usage: test.py [-h] [--failfast] [--verbose] [--executable EXECUTABLE]
[--release] [--pattern PATTERN] [--build-dir BUILD_DIR]
optional arguments:
-h, --help show this help message and exit
--failfast, -f Stop on first failure
--verbose, -v Verbose output
--executable EXECUTABLE
Use external executable of Deno
--release Test against release executable
--pattern PATTERN, -p PATTERN
Run tests that match provided pattern
--build-dir BUILD_DIR
Deno build directory
* respect NO_COLOR variable
Move every test to a method on DenoTestCase.
test.py is a single TestSuite of every TestCase.
Add a Spawn context manager for http_server,
this is explicitly used where it's needed.
Each python test file can now be run independently
without needing to manually run http_server.
Add --help and consistent flags using argparse for
each python test, including --failfast.
Use ColorTextTestRunner so that '... ok' is green.
Fixes some sed errors introduced in c43cfe.
Unfortunately moving libdeno required splitting build.rs into two parts,
one for cli and one for core.
I've also removed the arm64 build - it's complicating things at this
re-org and we're not even testing it. I need to swing back to it and get
tools/test.py running for it.
This avoids the problem that when one of the caches is restored and the
other isn't, Rust doesn't get reinstalled, but it also isn't usable,
crashing the CI.
Plus some minor improvements and clean-ups:
* Resolve DENO_BUILD_PATH to an absolute path if necessary.
* Rename DENO_BUILD_PATH to GN_OUT_DIR in places where it is supposed to
be set by the build system (and not a user configuration variable).
* Output Cargo `rerun-if-*-changed` instructions first, so even if the
build itself fails, configuration changes will still trigger a re-run
of build.rs.
* Remove TODOs that are impossible.
* Re-run build.rs when the flatbuffer definition file changes.
- Based on code from @qti3e and @piscisaureus in #724 and #1125
respectively.
- TODO The DENO_BUILD_PATH env var must be supplied and must be an
absolute path, this restriction should be removed in future work.
(Use C:\deno instead of c:\deno in appveyor config because it's cloned to c:\ by clone_folder variable in .appveyor.yml. On the other hand, build directory is pointed to C:\ by $(APPVEYOR_BUILD_FOLDER) so that test targets are placed on separated partitions.)
* Add forgotten --eol argument to 'git ls-files'. Without it, in certain
edge cases, files might have their mtime restored when it shouldn't.
* Don't parse ls-files output into fields; it's unnecessary.
* Disable the pip cache dir, and stop saving it to the appveyor cache.
* Leverage the 'git -C «dir»' flag to make a script shorter.
* Fix some factually and/or grammatically incorrect comments.