Updated otto script to allow more granular testing and more obvious error finding.
This commit is contained in:
parent
c17c3d5c9a
commit
e1c2aa85f3
1 changed files with 31 additions and 4 deletions
33
otto.sh
33
otto.sh
|
|
@ -12,6 +12,10 @@ TEST_MODULE_DIR="${TEMPLATE_FILES}/test_module"
|
||||||
CHIP="ch32v003"
|
CHIP="ch32v003"
|
||||||
PROJECT_NAME="WCH_Template"
|
PROJECT_NAME="WCH_Template"
|
||||||
|
|
||||||
|
# These global variables are used when accessing my VM's
|
||||||
|
USER="ronin"
|
||||||
|
IP="10.138.198.114"
|
||||||
|
|
||||||
generate_tags_file () {
|
generate_tags_file () {
|
||||||
echo "generate_tags_file()"
|
echo "generate_tags_file()"
|
||||||
# Saving current directory
|
# Saving current directory
|
||||||
|
|
@ -307,15 +311,38 @@ flash_microcontroller () {
|
||||||
wlink --chip=${CHIP} flash ./src/main.elf
|
wlink --chip=${CHIP} flash ./src/main.elf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
flash_vm () {
|
||||||
|
build_hex
|
||||||
|
#sftp ${USER}@${IP}:/home/ronin <<< $'put ./build/src/WCH_Template.elf'
|
||||||
|
#ssh ${USER}@${IP}:/home/ronin '/home/ronin/.cargo/bin/wlink flash --speed low /home/ronin/WCH_Template.elf'
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
run_c_tests () {
|
run_c_tests () {
|
||||||
generate_tags_file
|
generate_tags_file
|
||||||
format_source_code
|
format_source_code
|
||||||
clear_cmake_cache
|
clear_cmake_cache
|
||||||
cmake -DUNIT_TESTING=ON -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE} ../
|
cmake -DUNIT_TESTING=ON -DCMAKE_VERBOSE_MAKEFILE=${CMAKE_VERBOSE} ../
|
||||||
make AllTests
|
|
||||||
make Mock_Tests
|
if make AllTests; then
|
||||||
|
echo "Running: AllTests -c -v"
|
||||||
./tests/AllTests -v -c
|
./tests/AllTests -v -c
|
||||||
./tests/Mock_Tests -v -c
|
else
|
||||||
|
echo "Failed to build AllTests."
|
||||||
|
echo "Press anykey to exit:"
|
||||||
|
read input
|
||||||
|
fi
|
||||||
|
|
||||||
|
read -p "Press anykey to continue:" input
|
||||||
|
|
||||||
|
if make Mock_Tests; then
|
||||||
|
tests/Mock_Tests -v -c
|
||||||
|
else
|
||||||
|
echo "Failed to build Mock_Tests."
|
||||||
|
echo "Press anykey to exit:"
|
||||||
|
read input
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
print_menu () {
|
print_menu () {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue