Skip to content

Commit c9eb48a

Browse files
committed
Netsocket,lora,cellular,nework test case requires RTOS so MBED_CONF_RTOS_PRESENT guard to all test cases
1 parent e4164be commit c9eb48a

File tree

69 files changed

+170
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+170
-16
lines changed

TESTS/lorawan/loraradio/main.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16+
#if !defined(MBED_CONF_RTOS_PRESENT)
17+
#error [NOT_SUPPORTED] LORADIO test cases requires RTOS to run.
18+
#else
1619

1720
#include "utest.h"
1821
#include "unity.h"
@@ -284,3 +287,4 @@ int main()
284287
}
285288

286289
#endif // (MBED_CONF_APP_LORA_RADIO == SX1272) || (MBED_CONF_APP_LORA_RADIO == SX1276)
290+
#endif // !defined(MBED_CONF_RTOS_PRESENT)

TESTS/netsocket/dns/asynchronous_dns.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
#if defined(MBED_CONF_RTOS_PRESENT)
19+
1820
#include "mbed.h"
1921
#include "greentea-client/test_env.h"
2022
#include "unity.h"
@@ -40,3 +42,4 @@ void ASYNCHRONOUS_DNS()
4042
TEST_ASSERT_EQUAL(0, result_dns_failure);
4143
TEST_ASSERT_EQUAL(0, result_exp_timeout);
4244
}
45+
#endif

TESTS/netsocket/dns/asynchronous_dns_cache.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1718

1819
#include "mbed.h"
1920
#include "greentea-client/test_env.h"
@@ -66,3 +67,4 @@ void ASYNCHRONOUS_DNS_CACHE()
6667
dns_test_hosts[0], data.addr.get_ip_address(), delay_ms);
6768
}
6869
}
70+
#endif

TESTS/netsocket/dns/asynchronous_dns_cancel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1718

1819
#include "mbed.h"
1920
#include "greentea-client/test_env.h"
@@ -86,3 +87,4 @@ void ASYNCHRONOUS_DNS_CANCEL()
8687

8788
ThisThread::sleep_for(5000);
8889
}
90+
#endif // #if defined(MBED_CONF_RTOS_PRESENT)

TESTS/netsocket/dns/asynchronous_dns_external_event_queue.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17+
#if defined(MBED_CONF_RTOS_PRESENT)
1718

1819
#include "mbed.h"
1920
#include "greentea-client/test_env.h"
@@ -76,3 +77,4 @@ void ASYNCHRONOUS_DNS_EXTERNAL_EVENT_QUEUE()
7677

7778
nsapi_dns_call_in_set(0);
7879
}
80+
#endif // defined(MBED_CONF_RTOS_PRESENT)

TESTS/netsocket/dns/asynchronous_dns_invalid_host.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
#if defined(MBED_CONF_RTOS_PRESENT)
19+
1820
#include "mbed.h"
1921
#include "greentea-client/test_env.h"
2022
#include "unity.h"
@@ -64,3 +66,4 @@ void ASYNCHRONOUS_DNS_INVALID_HOST()
6466
TEST_ASSERT(result_dns_failure == exp_dns_failure || result_dns_failure == exp_dns_failure + 1);
6567
TEST_ASSERT_EQUAL(0, result_exp_timeout);
6668
}
69+
#endif // defined(MBED_CONF_RTOS_PRESENT)

TESTS/netsocket/dns/asynchronous_dns_non_async_and_async.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
#if defined(MBED_CONF_RTOS_PRESENT)
19+
1820
#include "mbed.h"
1921
#include "greentea-client/test_env.h"
2022
#include "unity.h"
@@ -56,3 +58,4 @@ void ASYNCHRONOUS_DNS_NON_ASYNC_AND_ASYNC()
5658

5759
TEST_ASSERT(strlen(data.addr.get_ip_address()) > 1);
5860
}
61+
#endif // defined(MBED_CONF_RTOS_PRESENT)

TESTS/netsocket/dns/asynchronous_dns_simultaneous.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
#if defined(MBED_CONF_RTOS_PRESENT)
19+
1820
#include "mbed.h"
1921
#include "greentea-client/test_env.h"
2022
#include "unity.h"
@@ -41,3 +43,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS()
4143
TEST_ASSERT_EQUAL(0, result_dns_failure);
4244
TEST_ASSERT_EQUAL(0, result_exp_timeout);
4345
}
46+
#endif

TESTS/netsocket/dns/asynchronous_dns_simultaneous_cache.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
#if defined(MBED_CONF_RTOS_PRESENT)
19+
1820
#include "mbed.h"
1921
#include "greentea-client/test_env.h"
2022
#include "unity.h"
@@ -42,3 +44,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_CACHE()
4244
TEST_ASSERT_EQUAL(0, result_dns_failure);
4345
TEST_ASSERT_EQUAL(0, result_exp_timeout);
4446
}
47+
#endif

TESTS/netsocket/dns/asynchronous_dns_simultaneous_repeat.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* limitations under the License.
1616
*/
1717

18+
#if defined(MBED_CONF_RTOS_PRESENT)
19+
1820
#include "mbed.h"
1921
#include "greentea-client/test_env.h"
2022
#include "unity.h"
@@ -44,3 +46,4 @@ void ASYNCHRONOUS_DNS_SIMULTANEOUS_REPEAT()
4446
TEST_ASSERT_EQUAL(0, result_exp_timeout);
4547
}
4648
}
49+
#endif

0 commit comments

Comments
 (0)