mirror of https://github.com/japl-lang/japl.git
Update build.py to support jats
This commit is contained in:
parent
619873f01f
commit
29858360eb
11
build.py
11
build.py
|
@ -157,8 +157,15 @@ def build(path: str, flags: Dict[str, str] = {}, options: Dict[str, bool] = {},
|
|||
logging.info("Running tests under tests/")
|
||||
logging.debug("Compiling test suite")
|
||||
start = time()
|
||||
tests_path = "./tests/runtests" if os.name != "nt" else ".\tests\runtests"
|
||||
_, stderr, status = run_command(f"nim compile {tests_path}", stdout=DEVNULL, stderr=PIPE)
|
||||
test_runner_path = "./tests/jatr" if os.name != "nt" else ".\tests\jatr"
|
||||
tests_path = "./tests/jats" if os.name != "nt" else ".\tests\jats"
|
||||
command = "nim {flags} compile {path}".format(flags=nim_flags, path=test_runner_path)
|
||||
_, stderr, status = run_command(command, stdout=DEVNULL, stderr=PIPE)
|
||||
if status != 0:
|
||||
logging.error(f"Command '{command}' exited with non-0 exit code {status}, output below:\n{stderr.decode()}")
|
||||
else:
|
||||
command = f"nim compile {tests_path}"
|
||||
_, stderr, status = run_command(command, stdout=DEVNULL, stderr=PIPE)
|
||||
if status != 0:
|
||||
logging.error(f"Command '{command}' exited with non-0 exit code {status}, output below:\n{stderr.decode()}")
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue