Commit 8c5d87d5 authored by Tomas Krizek's avatar Tomas Krizek

job_manager: support ASAN build

parent e407e22e
......@@ -28,12 +28,13 @@ RUN \
# actual image
FROM registry.labs.nic.cz/knot/respdiff/knot-resolver-buildenv:knot-$KNOT_BRANCH
MAINTAINER Knot Resolver <knot-resolver@labs.nic.cz>
ARG CFLAGS
COPY --from=intermediate /var/opt/knot-resolver /var/opt/knot-resolver
WORKDIR /var/opt/knot-resolver
RUN mkdir .install
RUN make PREFIX=/var/opt/knot-resolver/.install LDFLAGS="-Wl,-rpath=/var/opt/knot-resolver/.install/lib"
RUN make PREFIX=/var/opt/knot-resolver/.install LDFLAGS="-Wl,-rpath=/var/opt/knot-resolver/.install/lib" CFLAGS="${CFLAGS}"
RUN make install PREFIX=/var/opt/knot-resolver/.install
RUN mkdir /log
......
......@@ -138,6 +138,7 @@ def create_jobs(args: argparse.Namespace) -> None:
config['git_sha'] = git_sha
config['knot_branch'] = args.knot_branch
config['verbose'] = args.verbose
config['asan'] = args.asan
directory = os.path.join(args.jobs_dir, commit_dir, test_case)
prepare_dir(directory, clean=args.clean)
......@@ -175,6 +176,9 @@ def main() -> None:
parser.add_argument(
'-v', '--verbose', action='store_true',
help="Capture verbose logs from kresd")
parser.add_argument(
'--asan', action='store_true',
help="Build with Address Sanitizer")
args = parser.parse_args()
create_jobs(args)
......
......@@ -13,7 +13,8 @@ services:
GIT_SHA: {{ git_sha }}
SSH_PRIVATE_KEY: ${SSH_PRIVATE_KEY}
KNOT_BRANCH: ${KNOT_BRANCH}
image: knot-resolver:{{ git_sha }}
CFLAGS: {{ '-ggdb3 -O0 -fsanitize=address -fno-omit-frame-pointer' if asan else '' }}
image: knot-resolver:{{ git_sha }}{{ '-asan' if asan else '' }}
volumes:
- "./{{ name }}.conf:/etc/knot-resolver/kresd.conf:ro"
- "./root.keys:/etc/knot-resolver/root.keys:ro"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment