Florian Mayer | 82c3965 | 2018-12-06 17:55:39 +0000 | [diff] [blame] | 1 | # Copyright (C) 2018 The Android Open Source Project |
| 2 | # |
| 3 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | # you may not use this file except in compliance with the License. |
| 5 | # You may obtain a copy of the License at |
| 6 | # |
| 7 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | # |
| 9 | # Unless required by applicable law or agreed to in writing, software |
| 10 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | # See the License for the specific language governing permissions and |
| 13 | # limitations under the License. |
| 14 | |
| 15 | # Build with |
| 16 | # cd infra/fuzzing |
| 17 | # $ sudo docker build -t fuzzing . |
| 18 | |
| 19 | # Run with |
| 20 | # $ CONTAINER=$(sudo docker run -d --cap-add=SYS_PTRACE fuzzing) |
| 21 | |
| 22 | # Get outputs with |
| 23 | # $ sudo docker cp -a ${CONTAINER}:/home/perfetto/perfetto/fuzz_out /tmp |
| 24 | |
| 25 | FROM debian:latest |
| 26 | |
| 27 | ENV DEBIAN_FRONTEND noninteractive |
| 28 | |
| 29 | RUN echo deb http://deb.debian.org/debian testing main > /etc/apt/sources.list.d/testing.list |
| 30 | RUN apt-get update |
| 31 | RUN apt-get -y install python git curl |
| 32 | # gcc-7 for sysroot |
| 33 | RUN apt-get -y -t testing install gcc-7 |
| 34 | |
| 35 | # pip for installing certiain test script dependencies |
| 36 | RUN curl https://bootstrap.pypa.io/get-pip.py | python - |
| 37 | |
| 38 | RUN useradd -m perfetto |
| 39 | USER perfetto:perfetto |
| 40 | WORKDIR /home/perfetto |
| 41 | |
| 42 | RUN git clone https://android.googlesource.com/platform/external/perfetto/ |
| 43 | |
| 44 | CMD cd perfetto/ && tools/continuous_fuzz |