Skip to content

Commit 3e8e4e4

Browse files
author
Teppo Järvelin
committed
Cellular: Fixing to skip greentea test if sim pin is not configured.
1 parent bb23b1c commit 3e8e4e4

File tree

1 file changed

+11
-7
lines changed
  • features/cellular/TESTS/socket/udp

1 file changed

+11
-7
lines changed

features/cellular/TESTS/socket/udp/main.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
#error [NOT_SUPPORTED] CELLULAR_DEVICE must be defined
2727
#endif
2828

29+
#ifndef MBED_CONF_APP_CELLULAR_SIM_PIN
30+
#error [NOT_SUPPORTED] SIM pin code is needed. Skipping this build.
31+
#endif
32+
2933
#include "greentea-client/test_env.h"
3034
#include "unity.h"
3135
#include "utest.h"
@@ -55,13 +59,13 @@ static SocketAddress echo_server_addr;
5559

5660
class EchoSocket : public UDPSocket {
5761
public:
58-
EchoSocket(int size) : UDPSocket(), _async_flag(0), _data(0), _size(size) {
59-
}
60-
virtual ~EchoSocket() {
61-
delete _data;
62-
}
63-
void set_async(int async) {
64-
_async_flag = async;
62+
EchoSocket(int size) : UDPSocket(), _async_flag(0), _data(0), _size(size) {
63+
}
64+
virtual ~EchoSocket() {
65+
delete _data;
66+
}
67+
void set_async(int async) {
68+
_async_flag = async;
6569
if (_async_flag) {
6670
set_blocking(false);
6771
sigio(callback(this, &EchoSocket::async_callback));

0 commit comments

Comments
 (0)