mirror of
https://github.com/denoland/deno.git
synced 2025-03-04 01:44:26 -05:00
Add tools/build_test.py
This commit is contained in:
parent
4d669c63f4
commit
4e2e185de7
2 changed files with 25 additions and 12 deletions
|
@ -6,18 +6,24 @@ import sys
|
||||||
import third_party
|
import third_party
|
||||||
from util import build_path, enable_ansi_colors, run
|
from util import build_path, enable_ansi_colors, run
|
||||||
|
|
||||||
enable_ansi_colors()
|
|
||||||
|
|
||||||
third_party.fix_symlinks()
|
def main(argv):
|
||||||
|
enable_ansi_colors()
|
||||||
|
|
||||||
ninja_args = sys.argv[1:]
|
third_party.fix_symlinks()
|
||||||
if not "-C" in ninja_args:
|
|
||||||
|
ninja_args = argv[1:]
|
||||||
|
if not "-C" in ninja_args:
|
||||||
if not os.path.isdir(build_path()):
|
if not os.path.isdir(build_path()):
|
||||||
print("Build directory '%s' does not exist." % build_path(),
|
print("Build directory '%s' does not exist." % build_path(),
|
||||||
"Run tools/setup.py")
|
"Run tools/setup.py")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
ninja_args = ["-C", build_path()] + ninja_args
|
ninja_args = ["-C", build_path()] + ninja_args
|
||||||
|
|
||||||
run([third_party.ninja_path] + ninja_args,
|
run([third_party.ninja_path] + ninja_args,
|
||||||
env=third_party.google_env(),
|
env=third_party.google_env(),
|
||||||
quiet=True)
|
quiet=True)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
sys.exit(main(sys.argv))
|
||||||
|
|
7
tools/build_test.py
Executable file
7
tools/build_test.py
Executable file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/usr/bin/env python
|
||||||
|
import sys
|
||||||
|
from build import main as build
|
||||||
|
from test import main as test
|
||||||
|
|
||||||
|
build(sys.argv)
|
||||||
|
test(sys.argv)
|
Loading…
Add table
Reference in a new issue