Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,11 @@ jobs:
uses: actions/download-artifact@v4
with:
name: ocre-zephyr-b_u585i_iot02a-app

- name: Flash b_u585i_iot02a
if: runner.environment == 'self-hosted'
run: |
STM32_Programmer_CLI -c port=swd -w zephyr.bin 0x08000000 -v -rst
STM32_Programmer_CLI -c port=swd -e all -w zephyr.bin 0x08000000 -v -rst

build-and-run-linux-sample:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -316,3 +316,25 @@ jobs:
echo "[FAIL] ${{ matrix.sample.name }} did not produce expected log: ${{ matrix.sample.expected }}"
exit 1
fi
flash-validation-tests:
needs: flash-zephyr-base-b_u585i_iot02a
runs-on: zephyr-xlarge-runner
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Flash Validation Tests
run: |
cd tests && bash beginTests.sh "flashValidation"

- name: Print Flash Validation Logs
if: always()
run: cat /tmp/flashValidation.log

- name: Upload log file as artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: "FlashValidation.log"
path: /tmp/flashValidation.log

31 changes: 0 additions & 31 deletions .github/workflows/tests.yml

This file was deleted.

10 changes: 1 addition & 9 deletions tests/groups/flashValidation/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,6 @@
{
"name": "Check Runtime Hello World",
"exec": "./flash_validation_hello_world.py"
},
{
"name": "Check Runetime Error",
"exec": "./flash_validation_error.py"
},
{
"name": "Check Runtime Hello World With Error",
"exec": "./flash_validation_hello_world_error.py"
}
]
}
Expand All @@ -33,4 +25,4 @@
"exec": "bash clean.sh"
}
]
}
}
35 changes: 0 additions & 35 deletions tests/groups/flashValidation/flash_validation_error.py

This file was deleted.

21 changes: 16 additions & 5 deletions tests/groups/flashValidation/flash_validation_hello_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,32 @@
"""

def main():
conn = serial.Serial('/dev/ttyACM0', 115200, timeout=1)
conn.send_break(duration=1)
conn = serial.Serial('/dev/ttyACM0', 115200, timeout=10)

print('**** WAITING FOR SYSTEM TO FULLY INITIALIZE ****\n')

# Wait for the system to boot and initialize completely
# We need to wait for network initialization and OCRE runtime startup
time.sleep(5)

time.sleep(1)
# Clear any existing data in the buffer
conn.reset_input_buffer()

# Send break to get current output
conn.send_break(duration=1)
time.sleep(10)

print('**** READING RESPONSE FROM BREAK ****\n')

response = conn.read(1024).decode(errors='ignore')
# Read response with longer timeout to capture all output
response = conn.read(2048).decode(errors='ignore')
print(response)

print('**** CLOSING CONNECTION ****\n')

conn.close()

if "Hello World!" in response:
if "Hello World from Ocre!" in response:
sys.exit(0)
sys.exit(1)

Expand Down

This file was deleted.