0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-10-31 09:14:20 -04:00
Commit graph

36 commits

Author SHA1 Message Date
Andy Hayden
5960e398ec make tests quieter (#2468)
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.
2019-06-08 07:46:57 -04:00
Bartek Iwańczuk
43c6c1a9f5 Refactor test infrastructure (#2432)
* 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
2019-06-03 12:35:55 -04:00
Andy Hayden
8fb44eba5b chore: refactor python tests to use unittest (#2414)
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.
2019-05-30 16:40:40 -04:00
Bartek Iwańczuk
ac8c6fec5b Refactor unit test runner (#2294)
Properly discovers the permissions needed for each test.
2019-05-08 19:15:24 -04:00
Bernard Lin
3cc90d9bcf Add benchmark for max latency (#1975) 2019-03-24 23:36:27 -04:00
Bert Belder
ee29ed79a7
tools/run_node: only create 'node_modules' symlink once
Previously run_node.py would always attempt to remove and then re-create
the 'target/xx/node_modules' symlink. This causes sporadic build errors
on windows when multiple build targets that use run_node.py are being
built concurrently.
2019-03-04 21:01:52 -08:00
Yoshiya Hinosawa
d26655371b fix: improve formatting (#1732) 2019-02-11 12:57:26 -05:00
Ryan Dahl
18b815e336 Support --fmt 2019-02-02 17:48:43 -05:00
Yoshiya Hinosawa
77114fbda4 chore: update license lines (#1557) 2019-01-21 13:03:30 -06:00
Kevin (Kun) "Kassimo" Qian
c870cf4082 Add --prefetch flag for deps prefetch without running (#1475) 2019-01-15 12:19:58 -05:00
Ryan Dahl
bba1a0d44a tools: remove_and_symlink can be skipped on unix
This is more optimial and this fixes a problem where occasionally
remove_and_symlink will error with:

    gen/compiler_bundle/main.js --sourcemapFile /Users/rld/src/deno --silent
    Traceback (most recent call last):
      File "../../tools/run_node.py", line 18, in <module>
        util.remove_and_symlink(target_rel, "node_modules", True)
      File "/Users/rld/src/deno/tools/util.py", line 103, in remove_and_symlink
        symlink(target, name, target_is_dir)
      File "/Users/rld/src/deno/tools/util.py", line 141, in symlink
        os.symlink(target, name)
    OSError: [Errno 17] File exists
2018-12-11 15:07:38 -05:00
Ryan Dahl
c5d8cf8eb6 Use pylint. 2018-11-30 11:33:45 -08:00
Ryan Dahl
a18e51fd61
build: Use target/ instead of out/ (#1153) 2018-11-08 10:38:20 -08:00
Kitson Kelly
4e07783663 Improve integration test harness (#1142) 2018-11-04 11:52:31 -08:00
Bert Belder
e9bf206416
format: don't format files in third_party
It's annoying, and it also makes appveyor slow because it will re-upload
the third_party cache every time something changes in there.
2018-10-23 18:51:06 +02:00
Bert Belder
4ceb205512
Bundle pywin32 in third_party 2018-10-23 16:29:46 +02:00
Ryan Dahl
00884d7164 Add rustfmt to third_party. 2018-10-20 01:19:59 -04:00
Ryan Dahl
c61a0f2f84 First pass at http benchmark. 2018-10-16 09:37:38 -04:00
Ryan Dahl
d4f72e18be
Improve tools/unit_tests.py (#958)
Checks the output more carefully. The first line of output from
js/unit_tests.ts should be something like "running 96 tests"
And the last line should be something like
"test result: ok. 96 passed; 0 failed; 0 ignored; 0 measured; 36
filtered out"
This parses those strings and make sure they align.

This will catch silent death bugs.
2018-10-11 16:56:50 -04:00
Bert Belder
4c6f37cec3
tools: define ERROR_INVALID_PARAMETER in utils.py
Fixes #865.
2018-09-30 12:44:58 -07:00
Bert Belder
1b9424e9d7
tools: add shell_quote() utility function 2018-09-26 09:52:30 -07:00
Bert Belder
2e3a8b495d
tools: make color output work on windows 2018-09-24 13:45:03 -07:00
Ryan Dahl
790baae673 Expose deno.exit() and add test. 2018-08-21 18:34:56 -04:00
Kitson Kelly
c4cafcecb1 Support wildcard matching of output in tests 2018-08-10 11:50:45 -07:00
Bert Belder
788b0795de
util: make symlink() work on older Windows versions 2018-08-02 02:59:37 +02:00
Bert Belder
e5b7d31aba
tools/setup: avoid running gn gen twice in the same output directory 2018-08-02 02:59:36 +02:00
Ryan Dahl
db65c723ae Rename run_hooks.py to setup.py
Moves 'gn gen' into setup.py

Make tools/build.py more ergonomic.
2018-07-29 00:24:16 -04:00
Ryan Dahl
6b49944da1 Simplify run_rustc.py output. 2018-07-26 11:38:03 -04:00
Bert Belder
4d08bb85a4
Clean up and fix tools
* Make sync_third_party work in general
* Un-break build.py and run_hooks.py on windows
* Partially fix format.py on windows
* Reduce code duplication between run_hooks and sync_third_party
2018-07-25 20:13:17 +02:00
Ryan Dahl
7baf8a0fd1 Fix recursive globbing in tools/format.py
And use third_party/depot_tools/gn.
2018-07-24 12:29:54 -04:00
Ryan Dahl
dff5c16e85
Add tools/test.py test runner. (#384) 2018-07-21 19:08:24 -04:00
Bert Belder
709b0cb90c Fix symlink creation on windows 2018-07-21 13:04:11 -04:00
robbym
d93bd4b127 Use Cargo to install rust deps into //third_party/rust_crates (#383) 2018-07-18 20:00:53 -04:00
Ryan Dahl
d78254009e Reduce unnecessary build output. 2018-07-18 15:43:50 -04:00
Bert Belder
7c5db007de tools: fix windows
This fixes most things, but format.py doesn't work yet, because
yapf is broken due to some depot_tools shimming python.
2018-07-08 13:40:18 -04:00
Ryan Dahl
f917c5e722 Clean up tools/
- Factor out tools/util.py
- Move js/*.py to tools.
- Rewrite tools/format.sh in python.
- Run lint first in travis.
2018-07-08 13:40:18 -04:00