diff --git a/.travis.yml b/.travis.yml index fc6c7a8..7575b8a 100644 --- a/.travis.yml +++ b/.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 diff --git a/Dockerfile b/Dockerfile index 7a58f74..2a64ce2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,4 @@ FROM ubuntu:14.04 -MAINTAINER Chris Timperley "christimperley@gmail.com" # Create docker user RUN apt-get update && \ @@ -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 diff --git a/Dockerfile.gzip b/Dockerfile.gzip index f903391..4714aff 100644 --- a/Dockerfile.gzip +++ b/Dockerfile.gzip @@ -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 diff --git a/gzip/Dockerfile.bug b/gzip/Dockerfile.bug index 5f431fd..23cbaa7 100644 --- a/gzip/Dockerfile.bug +++ b/gzip/Dockerfile.bug @@ -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 diff --git a/php/Dockerfile b/php/Dockerfile index 5d685a1..b256ddc 100644 --- a/php/Dockerfile +++ b/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 diff --git a/php/Dockerfile.bug b/php/Dockerfile.bug index cc813ae..c3b21b2 100644 --- a/php/Dockerfile.bug +++ b/php/Dockerfile.bug @@ -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 diff --git a/python/Dockerfile.bug b/python/Dockerfile.bug index 885b53f..e1e071f 100644 --- a/python/Dockerfile.bug +++ b/python/Dockerfile.bug @@ -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)