1#!/bin/bash
2
3#This test requires the results to be inspected manually
4
5SIMULATION_ID="silly"
6VERBOSITY_LEVEL=9
7PROCESS_IDS=""; EXIT_CODE=0
8
9function Execute(){
10  if [ ! -f $1 ]; then
11    echo -e "  \e[91m`pwd`/`basename $1` cannot be found (did you forget to\
12 compile it?)\e[39m"
13    exit 1
14  fi
15  timeout 5 $@ & PROCESS_IDS="$PROCESS_IDS $!"
16}
17
18BSIM_OUT_PATH="${BSIM_OUT_PATH:-../../../}"
19cd ${BSIM_OUT_PATH}/bin
20
21Execute ./bs_device_2G4_playback \
22  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=0 -inputf=../components/ext_2G4_channel_multiatt/test/0
23
24Execute ./bs_device_2G4_playback \
25  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=1 -inputf=../components/ext_2G4_channel_multiatt/test/1
26
27Execute ./bs_device_2G4_playback \
28  -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -d=2 -inputf=../components/ext_2G4_channel_multiatt/test/2
29
30Execute ./bs_2G4_phy_v1 -v=${VERBOSITY_LEVEL} -s=${SIMULATION_ID} -channel=multiatt \
31  -argschannel -at=30 -file=../components/ext_2G4_channel_multiatt/test/silly.matrix -atextra=10  -argsmain \
32  -D=3 -sim_length=20e6 $@
33
34for PROCESS_ID in $PROCESS_IDS; do
35  wait $PROCESS_ID || let "EXIT_CODE=$?"
36done
37exit $EXIT_CODE #the last exit code != 0
38