Harald Welte | 105c1dc | 2018-06-29 21:35:28 +0200 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
Harald Welte | cb6e205 | 2018-06-29 22:16:35 +0200 | [diff] [blame] | 3 | TOPDIR=`pwd` |
| 4 | |
| 5 | if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then |
| 6 | echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" |
| 7 | exit 2 |
| 8 | fi |
| 9 | |
Harald Welte | 105c1dc | 2018-06-29 21:35:28 +0200 | [diff] [blame] | 10 | set -e |
| 11 | |
Harald Welte | cb6e205 | 2018-06-29 22:16:35 +0200 | [diff] [blame] | 12 | base="$PWD" |
| 13 | deps="$base/deps" |
| 14 | inst="$deps/install" |
| 15 | export deps inst |
| 16 | |
| 17 | osmo-clean-workspace.sh |
| 18 | |
| 19 | mkdir "$deps" || true |
| 20 | |
| 21 | osmo-build-dep.sh libosmocore "" '--disable-doxygen --enable-gnutls' |
| 22 | |
| 23 | export PKG_CONFIG_PATH="$inst/lib/pkgconfig:$PKG_CONFIG_PATH" |
| 24 | export LD_LIBRARY_PATH="$inst/lib" |
| 25 | |
Harald Welte | 105c1dc | 2018-06-29 21:35:28 +0200 | [diff] [blame] | 26 | BUILDS="" |
| 27 | BUILDS+="simtrace/dfu simtrace/cardem " # simtrace/trace simtrace/triple_play |
| 28 | BUILDS+="qmod/dfu qmod/cardem " |
| 29 | BUILDS+="owhw/dfu owhw/cardem " |
| 30 | |
Harald Welte | cb6e205 | 2018-06-29 22:16:35 +0200 | [diff] [blame] | 31 | cd $TOPDIR/firmware |
Harald Welte | 105c1dc | 2018-06-29 21:35:28 +0200 | [diff] [blame] | 32 | for build in $BUILDS; do |
| 33 | board=`echo $build | cut -d "/" -f 1` |
| 34 | app=`echo $build | cut -d "/" -f 2` |
| 35 | echo |
| 36 | echo "=============== $board / $app START ==============" |
| 37 | make BOARD="$board" APP="$app" |
Harald Welte | cb6e205 | 2018-06-29 22:16:35 +0200 | [diff] [blame] | 38 | make BOARD="$board" APP="$app" clean |
Harald Welte | 105c1dc | 2018-06-29 21:35:28 +0200 | [diff] [blame] | 39 | echo "=============== $board / $app RES:$? ==============" |
| 40 | done |
Harald Welte | cb6e205 | 2018-06-29 22:16:35 +0200 | [diff] [blame] | 41 | |
| 42 | echo |
| 43 | echo "=============== FIRMWARE TESTS ===========" |
| 44 | cd $TOPDIR/firmware/test |
| 45 | make clean |
| 46 | make |
| 47 | ./card_emu_test |
| 48 | make clean |
| 49 | |
| 50 | echo |
| 51 | echo "=============== HOST START ==============" |
| 52 | cd $TOPDIR/host |
| 53 | make clean |
| 54 | make |
| 55 | make clean |
| 56 | |
| 57 | osmo-clean-workspace.sh |