Skip to content

Compiling Xen with CBMC: docker file "expensive regression test" #2504

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

Merged
merged 1 commit into from
Mar 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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions integration/xen/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
FROM ubuntu:16.04

RUN apt-get update && apt-get --no-install-recommends -y install \
build-essential gcc git make flex bison \
software-properties-common libwww-perl python \
bin86 gdb bcc liblzma-dev python-dev gettext iasl \
uuid-dev libncurses5-dev libncursesw5-dev pkg-config \
libgtk2.0-dev libyajl-dev sudo time

ADD integration/xen/docker_compile_xen.sh docker_compile_xen.sh
ADD src /tmp/cbmc/src
RUN ./docker_compile_xen.sh
VOLUME /tmp/cbmc
VOLUME /tmp/xen_compilation
9 changes: 9 additions & 0 deletions integration/xen/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CONTAINER_ID = xen_build_container
IMAGE_ID = xen_image

all:
if docker ps | grep -q ^$(CONTAINER_ID) ; then \
docker rm xen_build_container ; \
fi
cd ../../ && docker build -t $(IMAGE_ID) -f integration/xen/Dockerfile .
docker run -i -t --name $(CONTAINER_ID) $(IMAGE_ID) /bin/bash
34 changes: 34 additions & 0 deletions integration/xen/docker_compile_xen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#/bin/bash

set -e

cd /tmp/cbmc/src

make minisat2-download
make -j$(nproc)

mkdir /tmp/xen_compilation
cd /tmp/xen_compilation
ln -s /tmp/cbmc/src/goto-cc/goto-cc goto-ld
ln -s /tmp/cbmc/src/goto-cc/goto-cc goto-gcc
ln -s /tmp/cbmc/src/goto-cc/goto-cc goto-diff

git clone https://github.com/awslabs/one-line-scan.git

git clone git://xenbits.xen.org/xen.git

export PATH=$(pwd)/one-line-scan/configuration:$PATH
export PATH=$(pwd):$PATH

cd xen
if one-line-scan \
--no-analysis --trunc-existing \
--extra-cflags -Wno-error \
-o CPROVER -j $(($(nproc)/4)) -- make xen -j$(nproc)
then
echo "SUCCESS: Compilation of Xen succeeded"
else
echo -n "FAILED: Compilation of Xen failed."
echo -n " The build log can be found in"
echo " /tmp/xen_compilation/xen/CPROVER/build.log"
fi