Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit c522f29

Browse files
author
Joseph Finnegan
committed
change to lsof-based checker
1 parent fdc242e commit c522f29

File tree

1 file changed

+3
-13
lines changed

1 file changed

+3
-13
lines changed

.github/workflows/github-ci.yml

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,18 +79,15 @@ jobs:
7979
name: Run Testsuite
8080
runs-on: self-hosted
8181
needs: generate-builds
82-
env:
83-
TESTSUITE_STATUS_CHANGED_DURING_RUN: "false"
84-
TESTSUITE_RUNNING_STATUS_LOC: ${{ secrets.TESTSUITE_RUNNING_STATUS_LOC }}
8582

8683
steps:
8784
- uses: actions/download-artifact@v3
8885

8986
- name: Flash builds to devices
9087
run: |
91-
if [ $(cat $TESTSUITE_RUNNING_STATUS_LOC) = RUNNING ] ; then exit 1; fi
92-
echo RUNNING > $TESTSUITE_RUNNING_STATUS_LOC
93-
echo "TESTSUITE_STATUS_CHANGED_DURING_RUN=true" >> $GITHUB_ENV
88+
if [ lsof -i -P -n | grep -q JLinkExe ] ; then exit 1; fi
89+
if [ lsof -n /dev/ttyUSB0 | grep -q /dev/ttyUSB0 ] ; then exit 1; fi
90+
if [ lsof -n /dev/ttyUSB1 | grep -q /dev/ttyUSB1 ] ; then exit 1; fi
9491
cd build/apps/modem
9592
JLinkExe -SelectEmuBySN 770821797 -CommandFile jlink-flash-full.script > flashOutput1.txt
9693
JLinkExe -SelectEmuBySN 772958091 -CommandFile jlink-flash-full.script > flashOutput2.txt
@@ -109,19 +106,12 @@ jobs:
109106
pip install -r requirements.txt
110107
cd ../..
111108
python2 run.py --serial-test-device=/dev/ttyUSB0 --serial-dut=/dev/ttyUSB1 -m "not band433 and not band915 and not known_issue" --junitxml report.xml -v
112-
echo STOPPED > $TESTSUITE_RUNNING_STATUS_LOC
113109
114110
- name: Upload test results
115111
uses: actions/upload-artifact@v2
116112
with:
117113
name: test-results
118114
path: Sub-IoT-testsuite/report.xml
119115

120-
- name: Reset lock on failure of previous steps
121-
if: always()
122-
run: |
123-
if [ $TESTSUITE_STATUS_CHANGED_DURING_RUN = true ] ; then echo STOPPED > $TESTSUITE_RUNNING_STATUS_LOC ; fi
124-
125-
126116

127117

0 commit comments

Comments
 (0)