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

dingyu pushed a commit to branch yu-fix-cov
in repository https://gitbox.apache.org/repos/asf/incubator-teaclave.git

commit c219f59ce3c1c19e7cc678f9e645ddbffbd4bb14
Author: Yu Ding <[email protected]>
AuthorDate: Wed Feb 2 11:30:41 2022 -0800

    fix: code coverage report generation
---
 cmake/scripts/gen_cov.sh                            | 2 +-
 docker/build.ubuntu-1804.sgx-2.14.Dockerfile        | 7 +++++++
 docker/build.ubuntu-1804.sgx-dcap-1.11.Dockerfile   | 7 +++++++
 docker/build.ubuntu-2004.sgx-2.15.1.Dockerfile      | 7 +++++++
 docker/build.ubuntu-2004.sgx-dcap-1.12.1.Dockerfile | 7 +++++++
 third_party/crates-sgx                              | 2 +-
 6 files changed, 30 insertions(+), 2 deletions(-)

diff --git a/cmake/scripts/gen_cov.sh b/cmake/scripts/gen_cov.sh
index 64aaad9..6102d5b 100755
--- a/cmake/scripts/gen_cov.sh
+++ b/cmake/scripts/gen_cov.sh
@@ -49,7 +49,7 @@ cd ${TEACLAVE_OUT_DIR} && ${LCOV} ${LCOVOPT} $(for tag in \
     `find ${TEACLAVE_PROJECT_ROOT} -name sgx_cov*.gcda | cut -d'.' -f2`; \
     do echo "--add modules_$tag.info"; done) \
     --add modules.info -o merged.info
-cd ${TEACLAVE_OUT_DIR} && python ${LCOV_REALPATH} merged.info > 
merged_realpath.info
+cd ${TEACLAVE_OUT_DIR} && python3 ${LCOV_REALPATH} merged.info > 
merged_realpath.info
 ${LCOV} ${LCOVOPT} --extract ${TEACLAVE_OUT_DIR}/merged_realpath.info \
     `find ${TEACLAVE_PROJECT_ROOT} -path ${TEACLAVE_PROJECT_ROOT}/third_party 
-prune -o \
     -path ${TEACLAVE_PROJECT_ROOT}/build -prune -o \
diff --git a/docker/build.ubuntu-1804.sgx-2.14.Dockerfile 
b/docker/build.ubuntu-1804.sgx-2.14.Dockerfile
index f1b070a..434afa4 100644
--- a/docker/build.ubuntu-1804.sgx-2.14.Dockerfile
+++ b/docker/build.ubuntu-1804.sgx-2.14.Dockerfile
@@ -130,6 +130,13 @@ RUN git clone https://github.com/apache/tvm /tvm           
     && \
     cmake -DUSE_LLVM=ON ..                                      && \
     make -j$(nproc)
 
+# Install llvm-cov version 11 from llvm-11
+RUN wget https://apt.llvm.org/llvm.sh                           && \
+    chmod +x llvm.sh                                            && \
+    ./llvm.sh 11                                                && \
+    update-alternatives --install /usr/bin/llvm-cov llvm-cov-11 
/usr/bin/llvm-cov-11 11 && \
+    rm ./llvm.sh
+
 # clean up apt caches
 
 RUN apt-get clean && \
diff --git a/docker/build.ubuntu-1804.sgx-dcap-1.11.Dockerfile 
b/docker/build.ubuntu-1804.sgx-dcap-1.11.Dockerfile
index d5ce810..377465b 100644
--- a/docker/build.ubuntu-1804.sgx-dcap-1.11.Dockerfile
+++ b/docker/build.ubuntu-1804.sgx-dcap-1.11.Dockerfile
@@ -138,6 +138,13 @@ RUN git clone https://github.com/apache/tvm /tvm           
     && \
     cmake -DUSE_LLVM=ON ..                                      && \
     make -j$(nproc)
 
+# Install llvm-cov version 11 from llvm-11
+RUN wget https://apt.llvm.org/llvm.sh                           && \
+    chmod +x llvm.sh                                            && \
+    ./llvm.sh 11                                                && \
+    update-alternatives --install /usr/bin/llvm-cov llvm-cov-11 
/usr/bin/llvm-cov-11 11 && \
+    rm ./llvm.sh
+
 # clean up apt caches
 
 RUN apt-get clean && \
diff --git a/docker/build.ubuntu-2004.sgx-2.15.1.Dockerfile 
b/docker/build.ubuntu-2004.sgx-2.15.1.Dockerfile
index 7c4c341..b1baf2e 100644
--- a/docker/build.ubuntu-2004.sgx-2.15.1.Dockerfile
+++ b/docker/build.ubuntu-2004.sgx-2.15.1.Dockerfile
@@ -130,6 +130,13 @@ RUN git clone https://github.com/apache/tvm /tvm           
     && \
     cmake -DUSE_LLVM=ON ..                                      && \
     make -j$(nproc)
 
+# Install llvm-cov version 11 from llvm-11
+RUN wget https://apt.llvm.org/llvm.sh                           && \
+    chmod +x llvm.sh                                            && \
+    ./llvm.sh 11                                                && \
+    update-alternatives --install /usr/bin/llvm-cov llvm-cov-11 
/usr/bin/llvm-cov-11 11 && \
+    rm ./llvm.sh
+
 # clean up apt caches
 
 RUN apt-get clean && \
diff --git a/docker/build.ubuntu-2004.sgx-dcap-1.12.1.Dockerfile 
b/docker/build.ubuntu-2004.sgx-dcap-1.12.1.Dockerfile
index 6a2f00d..e346e0c 100644
--- a/docker/build.ubuntu-2004.sgx-dcap-1.12.1.Dockerfile
+++ b/docker/build.ubuntu-2004.sgx-dcap-1.12.1.Dockerfile
@@ -138,6 +138,13 @@ RUN git clone https://github.com/apache/tvm /tvm           
     && \
     cmake -DUSE_LLVM=ON ..                                      && \
     make -j$(nproc)
 
+# Install llvm-cov version 11 from llvm-11
+RUN wget https://apt.llvm.org/llvm.sh                           && \
+    chmod +x llvm.sh                                            && \
+    ./llvm.sh 11                                                && \
+    update-alternatives --install /usr/bin/llvm-cov llvm-cov-11 
/usr/bin/llvm-cov-11 11 && \
+    rm ./llvm.sh
+
 # clean up apt caches
 
 RUN apt-get clean && \
diff --git a/third_party/crates-sgx b/third_party/crates-sgx
index 7b5fdc6..51ec87b 160000
--- a/third_party/crates-sgx
+++ b/third_party/crates-sgx
@@ -1 +1 @@
-Subproject commit 7b5fdc60d567134009143de5d362db82d46165eb
+Subproject commit 51ec87b2f61a0324f2698d6dda858e4d2758a78a

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to