diff --git a/runtime b/runtime index 0b878cba..cfa06f90 100755 --- a/runtime +++ b/runtime @@ -45,7 +45,6 @@ case $1 in format) shift 1 scripts/format.sh $@ -# scripts/run_clang_format.py $@ ;; flash) @@ -66,7 +65,6 @@ case $1 in printf "commands:\n" printf "\tbuild\t\tRuns 'make' on files needed to run Runtime.\n" - printf "\t\t\tOptional: pass in 'make' arguments. (Ex: runtime make shm_wrapper)\n" printf "\tclean\t\tRuns 'make clean' for Runtime and removes Runtime files in '/tmp/'\n" @@ -75,11 +73,11 @@ case $1 in printf "\tstop\t\tStops Runtime.\n" printf "\ttest\t\tRuns all Runtime tests.\n" - printf "\t\t\tOptional: Pass in a specific test case. (Ex: runtime test integration/tc_71_14)\n" + printf "\t\t\tOptional: Pass in a specific test case. (Ex: runtime test tc_71_2)\n" printf "\tformat\t\tUses Clang to format the repo.\n" - printf "\t\t\tUse 'runtime format -ir .' to format the repo and save the changes.\n" - printf "\t\t\tRun without args to see full list of options.\n" + printf "\t\t\tUse 'runtime format fix' to format the repo and save the changes.\n" + printf "\t\tUse 'runtime format check' to check if the code in the repo conforms to format standards.\n" printf "\tflash\t\tFlashes a plugged in Arduino with Lowcar code.\n" printf "\t\t\tEx: 'runtime flash DummyDevice'\n" diff --git a/scripts/install_raspi.sh b/scripts/install_raspi.sh deleted file mode 100755 index a426463e..00000000 --- a/scripts/install_raspi.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/bash - -# This script/document automates *most* of the process for installing Runtime on a blank Raspberry Pi -# that has only the non-GUI Raspbian image copied onto its SD card. To copy that image, do the following: -# - https://www.raspberrypi.org/software/operating-systems/ Download the "Raspberry Pi OS Lite" -# - Unzip the zip on your computer -# - On a Mac, follow these instructions: https://www.raspberrypi.org/documentation/installation/installing-images/mac.md -# - Before ejecting, go to: -# --> cd /Volumes/boot -# --> touch ssh -# --> cd .. -# - Then eject. Those steps enable ssh'ing into the rapsberry pi - -# ssh into Raspberry Pi - -# Change date -# --> sudo date -s "20 MAR 2021 14:23:50" <-- (for example) -# Change timezone -# --> sudo raspi-config; select Localisation Options -# Connect to WiFi -# --> sudo raspi-config; select Network Options - -# update apt-get, install git, clone runtime onto Raspi -sudo apt-get update -sudo apt-get -y install git -git clone https://github.com/pioneers/runtime.git - -# install Python devtools and Cython -sudo apt-get -y install python3-dev -sudo apt-get -y install python3-pip -python3 -m pip install Cython - -# install protobuf -wget https://github.com/protocolbuffers/protobuf/releases/download/v3.15.1/protobuf-cpp-3.15.1.tar.gz -tar -xzf protobuf-cpp-3.15.1.tar.gz -cd protobuf-3.15.1 && ./configure && make && sudo make install && sudo ldconfig - -# install protobuf-c -wget https://github.com/protobuf-c/protobuf-c/releases/download/v1.3.3/protobuf-c-1.3.3.tar.gz -tar -xzf protobuf-c-1.3.3.tar.gz -cd protobuf-c-1.3.3 && ./configure && make && sudo make install && sudo ldconfig - -# install other Runtime dependencies with apt-get -sudo apt-get -y install libncurses5-dev libncursesw5-dev -sudo apt-get -y install clang-format - -# build runtime -cd runtime && ./runtime build - -# enable systemd services by doing the commands in runtime/systemd README -# (you can't put these commands in scripts) -# --> cd runtime/systemd -# --> sudo systemctl disable *.service -# --> sudo ln -s $HOME/runtime/systemd/*.service /etc/systemd/system/ -# --> sudo systemctl enable *.service - -# reboot machine: -# --> sudo reboot now \ No newline at end of file diff --git a/scripts/provision_raspi.sh b/scripts/provision_raspi.sh deleted file mode 100755 index 0413043a..00000000 --- a/scripts/provision_raspi.sh +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/bash - -# This script/document automates *most* of the process for copying the SD card of a Raspberry Pi with a -# working Runtime on it to other SD cards for more Raspberry Pi's. - -# First step (only need to do this once): copy working SD card off of Raspberry Pi onto machine -# - On a mac, follow these instructions: https://www.raspberrypi.org/documentation/installation/installing-images/mac.md -# - IMPORTANT! Since you're copying FROM the Raspberry Pi TO your computer, for the dd command, switch the if=/ and of=/, i.e. -# --> sudo dd bs=1m if=/dev/rdiskN of=path_of_your_image.img; sync . Name the image whatever you want - -# Repeat these steps for each Raspberry Pi to be provisioned: -sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskN; sync # where path_of_your_image is from above and N is the number of the SD card in diskutil list - -# Insert SD card into Raspberry Pi, plug in and ssh in. It will have the same hostname as the original Raspberry Pi - -# Change date -# --> sudo date -s "20 MAR 2021 14:23:50" <-- (for example) -# Change timezone -# --> sudo raspi-config; select Localisation Options -# Ensure connection to WiFi (e.g. do ping google.com) - -sudo rm -rf runtime -git clone https://github.com/pioneers/runtime.git -cd runtime && ./runtime build - -# enable systemd services by doing the commands in runtime/systemd README -# (you can't put these commands in scripts) -# --> cd runtime/systemd -# --> sudo systemctl disable *.service -# --> sudo ln -s $HOME/runtime/systemd/*.service /etc/systemd/system/ -# --> sudo systemctl enable *.service - -# if using ngrok, change the authtoken in runtime/systemd/ngrok.yml - -# TODO: Put something here to change the hostname to the argument to the script -# --> sudo hostname - -# reboot machine: -# --> sudo reboot now \ No newline at end of file diff --git a/scripts/test.sh b/scripts/test.sh index 71af787a..4045c692 100755 --- a/scripts/test.sh +++ b/scripts/test.sh @@ -10,7 +10,7 @@ function clean_up { function sigint_handler { # if logger/logger.config.orig exists, we need to restore it if [[ -f ../logger/logger.config.orig ]]; then - clean_up + clean_up fi exit 1 } @@ -38,12 +38,19 @@ function run_tests { if [[ $? != 0 ]]; then failing_tests="$failing_tests $test" # add this test to list of failing tests failed=1 - continue + continue fi # run test printf "Running $test...\n" - ./bin/$test + + if [[ -f bin/integration/$test ]]; then + ./bin/integration/$test + elif [[ -f bin/performance/$test ]]; then + ./bin/performance/$test + else + ./bin/$test + fi # if that test failed, set failed to 1 if [[ $? != 0 ]]; then