test/run on host, output to null device (#299)

* test/run on host to null device

* compilation fix
This commit is contained in:
david gauchard authored and GitHub committed 2020-08-30 15:07:11 -07:00
1 parent 96d036087b
commit 1c51669729
3 files changed
+159 -1

No files matched your search

+50
View File
@@ -0,0 +1,50 @@
#!/bin/bash
ino=${PWD##*/}
if [ ! -d "${ESP8266ARDUINO}/tests/host" ]; then
echo "\${ESP8266ARDUINO} should point to ESP8266 Arduino core directory"
exit 1
fi
THISLIB=$(pwd)/../..
MAD=$(ls ${THISLIB}/src/libmad/*.c)
cd ${ESP8266ARDUINO}/tests/host
if [ "$1" = "clean" ]; then
make clean
cd ${THISLIB}
rm -f src/*.o src/libmad/*.o
exit 0
fi
if [ "$1" = "-h" ]; then
echo "usage:"
echo " $0"
echo " $0 clean"
echo " FORCE32=0 $0 (run with valgrind)"
echo " FORCE32=1 $0 (run in 32 bits)"
echo "variable ESP8266ARDUINO must point to esp8266 Arduino core directory"
exit 0
fi
[ -z "${FORCE32}" ] && FORCE32=0
if [ "${FORCE32}" = 0 ]; then
run=valgrind
else
run=
fi
eval make FORCE32=${FORCE32} V=1 -j \
USERCSOURCES=\"${MAD}\" \
USERCXXSOURCES=\"${THISLIB}/src/AudioFileSourceBuffer.cpp ${THISLIB}/src/AudioLogger.cpp ${THISLIB}/src/AudioGeneratorMP3.cpp ${THISLIB}/src/AudioFileSourceICYStream.cpp ${THISLIB}/src/AudioFileSourceHTTPStream.cpp\" \
USERCFLAGS=\"-I${THISLIB}/src/\" \
${THISLIB}/examples/${ino}/${ino}
set -x
$run ./bin/${ino}/${ino} "$@"
stty sane