Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Bear to generate compile_commands.json #16

Merged
merged 9 commits into from Sep 2, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 6 additions & 9 deletions .travis.yml
@@ -1,18 +1,15 @@
language: python

sudo: required

services:
- docker
- docker

python:
- "3.6"
- "3.6"

install:
- pip install bugzoo
- pip install bugzoo

script:
- bugzoo -h
- bugzoo source add https://github.com/ChrisTimperley/ManyBugs
- bugzoo bug validate manybugs:python:69368-69372
- bugzoo bug validate manybugs:python:69223-69224
- bugzoo source add https://github.com/ChrisTimperley/ManyBugs
- bugzoo bug validate manybugs:python:69368-69372
- bugzoo bug validate manybugs:python:69223-69224
18 changes: 14 additions & 4 deletions Dockerfile
@@ -1,5 +1,4 @@
FROM ubuntu:14.04
MAINTAINER Chris Timperley "christimperley@gmail.com"

# Create docker user
RUN apt-get update && \
Expand Down Expand Up @@ -47,14 +46,25 @@ RUN sudo apt-get update && \
RUN sudo rm /bin/sh && \
sudo ln -s /bin/bash /bin/sh

# install Bear
RUN cd /tmp \
&& wget https://github.com/rizsotto/Bear/archive/2.3.13.tar.gz \
&& tar -xf 2.3.13.tar.gz \
&& cd Bear-2.3.13 \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& sudo make install \
&& rm -rf /tmp/*

# Create the experiment directory and set it as the work dir
RUN sudo mkdir -p /experiment && sudo chown -R docker /experiment
WORKDIR /experiment

# add generic preprocessing script
ADD base/preprocess /experiment/preprocess
COPY base/preprocess /experiment/preprocess

# add compile script
ADD compile.sh /experiment/compile.sh
COPY compile.sh /experiment/compile.sh
RUN sudo chown -R docker /experiment && \
sudo chmod +x compile.sh
12 changes: 12 additions & 0 deletions Dockerfile.gzip
Expand Up @@ -49,6 +49,18 @@ RUN sudo apt-get update && \
RUN sudo rm /bin/sh && \
sudo ln -s /bin/bash /bin/sh

# install Bear
RUN cd /tmp \
&& wget https://github.com/rizsotto/Bear/archive/2.3.13.tar.gz \
&& tar -xf 2.3.13.tar.gz \
&& cd Bear-2.3.13 \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make \
&& sudo make install \
&& rm -rf /tmp/*

# Create the experiment directory and set it as the work dir
RUN sudo mkdir -p /experiment && sudo chown -R docker /experiment
WORKDIR /experiment
Expand Down
4 changes: 3 additions & 1 deletion gzip/Dockerfile.bug
Expand Up @@ -61,4 +61,6 @@ RUN sed -i "s#bugged-program.txt#manifest.txt#" configuration-default && \
sed -i "s#perl compile.pl#./compile.sh#" configuration-default

# Preprocess the source code
RUN ./preprocess --m32
# RUN bear ./preprocess --m32
RUN cd src \
&& bear make
28 changes: 13 additions & 15 deletions php/Dockerfile
@@ -1,20 +1,18 @@
FROM squareslab/manybugs:base
MAINTAINER Chris Timperley "christimperley@gmail.com"

# Install necessary packages
RUN sudo apt-get update && \
sudo apt-get install -y --no-install-recommends \
python \
libxml2-dev \
autoconf \
psmisc && \
sudo apt-get clean && \
sudo apt-get autoremove && \
sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
RUN sudo apt-get update && sudo apt-get install -y --no-install-recommends \
autoconf \
libxml2-dev \
python \
psmisc \
&& sudo apt-get clean && \
&& sudo apt-get autoremove && \
&& sudo rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

ADD libxml.patch /experiment
ADD install-dependencies /experiment
ADD tester.py /experiment
ADD test.sh /experiment
ADD php-tests-tar.sh /experiment/php-tests-tar.sh
COPY libxml.patch /experiment
COPY install-dependencies /experiment
COPY tester.py /experiment
COPY test.sh /experiment
COPY php-tests-tar.sh /experiment/php-tests-tar.sh
RUN sudo chown -R docker /experiment
5 changes: 5 additions & 0 deletions php/Dockerfile.bug
Expand Up @@ -98,3 +98,8 @@ RUN cd src && \
find . -name tests -type d | rm -rf - && \
tar -xf all-tests.tar.gz && \
rm -f all-tests.tar.gz

# build
RUN cd src \
&& make clean \
&& bear make -j4
2 changes: 1 addition & 1 deletion python/Dockerfile.bug
Expand Up @@ -56,4 +56,4 @@ RUN sed -i "s#def test_create_connection_timeout(self):#def test_create_connecti
# preprocess
RUN ./preprocess --base && \
cd src && \
make -j$(nproc)
bear make -j$(nproc)