in scripts/test-examples.py [0:0]
def run_example_build(project_dir, build_file="", settings_file=""):
command = [gradlew, "-p", project_dir, "-s", "-w", "--info", "--stacktrace"]
if settings_file:
command.extend(["-c", settings_file])
else:
Out.error(f"The project {project_dir} is missing a Gradle settings file!")
sys.exit(2)
command.extend(["clean", "check"])
str_cmd = " ".join(command)
try:
Out.info(f"Running {str_cmd}")
p = subprocess.check_output(command)
Out.info(p.decode("utf-8"))
except subprocess.SubprocessError as error:
Out.error(f"Unable to test {project_dir}, command '{str_cmd}' failed!", error)
sys.exit(2)