You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@teaclave.apache.org by ms...@apache.org on 2020/01/15 04:59:58 UTC

[incubator-teaclave] 02/02: [ci] Enable basic testing

This is an automated email from the ASF dual-hosted git repository.

mssun pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git

commit c24bb93b95cfa22fab8965bb7f76e4bb3733096c
Author: Mingshen Sun <bo...@mssun.me>
AuthorDate: Tue Jan 14 20:38:56 2020 -0800

    [ci] Enable basic testing
---
 .drone.yml                             | 172 ++++++++++++++++-----------------
 cmake/UtilTargets.cmake                |   6 +-
 cmake/scripts/{sgx_test.sh => test.sh} |  10 +-
 3 files changed, 96 insertions(+), 92 deletions(-)

diff --git a/.drone.yml b/.drone.yml
index a0451b5..0fc508d 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -18,22 +18,22 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && make VERBOSE=1 -j2
-# - name: sgx-test
-#   image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
-#   environment:
-#     IAS_KEY:
-#       from_secret: V5_KEY
-#     IAS_SPID:
-#       from_secret: V5_SPID
-#   privileged: true
-#   volumes:
-#   - name: isgx
-#     path: /dev/isgx
-#   - name: aesmd
-#     path: /var/run/aesmd/aesm.socket
-#   commands:
-#   - . /root/.cargo/env
-#   - cd build && make sgx-test
+- name: test
+  image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
+  environment:
+    IAS_KEY:
+      from_secret: V5_KEY
+    IAS_SPID:
+      from_secret: V5_SPID
+  privileged: true
+  volumes:
+  - name: isgx
+    path: /dev/isgx
+  - name: aesmd
+    path: /var/run/aesmd/aesm.socket
+  commands:
+  - . /root/.cargo/env
+  - cd build && make run-test
 
 volumes:
 - name: isgx
@@ -68,22 +68,22 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && make VERBOSE=1 -j2
-# - name: sgx-test
-#   image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
-#   privileged: true
-#   environment:
-#     IAS_KEY:
-#       from_secret: V5_KEY
-#     IAS_SPID:
-#       from_secret: V5_SPID
-#   volumes:
-#   - name: isgx
-#     path: /dev/isgx
-#   - name: aesmd
-#     path: /var/run/aesmd/aesm.socket
-#   commands:
-#   - . /root/.cargo/env
-#   - cd build && make sgx-test
+- name: test
+  image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
+  privileged: true
+  environment:
+    IAS_KEY:
+      from_secret: V5_KEY
+    IAS_SPID:
+      from_secret: V5_SPID
+  volumes:
+  - name: isgx
+    path: /dev/isgx
+  - name: aesmd
+    path: /var/run/aesmd/aesm.socket
+  commands:
+  - . /root/.cargo/env
+  - cd build && make run-test
 
 volumes:
 - name: isgx
@@ -118,11 +118,11 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DSGX_SIM_MODE=ON .. && make VERBOSE=1 -j2
-# - name: sgx-test
-#   image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
-#   commands:
-#   - . /root/.cargo/env
-#   - cd build && make sgx-test
+- name: test
+  image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
+  commands:
+  - . /root/.cargo/env
+  - cd build && make run-test
 
 node:
   instance: mesatee-sgx
@@ -149,11 +149,11 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && cmake -DSGX_SIM_MODE=ON .. && make VERBOSE=1 -j2
-# - name: sgx-test
-#   image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
-#   commands:
-#   - . /root/.cargo/env
-#   - cd build && make sgx-test
+- name: test
+  image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
+  commands:
+  - . /root/.cargo/env
+  - cd build && make run-test
 
 node:
   instance: mesatee-sgx
@@ -180,22 +180,22 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && make VERBOSE=1 -j2
-# - name: sgx-test
-#   image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
-#   environment:
-#     IAS_KEY:
-#       from_secret: V5_KEY
-#     IAS_SPID:
-#       from_secret: V5_SPID
-#   privileged: true
-#   volumes:
-#   - name: isgx
-#     path: /dev/isgx
-#   - name: aesmd
-#     path: /var/run/aesmd/aesm.socket
-#   commands:
-#   - . /root/.cargo/env
-#   - cd build && make sgx-test
+- name: test
+  image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
+  environment:
+    IAS_KEY:
+      from_secret: V5_KEY
+    IAS_SPID:
+      from_secret: V5_SPID
+  privileged: true
+  volumes:
+  - name: isgx
+    path: /dev/isgx
+  - name: aesmd
+    path: /var/run/aesmd/aesm.socket
+  commands:
+  - . /root/.cargo/env
+  - cd build && make run-test
 
 volumes:
 - name: isgx
