Files
ESP8266Audio/examples/StreamOnHost/onHost
T
david gauchard 1c51669729 test/run on host, output to null device (#299)
* test/run on host to null device

* compilation fix
2020-08-30 15:07:11 -07:00

51 lines
1.1 KiB
Bash
Executable File

#!/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