summaryrefslogtreecommitdiff
path: root/tools/util.py
AgeCommit message (Collapse)Author
2020-11-05build: rewrite tools/ scripts to deno (#8247)Bartek Iwańczuk
This commit rewrites scripts in "tools/" directory to use Deno instead of Python. In return it allows to remove huge number of Python packages in "third_party/".
2020-11-04chore: remove dead Python code (#8248)Bartek Iwańczuk
2020-10-02refactor: use parentheses in print statements in python (#7779)j4qfrost
2020-08-28Move benchmarks to Rust (#7134)Valentin Anger
All benchmarks are done in Rust and can be invoked with `cargo bench`. Currently this has it's own "harness" that behaves like `./tools/benchmark.py` did. Because of this tests inside `cli/bench` are currently not run. This should be switched to the language provided harness once the `#[bench]` attribute has been stabilized.
2020-08-21Remove old references to libdeno (#7149)Max Drosdo.www
2020-05-09add option to lint and format only staged files (#5172)Michał Zdunek
2020-03-20Remove DENO_BUILD_MODE and DENO_BUILD_PATH (#4431)Ryan Dahl
* Remove DENO_BUILD_MODE and DENO_BUILD_PATH Also remove outdated docs related to ninja/gn. * fix * remove parameter to build_mode() * remove arg parsing from benchmark.py
2020-02-02Remove //tests symlink (#3849)Luka Hartwig
2020-01-21change copyrights from 2019 to 2020 (#3733)Takashi Idobe
2019-10-05remove appveyor specific code paths (#3071)Christian Moritz
2019-09-15Move GN root into //core/libdeno (#2943)Christian Moritz
2019-09-15tools: remove unused function 'find_exts()' (#2950)Bert Belder
2019-09-15tools: refactor lint.py and format.py (#2950)Bert Belder
2019-09-15tools: add 'shell' parameter to 'run()' (#2950)Bert Belder
2019-09-15tools: clean up third_party.py, and merge prebuilt.py into it (#2950)Bert Belder
* Remove reference to removed dir 'third_party/rust_crates'. * Remove reference to unused environment variable 'DENO_NINJA_PATH'. * Remove helper functions 'root()' and 'tp()'. * Move definition of 'third_party_path' to build.py. * Move definition of 'gn_exe()' to setup.py. * Move 'download_sccache()' and 'download_hyperfine()' from prebuilt.py to third_party.py, and delete prebuilt.py. * Add helper function 'get_platform_dir_name()' to locate the platform-specific 'v8/buildtools/<platform>' and 'prebuilt/<platform>' directories. * Add helper function 'get_prebuilt_tool_path()' that returns the full path to a platform-specific executable in //prebuilt. * Cosmetic improvements.
2019-09-10feat: Make integration tests rust unit tests (#2884)Bartek Iwańczuk
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2019-07-28benchmarks: make latency benchmark less noisy (#2689)Bartek Iwańczuk
2019-06-08make tests quieter (#2468)Andy Hayden
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-03Refactor test infrastructure (#2432)Bartek Iwańczuk
* 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-05-30chore: refactor python tests to use unittest (#2414)Andy Hayden
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-08Refactor unit test runner (#2294)Bartek Iwańczuk
Properly discovers the permissions needed for each test.
2019-03-24Add benchmark for max latency (#1975)Bernard Lin
2019-03-04tools/run_node: only create 'node_modules' symlink onceBert Belder
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-02-11fix: improve formatting (#1732)Yoshiya Hinosawa
2019-02-02Support --fmtRyan Dahl
2019-01-21chore: update license lines (#1557)Yoshiya Hinosawa
2019-01-15 Add --prefetch flag for deps prefetch without running (#1475)Kevin (Kun) "Kassimo" Qian
2018-12-11tools: remove_and_symlink can be skipped on unixRyan Dahl
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-11-30Use pylint.Ryan Dahl
2018-11-08build: Use target/ instead of out/ (#1153)Ryan Dahl
2018-11-04Improve integration test harness (#1142)Kitson Kelly
2018-10-23format: don't format files in third_partyBert Belder
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-23Bundle pywin32 in third_partyBert Belder
2018-10-20Add rustfmt to third_party.Ryan Dahl
2018-10-16First pass at http benchmark.Ryan Dahl
2018-10-11Improve tools/unit_tests.py (#958)Ryan Dahl
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-09-30tools: define ERROR_INVALID_PARAMETER in utils.pyBert Belder
Fixes #865.
2018-09-26tools: add shell_quote() utility functionBert Belder
2018-09-24tools: make color output work on windowsBert Belder
2018-08-21Expose deno.exit() and add test.Ryan Dahl
2018-08-10Support wildcard matching of output in testsKitson Kelly
2018-08-02util: make symlink() work on older Windows versionsBert Belder
2018-08-02tools/setup: avoid running `gn gen` twice in the same output directoryBert Belder
2018-07-29Rename run_hooks.py to setup.pyRyan Dahl
Moves 'gn gen' into setup.py Make tools/build.py more ergonomic.
2018-07-26Simplify run_rustc.py output.Ryan Dahl
2018-07-25Clean up and fix toolsBert Belder
* 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-24Fix recursive globbing in tools/format.pyRyan Dahl
And use third_party/depot_tools/gn.
2018-07-21Add tools/test.py test runner. (#384)Ryan Dahl
2018-07-21Fix symlink creation on windowsBert Belder
2018-07-18Use Cargo to install rust deps into //third_party/rust_crates (#383)robbym