first commit

This commit is contained in:
Jean-Marie Mineau 2023-11-15 15:59:13 +01:00
commit cd1e91bb99
Signed by: histausse
GPG key ID: B66AEEDA9B645AD2
287 changed files with 86425 additions and 0 deletions

View file

@ -0,0 +1,28 @@
FROM ubuntu:14.04
# RUN sed -i -e "s/archive.ubuntu.com/old-releases.ubuntu.com/g" /etc/apt/sources.list
RUN apt-get update && apt-get install -y git time
RUN mkdir /workspace
RUN git init /workspace/saaf && \
cd /workspace/saaf && \
git remote add origin https://github.com/SAAF-Developers/saaf && \
git fetch --depth=1 origin fc8dd8c86da2fa3c98ae9902e00c95ae248ecadb && \
git reset --hard FETCH_HEAD
RUN apt-get update && apt-get install -y ant openjdk-6-jdk mysql-server
# This allows to pass the db tests, the db is not needed for running the tool
RUN mysqld & sleep 10 && \
mysql -e 'CREATE DATABASE saaftest;' && \
mysql -e "CREATE USER 'saafuser' IDENTIFIED BY 'saafpass';" && \
mysql -e "GRANT ALL PRIVILEGES ON saaftest.* TO 'saafuser';"
RUN mysqld & sleep 10 && \
update-java-alternatives -s /usr/lib/jvm/java-1.6.0-openjdk-amd64 && \
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8 && \
cd /workspace/saaf && ant clean && ant fat-jar
COPY run.sh /

View file

@ -0,0 +1,28 @@
#!/usr/bin/env bash
APK_FILENAME=$1
export TIME="time: %e
kernel-cpu-time: %S
user-cpu-time: %U
max-rss-mem: %M
avg-rss-mem: %t
avg-total-mem: %K
page-size: %Z
nb-major-page-fault: %F
nb-minor-page-fault: %R
nb-fs-input: %I
nb-fs-output: %O
nb-socket-msg-received: %r
nb-socket-msg-sent: %s
nb-signal-delivered: %k
exit-status: %x"
export _JAVA_OPTIONS=-Duser.home=/mnt
cd /mnt
# copying saaf software in /mnt (30 MB) as it needs to run and write in its own directory
cp -Rf /workspace/saaf ./
cd saaf
/usr/bin/time -o /mnt/report -q /usr/bin/timeout --kill-after=20s ${TIMEOUT} java ${JAVA_PARAM} -jar /mnt/saaf/dist/SAAF.jar -hl -log /mnt/log.txt -nodb -rprt /mnt/rprt /mnt/${APK_FILENAME} > /mnt/stdout 2> /mnt/stderr