wolfSSL / wolfMQTT

wolfMQTT is a small, fast, portable MQTT client implementation, including support for TLS 1.3.
https://www.wolfssl.com
GNU General Public License v2.0
521 stars 155 forks source link

Fix bug in test scripts #265

Closed lealem47 closed 2 years ago

lealem47 commented 2 years ago

Currently, the scripts exit out pending cleanup in a similar format as shown below

[ $RESULT -ne 0 ] && echo -e "\n\nMQTT Client failed! TLS=Off, QoS=0" && do_cleanup && exit 1

But exit 1 only executes if do_cleanup returns 0, which it won't do if it can't find the pid it's trying to kill. So even if certain tests fail, if do_cleanup doesn't return 0, the test doesn't exit out and eventually exits with 0 (test passes). These changes should fix that.

lygstate commented 2 years ago

You can uploading artifact always for checking testing error

 .github/workflows/macos-check.yml  |  7 +++++++
 .github/workflows/ubuntu-check.yml | 11 +++++++++--
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/macos-check.yml b/.github/workflows/macos-check.yml
index 0cc0aee..3d9094a 100644
--- a/.github/workflows/macos-check.yml
+++ b/.github/workflows/macos-check.yml
@@ -38,3 +38,10 @@ jobs:
       run: make
     - name: make check
       run: make check
+    - name: Archive production artifacts
+      uses: actions/upload-artifact@v2
+      with:
+        name: build-error-log
+        path: |
+          ./test-suite.log
+      if: always()
diff --git a/.github/workflows/ubuntu-check.yml b/.github/workflows/ubuntu-check.yml
index 01872ea..c69f319 100644
--- a/.github/workflows/ubuntu-check.yml
+++ b/.github/workflows/ubuntu-check.yml
@@ -17,10 +17,10 @@ jobs:
         repository: wolfssl/wolfssl
         path: wolfssl
     - name: wolfssl autogen
-      working-directory: ./wolfssl        
+      working-directory: ./wolfssl
       run: ./autogen.sh
     - name: wolfssl configure
-      working-directory: ./wolfssl 
+      working-directory: ./wolfssl
       run: ./configure
     - name: wolfssl make
       working-directory: ./wolfssl
@@ -37,3 +37,10 @@ jobs:
       run: make
     - name: make check
       run: make check
+    - name: Archive production artifacts
+      uses: actions/upload-artifact@v2
+      with:
+        name: build-error-log
+        path: |
+          ./test-suite.log
+      if: always()