Skip to content

Commit 2ee5a33

Browse files
authored
Merge pull request #2504 from polgreen/docker_file_for_xen
Compiling Xen with CBMC: docker file "expensive regression test"
2 parents fc1df25 + 507766e commit 2ee5a33

File tree

3 files changed

+57
-0
lines changed

3 files changed

+57
-0
lines changed

integration/xen/Dockerfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
FROM ubuntu:16.04
2+
3+
RUN apt-get update && apt-get --no-install-recommends -y install \
4+
build-essential gcc git make flex bison \
5+
software-properties-common libwww-perl python \
6+
bin86 gdb bcc liblzma-dev python-dev gettext iasl \
7+
uuid-dev libncurses5-dev libncursesw5-dev pkg-config \
8+
libgtk2.0-dev libyajl-dev sudo time
9+
10+
ADD integration/xen/docker_compile_xen.sh docker_compile_xen.sh
11+
ADD src /tmp/cbmc/src
12+
RUN ./docker_compile_xen.sh
13+
VOLUME /tmp/cbmc
14+
VOLUME /tmp/xen_compilation

integration/xen/Makefile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
CONTAINER_ID = xen_build_container
2+
IMAGE_ID = xen_image
3+
4+
all:
5+
if docker ps | grep -q ^$(CONTAINER_ID) ; then \
6+
docker rm xen_build_container ; \
7+
fi
8+
cd ../../ && docker build -t $(IMAGE_ID) -f integration/xen/Dockerfile .
9+
docker run -i -t --name $(CONTAINER_ID) $(IMAGE_ID) /bin/bash

integration/xen/docker_compile_xen.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#/bin/bash
2+
3+
set -e
4+
5+
cd /tmp/cbmc/src
6+
7+
make minisat2-download
8+
make -j$(nproc)
9+
10+
mkdir /tmp/xen_compilation
11+
cd /tmp/xen_compilation
12+
ln -s /tmp/cbmc/src/goto-cc/goto-cc goto-ld
13+
ln -s /tmp/cbmc/src/goto-cc/goto-cc goto-gcc
14+
ln -s /tmp/cbmc/src/goto-cc/goto-cc goto-diff
15+
16+
git clone https://github.com/awslabs/one-line-scan.git
17+
18+
git clone git://xenbits.xen.org/xen.git
19+
20+
export PATH=$(pwd)/one-line-scan/configuration:$PATH
21+
export PATH=$(pwd):$PATH
22+
23+
cd xen
24+
if one-line-scan \
25+
--no-analysis --trunc-existing \
26+
--extra-cflags -Wno-error \
27+
-o CPROVER -j $(($(nproc)/4)) -- make xen -j$(nproc)
28+
then
29+
echo "SUCCESS: Compilation of Xen succeeded"
30+
else
31+
echo -n "FAILED: Compilation of Xen failed."
32+
echo -n " The build log can be found in"
33+
echo " /tmp/xen_compilation/xen/CPROVER/build.log"
34+
fi

0 commit comments

Comments
 (0)