test helper

This commit is contained in:
edo-neo 2025-02-05 11:39:50 +01:00
parent 99a2e07195
commit 055a0f5e4e
2 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,26 @@
#!/bin/bash
# Define the temporary file name for the .desktop file
SCRIPT="/tmp/shortcut-$(date +%s).desktop"
# Create the .desktop file with the required content
echo "[Desktop Entry]" >> $SCRIPT
echo "Version=1.0" >> $SCRIPT
echo "Name=AVVIO PROGRAMMA COLLAUDO" >> $SCRIPT
echo "Comment=Shortcut to AVVIO PROGRAMMA COLLAUDO" >> $SCRIPT
echo "Exec=$HOME/PycharmProjects/st-ten-1/runmetest.sh" >> $SCRIPT
echo "Icon=$HOME/PycharmProjects/st-ten-1/src/ui/imgs/neo_red.ico" >> $SCRIPT
echo "Terminal=false" >> $SCRIPT
echo "Type=Application" >> $SCRIPT
echo "Categories=Utility;" >> $SCRIPT
# Prompt for sudo password and copy the .desktop file to the user's Desktop
sudo cp $SCRIPT "$HOME/Desktop/AVVIO PROGRAMMA TEST.desktop"
# Make the .desktop file executable
sudo chmod +x "$HOME/Desktop/AVVIO PROGRAMMA TEST.desktop"
# Remove the temporary .desktop file
rm $SCRIPT
echo "Shortcut created on Desktop"

4
runmetest.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash -e
cd "$(dirname "$0")"
source "./venv/bin/activate" || source "./venv/Scripts/activate" || :
python -O "./src/main.py" --no-edgetpu --no-tflite --no-autotest --sim-archiver --sim-printer --system-id=test-linux --no-autotest --no-lock --sim-io --dev-portal --auto-login-admin $*