Browse Source

[Jenkins] Check for missing gitignores and fix found issues

Simon Gaiser 4 years ago
parent
commit
0daeed847f

+ 1 - 0
.ci/run-shellcheck

@@ -16,6 +16,7 @@ shellcheck "$@" \
     Scripts/clean-check-prepare \
     Scripts/clean-check-test-copy \
     Scripts/download \
+    Scripts/gitignore-test \
     Scripts/list-all-graphene.sh \
     Scripts/memusg \
     .ci/run-pylint \

+ 6 - 0
Jenkinsfiles/Linux

@@ -117,6 +117,12 @@ pipeline {
                                 LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh https://127.0.0.1:8443
                             '''
                         }
+                        sh '''
+                           # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
+                           git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
+
+                           ./Scripts/gitignore-test
+                        '''
                         sh '''
                            cd "$(./Scripts/clean-check-test-copy)"
 

+ 6 - 0
Jenkinsfiles/Linux-18.04

@@ -115,6 +115,12 @@ pipeline {
                                 LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh https://127.0.0.1:8443
                             '''
                         }
+                        sh '''
+                           # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
+                           git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
+
+                           ./Scripts/gitignore-test
+                        '''
                         sh '''
                            cd "$(./Scripts/clean-check-test-copy)"
 

+ 6 - 0
Jenkinsfiles/Linux-Debug

@@ -116,6 +116,12 @@ pipeline {
                                 LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh https://127.0.0.1:8443
                             '''
                         }
+                        sh '''
+                           # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
+                           git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
+
+                           ./Scripts/gitignore-test
+                        '''
                         sh '''
                            cd "$(./Scripts/clean-check-test-copy)"
 

+ 6 - 0
Jenkinsfiles/Linux-Debug-18.04

@@ -115,6 +115,12 @@ pipeline {
                                 LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh https://127.0.0.1:8443
                             '''
                         }
+                        sh '''
+                           # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
+                           git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
+
+                           ./Scripts/gitignore-test
+                        '''
                         sh '''
                            cd "$(./Scripts/clean-check-test-copy)"
 

+ 7 - 0
Jenkinsfiles/Linux-SGX

@@ -80,6 +80,13 @@ pipeline {
                             make SGX=1 ltp-sgx.xml || :
                             '''
 
+                        sh '''
+                           # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
+                           git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
+
+                           ./Scripts/gitignore-test
+                        '''
+
                         sh '''
                            cd "$(./Scripts/clean-check-test-copy)"
 

+ 6 - 0
Jenkinsfiles/Linux-SGX-18.04

@@ -82,6 +82,12 @@ pipeline {
                             make SGX=1 all sgx-tokens
                             make SGX=1 ltp-sgx.xml || :
                             '''
+                        sh '''
+                           # Workaround LTP bug (see https://github.com/linux-test-project/ltp/issues/560 for upstream fix):
+                           git -C LibOS/shim/test/apps/ltp/src checkout -- utils/ffsb-6.0-rc2/config.h.in utils/ffsb-6.0-rc2/configure
+
+                           ./Scripts/gitignore-test
+                        '''
                         sh '''
                            cd "$(./Scripts/clean-check-test-copy)"
 

+ 3 - 0
Jenkinsfiles/Linux-SGX-18.04-apps

@@ -122,6 +122,9 @@ pipeline {
                                 LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh https://127.0.0.1:8443
                             '''
                         }
+                        sh '''
+                           ./Scripts/gitignore-test
+                        '''
                         sh '''
                            cd "$(./Scripts/clean-check-test-copy)"
 

+ 3 - 0
Jenkinsfiles/Linux-SGX-apps

@@ -119,6 +119,9 @@ pipeline {
                                 LOOP=1 CONCURRENCY_LIST="1 32" ./benchmark-http.sh https://127.0.0.1:8443
                             '''
                         }
+                        sh '''
+                           ./Scripts/gitignore-test
+                        '''
                         sh '''
                            cd "$(./Scripts/clean-check-test-copy)"
 

+ 1 - 1
LibOS/shim/test/apps

@@ -1 +1 @@
-Subproject commit a92e3e112fe75634912b8d32cc4c6a2d772673fb
+Subproject commit 37e15af30a8c5f310c162cf52f1331b41e9e1f43

+ 1 - 0
LibOS/shim/test/fs/.gitignore

@@ -12,3 +12,4 @@ seek_tell
 stat
 truncate
 *.xml
+/.cache

+ 22 - 0
Scripts/gitignore-test

@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -eu -o pipefail
+
+# Intended to be run after a build. Returns 1 (i.e. failure) if there's at
+# least one modified or untracked file which is not gitignored.
+
+# Don't inline it in the if, since we want to exit on error return codes (set -e).
+status="$(git status --porcelain)"
+
+if [ -z "$status" ]; then
+    echo "No not-gitignored changes :]"
+    exit 0
+fi
+
+echo "================================================================================"
+echo "              ERROR: Files modified by build, but not gitignored:"
+echo "--------------------------------------------------------------------------------"
+echo "$status"
+git submodule foreach --recursive git status --porcelain
+echo "================================================================================"
+exit 1