diff --git a/zorg/buildbot/builders/annotated/libc-linux.py b/zorg/buildbot/builders/annotated/libc-linux.py --- a/zorg/buildbot/builders/annotated/libc-linux.py +++ b/zorg/buildbot/builders/annotated/libc-linux.py @@ -2,6 +2,10 @@ import os import sys +import shlex +import traceback +import util +from contextlib import contextmanager import annotated_builder @@ -22,6 +26,32 @@ check_targets=check_targets, extra_cmake_args=extra_cmake_args) + # AOR tests step + if not args.asan: + with step('AOR Tests'): + aor_dir = os.path.join('..', 'llvm-project', 'libc', 'AOR_v20.02') + run_command('make check', directory=aor_dir) + + +@contextmanager +def step(step_name, halt_on_fail=True): + print('@@@BUILD_STEP {}@@@'.format(step_name)) + if halt_on_fail: + print('@@@HALT_ON_FAILURE@@@') + try: + yield + except: + print('The build step threw an exception...') + traceback.print_exc(file=sys.stdout) + print('@@@STEP_FAILURE@@@') + finally: + sys.stdout.flush() + +def run_command(cmd, directory='.'): + if isinstance(cmd, str): + cmd = shlex.split(cmd) + util.report_run_cmd(cmd, cwd=directory) + if __name__ == '__main__': sys.path.append(os.path.dirname(__file__))