[LibOS] test/apps: Rewrite Python example

There are two Python3 examples now:
- python-simple contains simple and secure Python3 scripts;
- python-scipy-insecure contains SciPy and NumPy insecure Python3 scripts.

Both examples are tested in Jenkins.
This commit is contained in:
Chia-Che Tsai
2019-11-27 15:39:48 -08:00
committed by Dmitrii Kuvaiskii
parent 111516090b
commit ffe2366beb
9 changed files with 74 additions and 23 deletions
+10 -3
View File
@@ -37,8 +37,14 @@ pipeline {
'''
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python
make regression
cd LibOS/shim/test/apps/python-simple
make check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python-scipy-insecure
make check
'''
}
sh '''
@@ -85,7 +91,8 @@ pipeline {
rm -rf /tmp/graphene.clean-check.clean/LibOS/shim/test/apps/ltp/src
rm -rf LibOS/shim/test/apps/ltp/src
make -C LibOS/shim/test/apps/python clean
make -C LibOS/shim/test/apps/python-simple clean
make -C LibOS/shim/test/apps/python-scipy-insecure clean
make -C LibOS/shim/test/apps/bash clean
make -C LibOS/shim/test/apps/gcc clean
make -C LibOS/shim/test/apps/lmbench clean
+8 -2
View File
@@ -31,8 +31,14 @@ pipeline {
'''
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python
make regression
cd LibOS/shim/test/apps/python-simple
PYTHONVERSION=python3.6 make check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python-scipy-insecure
PYTHONVERSION=python3.6 make check
'''
}
sh '''
+10 -3
View File
@@ -33,8 +33,14 @@ pipeline {
'''
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python
make regression
cd LibOS/shim/test/apps/python-simple
make check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python-scipy-insecure
make check
'''
}
sh '''
@@ -79,7 +85,8 @@ pipeline {
rm -rf /tmp/graphene-debug.clean-check.clean/LibOS/shim/test/apps/ltp/src
rm -rf LibOS/shim/test/apps/ltp/src
make -C LibOS/shim/test/apps/python clean
make -C LibOS/shim/test/apps/python-simple clean
make -C LibOS/shim/test/apps/python-scipy-insecure clean
make -C LibOS/shim/test/apps/bash clean
make -C LibOS/shim/test/apps/gcc clean
make -C LibOS/shim/test/apps/lmbench clean
+8 -2
View File
@@ -28,8 +28,14 @@ pipeline {
'''
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python
make regression
cd LibOS/shim/test/apps/python-simple
PYTHONVERSION=python3.6 make check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python-scipy-insecure
PYTHONVERSION=python3.6 make check
'''
}
sh '''
+12 -4
View File
@@ -67,9 +67,16 @@ pipeline {
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python
make SGX=1 all sgx-tokens
make SGX=1 regression
cd LibOS/shim/test/apps/python-simple
make SGX=1
make SGX=1 check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python-scipy-insecure
make SGX=1
make SGX=1 check
'''
}
timeout(time: 5, unit: 'MINUTES') {
@@ -120,7 +127,8 @@ pipeline {
rm -rf /tmp/graphene-sgx.clean-check.clean/LibOS/shim/test/apps/ltp/src
rm -rf LibOS/shim/test/apps/ltp/src
make -C LibOS/shim/test/apps/python SGX=1 clean
make -C LibOS/shim/test/apps/python-simple SGX=1 clean
make -C LibOS/shim/test/apps/python-scipy-insecure SGX=1 clean
make -C LibOS/shim/test/apps/bash SGX=1 clean
make -C LibOS/shim/test/apps/gcc SGX=1 clean
make -C LibOS/shim/test/apps/lmbench SGX=1 clean
+13 -6
View File
@@ -64,18 +64,25 @@ pipeline {
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python
make SGX=1 all sgx-tokens
make SGX=1 regression
cd LibOS/shim/test/apps/python-simple
PYTHONVERSION=python3.6 make SGX=1
PYTHONVERSION=python3.6 make SGX=1 check
'''
}
timeout(time: 5, unit: 'MINUTES') {
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/python-scipy-insecure
PYTHONVERSION=python3.6 make SGX=1
PYTHONVERSION=python3.6 make SGX=1 check
'''
}
timeout(time: 5, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/bash
make SGX=1 all
make SGX=1 regression
'''
}
}
timeout(time: 10, unit: 'MINUTES') {
sh '''
cd LibOS/shim/test/apps/gcc
+6 -1
View File
@@ -17,6 +17,7 @@ RUN apt-get update \
libaprutil1-dev \
libexpat1 \
libexpat1-dev \
libnss-mdns \
libomp-dev \
libpcre2-dev \
libpcre3-dev \
@@ -26,10 +27,14 @@ RUN apt-get update \
net-tools \
protobuf-c-compiler \
python \
python3-minimal \
python3-apport \
python3-apt \
python3-lxml \
python3-minimal \
python3-numpy \
python3-pip \
python3-pytest \
python3-scipy \
texinfo \
wget \
&& /usr/bin/pip3 install protobuf \
+6 -1
View File
@@ -17,6 +17,7 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install -y \
libelf-dev \
libexpat1 \
libexpat1-dev \
libnss-mdns \
libomp-dev \
libpcre2-dev \
libpcre3-dev \
@@ -26,11 +27,15 @@ RUN apt-get update && env DEBIAN_FRONTEND=noninteractive apt-get install -y \
net-tools \
protobuf-c-compiler \
python \
python3-apport \
python3-apt \
python3-breathe \
python3-lxml \
python3-numpy \
python3-pip \
python3-protobuf \
python3-pytest \
python3-lxml \
python3-scipy \
texinfo \
wget