mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2023-10-10 13:36:59 +02:00
d679affeb4
* commit debug code to save it due to merge * migrate first devices to new device registry and configure on runtime * fadecandy and rs232 resets device if config is set * try to hunt crash on osx * test commit if this works with osx * refactor spi devices * cleanup * refactor leddevices file, tinkerforge and ws2812b * refactor raw usb devices * refactor udp devices * - add tpm2net driver - remove old udp driver from build (files left in place for reference for new udp driver) - json serverinfo shows available leddevices * finish rework part 2 of leddevices * add schemas for leddevices. currently only compiled in, but not usedx
54 lines
858 B
Bash
54 lines
858 B
Bash
#!/bin/bash
|
|
|
|
STATS_FAILED=0
|
|
STATS_SUCCESS=0
|
|
STATS_TOTAL=0
|
|
|
|
|
|
# exec_test "test name" test_exec --with --args
|
|
function exec_test()
|
|
{
|
|
local test_name="$1"
|
|
shift
|
|
(( STATS_TOTAL++ ))
|
|
echo "execute test: '$test_name'"
|
|
if $@
|
|
then
|
|
echo -e " ... success"
|
|
(( STATS_SUCCESS++ ))
|
|
return 0
|
|
else
|
|
echo -e " ... failed"
|
|
(( STATS_FAILED++ ))
|
|
return 1
|
|
fi
|
|
echo
|
|
}
|
|
|
|
######################################
|
|
## EXEC TESTS
|
|
cd build || exit 1
|
|
|
|
echo
|
|
echo "Hyperion test execution"
|
|
echo
|
|
exec_test "hyperiond is executable and show version" bin/hyperiond --version
|
|
|
|
for cfg in ../config/*json*
|
|
do
|
|
exec_test "test $(basename $cfg)" bin/test_configfile $cfg
|
|
done
|
|
|
|
echo
|
|
echo
|
|
echo "TEST SUMMARY"
|
|
echo "============"
|
|
echo " total: $STATS_TOTAL"
|
|
echo " success: $STATS_SUCCESS"
|
|
echo " failed: $STATS_FAILED"
|
|
|
|
sleep 2
|
|
|
|
[ $STATS_FAILED -gt 0 ] && exit 200
|
|
exit 0
|