File tree Expand file tree Collapse file tree 2 files changed +11
-8
lines changed
Expand file tree Collapse file tree 2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -7,19 +7,20 @@ rcv_eol_2=""
77send_eol=" "
88
99run_test () {
10+ echo " ================================="
1011 echo " Running test with:"
1112 echo " URC handling = $handle_urc "
1213 echo " echo = $echo "
1314 echo " send EOL = $send_eol "
1415 echo " rcv EOL 1 = $rcv_eol_1 "
1516 echo " rcv EOL 2 = $rcv_eol_2 "
1617
17- make -j --silent BOARD=native " HANDLE_URC=$handle_urc " " ECHO_ON=$echo " " SEND_EOL=\" $send_eol \" " " RECV_EOL_1=\" $rcv_eol_1 \" " " RECV_EOL_2=\" $rcv_eol_2 \" " tests-at
18+ make -j --silent BOARD=native " HANDLE_URC=$handle_urc " " ECHO_ON=$echo " " SEND_EOL=\" $send_eol \" " " RECV_EOL_1=\" $rcv_eol_1 \" " " RECV_EOL_2=\" $rcv_eol_2 \" "
1819
1920 # take /dev/ttyS0 as serial interface. It is only required s.t. UART
2021 # initialization succeeds and it gets turned off right away.
2122 set +e
22- if ! ./bin/native/tests_unittests .elf -c /dev/ttyS0 <<< " s\n" ;
23+ if ! ./bin/native/tests_at_unit .elf -c /dev/ttyS0 <<< " s\n" ;
2324 then
2425 echo " ================================================================================"
2526 echo " Test failed! Generating compile-commands.json of the last build configuration..."
@@ -33,11 +34,6 @@ run_test() {
3334# set -x
3435set -e
3536
36- SCRIPT=$( readlink -f " $0 " )
37- BASEDIR=$( dirname " $SCRIPT " ) /../../../unittests
38-
39- cd " $BASEDIR "
40-
4137for urc_i in 0 1; do
4238 handle_urc=$urc_i
4339 for echo_i in 0 1; do
Original file line number Diff line number Diff line change @@ -50,6 +50,13 @@ at_urc_t urc_short = {
5050};
5151#endif
5252
53+ #ifdef BOARD_NATIVE
54+ #define AT_UNIT_UART_DEV 0
55+ #else
56+ /* Most non-native boards have stdout mapped to device 0 */
57+ #define AT_UNIT_UART_DEV 1
58+ #endif
59+
5360static void set_up (void )
5461{
5562 at_dev_init_t at_init_params = {
@@ -58,7 +65,7 @@ static void set_up(void)
5865 .rp_buf_size = sizeof (rp_buf ),
5966 .rx_buf = buf ,
6067 .rx_buf_size = sizeof (buf ),
61- .uart = UART_DEV (1 ),
68+ .uart = UART_DEV (AT_UNIT_UART_DEV ),
6269 };
6370 int res = at_dev_init (& at_dev , & at_init_params );
6471 /* check the UART initialization return value and respond as needed */
You can’t perform that action at this time.
0 commit comments