1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
#!/bin/bash
OBUILD=$(pwd)/../../dist/build/obuild/obuild
if [ ! -x ${OBUILD} ]; then
echo "obuild has not been built"
exit 1
fi
TESTS="simple autogenerated with-c dep-uri autopack autopack2 complex complex2"
if [ $# -gt 0 ]; then
TESTS="$1"
DEBUG="--debug+"
else
DEBUG=""
fi
RED="\033[1;31m"
GREEN="\033[1;32m"
BLUE="\033[1;34m"
WHITE="\033[0m"
for t in ${TESTS}
do
cd ${t}
echo -e "$BLUE ==== test ${t} ====${WHITE}"
${OBUILD} clean
${OBUILD} --strict configure --enable-library-bytecode --enable-executable-bytecode --enable-library-debugging --enable-library-profiling --enable-executable-profiling --enable-executable-debugging --annot
if [ $? -ne 0 ]; then
echo -e "${RED}ERROR${WHITE}: configure failed"
cd ..
continue
fi
${OBUILD} ${DEBUG} build
if [ $? -ne 0 ]; then
echo -e "${RED}ERROR${WHITE}: build failed"
cd ..
continue
fi
echo -e "${GREEN}SUCCESS${WHITE}: $t passed"
cd ..
done
for t in ${TESTS}
do
cd ${t}
${OBUILD} clean
cd ..
done
|