@@ -230,22 +230,22 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && make VERBOSE=1 -j2
-# - name: sgx-test
-#   image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
-#   privileged: true
-#   environment:
-#     IAS_KEY:
-#       from_secret: V5_KEY
-#     IAS_SPID:
-#       from_secret: V5_SPID
-#   volumes:
-#   - name: isgx
-#     path: /dev/isgx
-#   - name: aesmd
-#     path: /var/run/aesmd/aesm.socket
-#   commands:
-#   - . /root/.cargo/env
-#   - cd build && make sgx-test
+- name: test
+  image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
+  privileged: true
+  environment:
+    IAS_KEY:
+      from_secret: V5_KEY
+    IAS_SPID:
+      from_secret: V5_SPID
+  volumes:
+  - name: isgx
+    path: /dev/isgx
+  - name: aesmd
+    path: /var/run/aesmd/aesm.socket
+  commands:
+  - . /root/.cargo/env
+  - cd build && make run-test
 
 volumes:
 - name: isgx
@@ -280,11 +280,11 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DSGX_SIM_MODE=ON .. && make VERBOSE=1 -j2
-# - name: sgx-test
-#   image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
-#   commands:
-#   - . /root/.cargo/env
-#   - cd build && make sgx-test
+- name: test
+  image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
+  commands:
+  - . /root/.cargo/env
+  - cd build && make run-test
 
 node:
   instance: mesatee-sgx
@@ -311,11 +311,11 @@ steps:
   commands:
   - . /root/.cargo/env
   - cd build && cmake -DSGX_SIM_MODE=ON -DTEST_MODE=ON .. && make VERBOSE=1 -j2
-# - name: sgx-test
-#   image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
-#   commands:
-#   - . /root/.cargo/env
-#   - cd build && make sgx-test
+- name: test
+  image: mesalocklinux/mesatee-build-ubuntu-1604:0.1.2
+  commands:
+  - . /root/.cargo/env
+  - cd build && make run-test
 
 node:
   instance: mesatee-sgx
@@ -369,7 +369,7 @@ node:
 #   - . /root/.cargo/env
 #   - export RUSTFLAGS="-D warnings"
 #   - cd build && make VERBOSE=1 -j2
-# - name: sgx-test
+# - name: test
 #   image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
 #   environment:
 #     IAS_KEY:
@@ -384,7 +384,7 @@ node:
 #     path: /var/run/aesmd/aesm.socket
 #   commands:
 #   - . /root/.cargo/env
-#   - cd build && make sgx-test
+#   - cd build && make run-test
 # - name: coverage
 #   failure: ignore
 #   image: mesalocklinux/mesatee-build-ubuntu-1804:0.1.2
diff --git a/cmake/UtilTargets.cmake b/cmake/UtilTargets.cmake
index bcaa7e2..e174f72 100644
--- a/cmake/UtilTargets.cmake
+++ b/cmake/UtilTargets.cmake
@@ -24,10 +24,10 @@ add_custom_target(check
 )
 
 if(TEST_MODE)
-    add_custom_target(sgx-test
-        COMMAND ${MESATEE_COMMON_ENVS} ${MT_SCRIPT_DIR}/sgx_test.sh)
+    add_custom_target(run-test
+        COMMAND ${MESATEE_COMMON_ENVS} ${MT_SCRIPT_DIR}/test.sh)
 else()
-    add_custom_target(sgx-test
+    add_custom_target(run-test
         COMMAND echo "Note: Testing is not enabled in this build. Run cmake again with -DTEST_MODE=ON")
 endif()
 
diff --git a/cmake/scripts/sgx_test.sh b/cmake/scripts/test.sh
similarity index 70%
rename from cmake/scripts/sgx_test.sh
rename to cmake/scripts/test.sh
index f622629..9e4afa2 100755
--- a/cmake/scripts/sgx_test.sh
+++ b/cmake/scripts/test.sh
@@ -14,6 +14,10 @@ if [ "${SGX_MODE}" = "HW" ]; then
     fi
 fi
 
-cd ${MESATEE_PROJECT_ROOT}/tests && ./module_test.sh
-cd ${MESATEE_PROJECT_ROOT}/tests && ./functional_test.sh
-cd ${MESATEE_PROJECT_ROOT}/tests && ./integration_test.sh
+pushd ${MESATEE_TEST_INSTALL_DIR}
+
+./teaclave_enclave_unit_test
+./teaclave_leveldb_tests
+./teaclave_protected_fs_tests
+
+popd


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@teaclave.apache.org
For additional commands, e-mail: commits-help@teaclave.apache.org