-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Soak Testing for RPI5 Led-Blinker #3954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
moisesmata
wants to merge
112
commits into
nasa:devel
Choose a base branch
from
moisesmata:soak-testing/initial
base: devel
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
112 commits
Select commit
Hold shift + click to select a range
cdf2706
initial soak testing, setup and soak
moisesmata 5d664c7
Merged into one workflow file, need to consolidate RPI jobs into one job
moisesmata ce69629
First version of full soak test, change in workflow structure
moisesmata a66a409
Merge branch 'nasa:devel' into soak-testing/initial
moisesmata 4659664
Initial refactoring into two workflow files
moisesmata 08d380f
Merge branch 'soak-testing/initial' of https://github.com/moisesmata/…
moisesmata 1ca1891
Setup and soak test workflows implemented
moisesmata 0820019
Merge branch 'devel' into soak-testing/initial
moisesmata 6c45689
Update metadata
moisesmata f51b7c7
Merge branch 'soak-testing/initial' of https://github.com/moisesmata/…
moisesmata f1d65a9
Update ext-aarch64-linux-led-blinker-soak-setup.yml
moisesmata 8607c97
Update ext-aarch64-linux-led-blinker-soak-test.yml
moisesmata 687c139
Added if statement to soak setup stop existing service
moisesmata 00cc2c5
fix build artifact path
moisesmata 290c983
fix to build artifacts prep
moisesmata 5033b73
list artifacts debug step
moisesmata b8a7709
list artifacts debug step
moisesmata c16b5b0
remove debug
moisesmata d50beee
Ref and GDS command changes
moisesmata b13bea3
Ref and GDS command changes
moisesmata d132a85
Merge branch 'nasa:devel' into soak-testing/initial
moisesmata 5875403
added fprime-gds as a system service started within setup workflow
moisesmata bef3970
Merge branch 'soak-testing/initial' of https://github.com/moisesmata/…
moisesmata 2641773
Fix formatting, service files
moisesmata 9ecbd85
Print systemctl status upon service fail to start
moisesmata 56876e2
fix system service file format in bash script
moisesmata fb75a7b
Fix gds exec start command in service file
moisesmata 1fb3619
Setup modifications
moisesmata cb7783b
service file modifications
moisesmata 1619813
added framing selection to gds execstart
moisesmata c16581d
formatting fix
moisesmata 1e353ce
longer wait period between both services starting
moisesmata 3cb0765
Fix ip address in execstart
moisesmata fecf63e
added sleep in soak test workflow
moisesmata 4c99c9a
Change tcp/ip arguments for services
moisesmata 3bff2cd
restructure soak setup, remove restart behavior for services
moisesmata 4dbe96a
root permission, when running fprime-gds
moisesmata 21bc713
Take away ip client, for gds execstart
moisesmata 599da48
fixed to make a venv and use most current fprime-gds
moisesmata a9c8e71
add more logging when serivice fails
moisesmata 4b36b76
More systemctl logging, restructure of venv, only in soak setup
moisesmata f5a0e7c
fix pip install syntax
moisesmata 0cde669
Fix artifacts prep
moisesmata a9ef9cd
fix order
moisesmata 02ff19f
fix pip requirements path
moisesmata d66294d
back to how it was, but with venv
moisesmata 72a4e21
requirements.txt path
moisesmata cf23547
fixed arm64 tag for runner
moisesmata db35f98
change install binary path
moisesmata 37824d3
more debugging with ls
moisesmata c9cab94
fix to requirements file overrding build artifacts
moisesmata 68d0177
reorder service startup sequence
moisesmata 438cc21
take off cron scheduling for testing purposes
moisesmata dd573ac
fix syntax
moisesmata 5a5c8d2
enable gui for gds
moisesmata aea7b40
switched to consisten env variables
moisesmata 21cb757
make logging simpler
moisesmata 4e296c1
fixed env variable reference
moisesmata d1b8fe1
don't delete all logs, for debugging
moisesmata f966b03
comment out check service status for testing.
moisesmata c6f650e
updated service names, better service checking structure.
moisesmata 4f873a8
Ensure binary is executable
moisesmata e9e7716
Merge branch 'nasa:devel' into soak-testing/initial
moisesmata 886458b
Merge branch 'nasa:devel' into soak-testing/initial
moisesmata c49e808
Soak Test Workflows for SoakTestDeployment
moisesmata a470b32
Change to fetch moisesmata/main , not devel
moisesmata b62d526
Update soak test to do monitoring of events and telemetry from ComLogs
moisesmata b531ac7
Fix format
moisesmata ac19609
Merge branch 'nasa:devel' into soak-testing/initial
moisesmata 98cff11
Merge branch 'nasa:devel' into soak-testing/initial
moisesmata d0161ff
placeholder soak test
moisesmata dbcd549
Merge branch 'nasa:devel' into soak-testing/initial
moisesmata a031be1
Merge branch 'nasa:devel' into soak-testing/initial
moisesmata 71f2b8e
Update metadata
moisesmata 5054533
Remove exact copy soak test
moisesmata 3931438
Merge branch 'devel' into soak-testing/initial
moisesmata bd49c84
Switch to ledblinker-soak
moisesmata 96619de
Update metadata
moisesmata 6017b8d
Merge branch 'nasa:devel' into soak-testing/initial
moisesmata 8e06b8d
fix soak monitor path
moisesmata 47baf39
Monitoring Update
moisesmata 671915e
Fix Dual Logging Systems
moisesmata e3f9904
Modify soak-test
moisesmata 02d5f28
Used the correct moisesmata/fprime-workshop-led-blinker branch
moisesmata b42aac1
Soak test refactor
moisesmata 14b2b00
Update soak monitor
moisesmata 9b3f6eb
Fix exists check
moisesmata fb65188
Remove Json monitor
moisesmata 4b78347
Update DataHandlers
moisesmata 7f2aea8
Fix indentation
moisesmata b536d84
check fix
moisesmata 8c34400
Fix logs/comlogs
moisesmata 5cfedc1
streamline test yaml
moisesmata 5fb5f22
Remove job dependency
moisesmata 71e2fe2
kill process and add dependency
moisesmata e3504f1
fix
moisesmata 2de94e6
update Soak
moisesmata 810527f
add framing selection
moisesmata 25261f9
Correct Framing in GDS
moisesmata d3be20a
Temporary Debug
moisesmata eb57d52
More temp debug
moisesmata 1f28660
Use Comlog config
moisesmata 1099c69
Fix soak monitor
moisesmata eafca06
Fix service files
moisesmata eec4c03
Made it generalizable to different service user names
moisesmata b0f056c
Enable Schedule
moisesmata 72f2830
Remove scheduling
moisesmata 6e6e916
Remove Schedule
moisesmata ce8a6dd
Interim fix for channel collector
moisesmata cf8608d
:wMerge branch 'soak-testing/initial' of https://github.com/moisesmat…
moisesmata 1a03c9a
Update alert system system, add support for channel analysis
moisesmata 5d4cde6
Simplification to Logging
moisesmata File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
207 changes: 207 additions & 0 deletions
207
.github/workflows/ext-aarch64-linux-led-blinker-soak-setup.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,207 @@ | ||
# Cross-compile https://github.com/moisesmata/fprime-workshop-led-blinker (add/comLogger-instance branch) as system service on AArch64 Linux | ||
# Builds on release publication, stops old service, starts new service | ||
# | ||
# This workflow sets up two types of logging: | ||
# 1. GDS logs: Text-based logs from fprime-gds → /opt/ledblinker-soak/logs/ | ||
# 2. ComLogger logs: Binary .com files from ComLogger component → /opt/ledblinker-soak/ComLoggerFiles/ | ||
# | ||
name: "Soak Test Setup AArch64 Linux: External Repo LedBlinker" | ||
|
||
on: | ||
release: | ||
types: [published] | ||
workflow_dispatch: | ||
inputs: | ||
service_user: | ||
description: "Linux user to run services as (default: fprime)" | ||
required: false | ||
default: fprime | ||
|
||
# New releases cancel running deployments | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
AARCH64_TOOLCHAIN_DIR: /tmp/aarch64-toolchain | ||
AARCH64_TOOLCHAIN_URL: https://developer.arm.com/-/media/Files/downloads/gnu-a/10.2-2020.11/binrel/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu.tar.xz | ||
FSW_SERVICE_NAME: ledblinker-soak-fsw | ||
GDS_SERVICE_NAME: ledblinker-soak-gds | ||
INSTALL_DIR: /opt/ledblinker-soak | ||
SERVICE_USER: ${{ github.event.inputs.service_user || 'fprime' }} | ||
|
||
jobs: | ||
cross-compilation: | ||
name: "Cross Compilation" | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: "Checkout target repository" | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: false | ||
repository: moisesmata/fprime-workshop-led-blinker | ||
ref: add/comLogger-instance | ||
- name: "Overlay current F´ revision" | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
path: ./fprime | ||
fetch-depth: 0 | ||
- uses: ./fprime/.github/actions/setup | ||
with: | ||
location: ./fprime | ||
- name: "Download and Setup AArch64 Linux Toolchain" | ||
run: | | ||
mkdir -p ${AARCH64_TOOLCHAIN_DIR} | ||
wget -q ${AARCH64_TOOLCHAIN_URL} | ||
tar -xf $(basename ${AARCH64_TOOLCHAIN_URL}) -C ${AARCH64_TOOLCHAIN_DIR} --strip-components 1 | ||
echo "${AARCH64_TOOLCHAIN_DIR}/bin" >> $GITHUB_PATH | ||
- name: "Generate AArch64 Linux Build Cache" | ||
run: | | ||
fprime-util generate aarch64-linux | ||
- name: "Build AArch64 Linux" | ||
run: | | ||
fprime-util build aarch64-linux | ||
- name: "Prepare artifacts" | ||
run: | | ||
mkdir -p aarch64-linux-artifacts-soak | ||
cp -r ./build-artifacts aarch64-linux-artifacts-soak | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could make |
||
cp -r Components/Led/test/int aarch64-linux-artifacts-soak | ||
# Copy monitoring script from F' repo workflows | ||
if [ -f "./fprime/.github/workflows/soak_monitor.py" ]; then | ||
cp ./fprime/.github/workflows/soak_monitor.py aarch64-linux-artifacts-soak/soak_monitor.py | ||
fi | ||
- name: 'Archive Build Artifacts' | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: aarch64-linux-artifacts-soak | ||
path: aarch64-linux-artifacts-soak | ||
retention-days: 5 | ||
|
||
deploy-service: | ||
name: "Deploy as System Service" | ||
runs-on: [self-hosted, ARM64] | ||
needs: cross-compilation | ||
steps: | ||
- name: "Stop existing services if running" | ||
run: | | ||
echo "Stopping existing services if they exist..." | ||
# Stop and disable services, || true to avoid errors | ||
|
||
sudo systemctl stop ${FSW_SERVICE_NAME} || true | ||
sudo systemctl disable ${FSW_SERVICE_NAME} || true | ||
sudo systemctl stop ${GDS_SERVICE_NAME} || true | ||
sudo systemctl disable ${GDS_SERVICE_NAME} || true | ||
|
||
- name: "Checkout F´ Repository" | ||
uses: actions/checkout@v4 | ||
with: | ||
sparse-checkout: 'requirements.txt' | ||
sparse-checkout-cone-mode: false | ||
|
||
- name: "Setup F´ Python Environment" | ||
run: | | ||
echo "Setting up F´ Python virtual environment..." | ||
sudo mkdir -p ${INSTALL_DIR}/venv | ||
sudo python3 -m venv ${INSTALL_DIR}/venv | ||
|
||
# Activate virtual environment and install F´ requirements | ||
sudo ${INSTALL_DIR}/venv/bin/pip install --upgrade pip | ||
sudo ${INSTALL_DIR}/venv/bin/pip install -r requirements.txt | ||
|
||
# Install additional packages needed for soak testing | ||
sudo ${INSTALL_DIR}/venv/bin/pip install psutil | ||
|
||
- name: "Artifacts Download" | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: aarch64-linux-artifacts-soak | ||
|
||
- name: "Install new binary" | ||
run: | | ||
echo "Installing new binary to ${INSTALL_DIR}..." | ||
sudo mkdir -p ${INSTALL_DIR}/bin | ||
sudo mkdir -p ${INSTALL_DIR}/dict | ||
sudo mkdir -p ${INSTALL_DIR}/test | ||
sudo mkdir -p ${INSTALL_DIR}/logs | ||
sudo mkdir -p ${INSTALL_DIR}/ComLoggerFiles | ||
sudo mkdir -p ${INSTALL_DIR}/monitoring | ||
|
||
# Copy binary, dict, and test files | ||
sudo cp ./build-artifacts/aarch64-linux/LedBlinker/bin/LedBlinker ${INSTALL_DIR}/bin/ | ||
sudo cp -r ./build-artifacts/aarch64-linux/LedBlinker/dict/* ${INSTALL_DIR}/dict/ | ||
sudo cp -r ./int/* ${INSTALL_DIR}/test/ | ||
|
||
# Copy monitoring script if it exists | ||
if [ -f "./soak_monitor.py" ]; then | ||
sudo cp ./soak_monitor.py ${INSTALL_DIR}/monitoring/ | ||
sudo chmod +x ${INSTALL_DIR}/monitoring/soak_monitor.py | ||
fi | ||
|
||
# Clean ComLogger files directory to start fresh monitoring | ||
echo "Cleaning ComLogger files directory for fresh monitoring session..." | ||
sudo rm -rf ${INSTALL_DIR}/ComLoggerFiles/* | ||
|
||
# Make binary executable | ||
sudo chmod +x ${INSTALL_DIR}/bin/LedBlinker | ||
|
||
# Set ownership, so service can access files | ||
sudo chown -R ${SERVICE_USER}:${SERVICE_USER} ${INSTALL_DIR} | ||
|
||
- name: "Create systemd service file" | ||
run: | | ||
echo "Creating systemd service file for LedBlinker..." | ||
sudo tee /etc/systemd/system/${FSW_SERVICE_NAME}.service > /dev/null << EOF | ||
[Unit] | ||
Description=F' LED Blinker Application, system service meant for soak testing | ||
After=network.target | ||
|
||
[Service] | ||
Type=simple | ||
User=${SERVICE_USER} | ||
WorkingDirectory=${INSTALL_DIR} | ||
ExecStart=${INSTALL_DIR}/bin/LedBlinker -a 0.0.0.0 -p 50000 | ||
StandardOutput=journal | ||
StandardError=journal | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
EOF | ||
|
||
echo "Creating systemd service file for GDS..." | ||
sudo tee /etc/systemd/system/${GDS_SERVICE_NAME}.service > /dev/null << EOF | ||
[Unit] | ||
Description=F' GDS for LED Blinker soak testing | ||
After=network.target ${FSW_SERVICE_NAME}.service | ||
|
||
[Service] | ||
Type=simple | ||
User=${SERVICE_USER} | ||
WorkingDirectory=${INSTALL_DIR} | ||
ExecStart=${INSTALL_DIR}/venv/bin/fprime-gds --ip-client --ip-address 127.0.0.1 --ip-port 50000 -d ${INSTALL_DIR} -n --logs ${INSTALL_DIR}/logs --framing-selection fprime | ||
StandardOutput=journal | ||
StandardError=journal | ||
|
||
[Install] | ||
WantedBy=multi-user.target | ||
EOF | ||
|
||
- name: "Start and enable services" | ||
run: | | ||
echo "Starting and enabling services..." | ||
sudo systemctl daemon-reload | ||
|
||
# start and enable gds service | ||
sudo systemctl enable ${GDS_SERVICE_NAME} | ||
sudo systemctl start ${GDS_SERVICE_NAME} | ||
|
||
# start and enable binary | ||
sudo systemctl start ${FSW_SERVICE_NAME} | ||
sudo systemctl enable ${FSW_SERVICE_NAME} | ||
|
||
echo "Waiting for services to stabilize..." | ||
sleep 5 # Wait for services to stabilize | ||
|
||
echo "Checking final service status..." | ||
sudo systemctl status ${FSW_SERVICE_NAME} --no-pager -l -n 50 | ||
sudo systemctl status ${GDS_SERVICE_NAME} --no-pager -l -n 150 |
91 changes: 91 additions & 0 deletions
91
.github/workflows/ext-aarch64-linux-led-blinker-soak-test.yml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# Scheduled testing of LED blinker system service every 30 minutes | ||
# Analyzes ComLogger logs and runs integration tests | ||
# | ||
# This workflow analyzes ComLogger logs: Binary .com files from ComLogger component | ||
# and runs integration tests | ||
# | ||
# Note: The "Artifact not found: ledblinker-monitoring-state" error is expected on the first run | ||
# and is handled with continue-on-error: true | ||
# | ||
name: "Soak Test AArch64 Linux: External Repo LedBlinker" | ||
|
||
on: | ||
#schedule: | ||
# Run every 30 minutes | ||
#- cron: '*/15 * * * *' | ||
# Allow manual triggering for testing | ||
workflow_dispatch: | ||
|
||
env: | ||
FSW_SERVICE_NAME: ledblinker-soak-fsw | ||
GDS_SERVICE_NAME: ledblinker-soak-gds | ||
INSTALL_DIR: /opt/ledblinker-soak | ||
|
||
jobs: | ||
soak-monitoring: | ||
name: "Soak Log Analysis" | ||
runs-on: [self-hosted, ARM64] | ||
steps: | ||
|
||
- name: "Run soak monitoring" | ||
run: | | ||
# Use the virtual environment created during setup | ||
. ${INSTALL_DIR}/venv/bin/activate | ||
|
||
TEST_TIMESTAMP=$(date +%Y%m%d_%H%M%S) | ||
|
||
echo "=== Soak monitoring started at $(date) (${TEST_TIMESTAMP}) ===" | ||
|
||
# Run the soak monitor | ||
cd ${INSTALL_DIR}/monitoring | ||
python3 soak_monitor.py \ | ||
--dictionary ${INSTALL_DIR}/dict/LedBlinkerTopologyDictionary.json \ | ||
--com-logs ${INSTALL_DIR}/ComLoggerFiles \ | ||
|
||
|
||
|
||
integration-test: | ||
name: "Integration Test" | ||
runs-on: [self-hosted, ARM64] | ||
needs: soak-monitoring | ||
steps: | ||
|
||
- name: "Check service status" | ||
run: | | ||
echo "=== CHECKING SERVICES FOR INTEGRATION TEST ===" | ||
echo "Checking if ${FSW_SERVICE_NAME} service is running..." | ||
if sudo systemctl is-active --quiet ${FSW_SERVICE_NAME}; then | ||
echo "✅ Service ${FSW_SERVICE_NAME} is running" | ||
else | ||
echo "❌ Service ${FSW_SERVICE_NAME} is not running" | ||
sudo systemctl status ${FSW_SERVICE_NAME} --no-pager -l | ||
echo "Recent FSW service logs:" | ||
sudo journalctl -u ${FSW_SERVICE_NAME} --no-pager -n 20 | ||
exit 1 | ||
fi | ||
|
||
echo "Checking if ${GDS_SERVICE_NAME} service is running..." | ||
if sudo systemctl is-active --quiet ${GDS_SERVICE_NAME}; then | ||
echo "✅ Service ${GDS_SERVICE_NAME} is running" | ||
else | ||
echo "❌ Service ${GDS_SERVICE_NAME} is not running" | ||
sudo systemctl status ${GDS_SERVICE_NAME} --no-pager -l | ||
echo "Recent GDS service logs:" | ||
sudo journalctl -u ${GDS_SERVICE_NAME} --no-pager -n 20 | ||
exit 1 | ||
fi | ||
|
||
- name: "Run integration tests" | ||
run: | | ||
# Use the virtual environment created during setup | ||
. ${INSTALL_DIR}/venv/bin/activate | ||
|
||
TEST_TIMESTAMP=$(date +%Y%m%d_%H%M%S) | ||
|
||
echo "=== Integration test started at $(date) (${TEST_TIMESTAMP}) ===" | ||
|
||
# Run the integration test | ||
echo "Running integration tests..." | ||
pytest --dictionary ${INSTALL_DIR}/dict/LedBlinkerTopologyDictionary.json ${INSTALL_DIR}/test/led_integration_tests.py | ||
|
||
echo "=== Integration test completed at $(date) (${TEST_TIMESTAMP}) ===" |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May want to have a group per release number (again via
github.event
)