Skip to content

Commit 43784bc

Browse files
committed
Exclude test cases for data types %lld, %llu, %llx to reduce build binary size
The "minimal_printf" greentea test has test cases for the different data types (%d, %u, %x, %ld, %lu, %lx %llx) that require a minimum above 36kb ROM to build all test cases. LPC1114 target has only 32KB ROM memory, so these changes excluding 3 test cases of data types %lld, %llu, %llx to bring down to meet target minimum ROM size
1 parent 6bfddd8 commit 43784bc

File tree

1 file changed

+6
-2
lines changed
  • platform/tests/TESTS/mbed_platform/minimal-printf/compliance

1 file changed

+6
-2
lines changed

platform/tests/TESTS/mbed_platform/minimal-printf/compliance/main.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
#define LLONG_MIN INT64_MIN
4343
#endif
4444

45+
#define TEST_MIN_REQ_ROM_SIZE (36 * 1024)
46+
4547
using namespace utest::v1;
4648

4749
#define MAX_STRING_SIZE 100
@@ -1420,13 +1422,15 @@ Case cases[] = {
14201422
#endif
14211423
Case("snprintf buffer overflow %d", test_snprintf_buffer_overflow_d),
14221424
Case("snprintf buffer overflow %ld", test_snprintf_buffer_overflow_ld),
1423-
Case("snprintf buffer overflow %lld", test_snprintf_buffer_overflow_lld),
14241425
Case("snprintf buffer overflow %u", test_snprintf_buffer_overflow_u),
14251426
Case("snprintf buffer overflow %lu", test_snprintf_buffer_overflow_lu),
1426-
Case("snprintf buffer overflow %llu", test_snprintf_buffer_overflow_llu),
14271427
Case("snprintf buffer overflow %x", test_snprintf_buffer_overflow_x),
14281428
Case("snprintf buffer overflow %lx", test_snprintf_buffer_overflow_lx),
1429+
#if !defined(MBED_CONF_TARGET_ROM_SIZE) || (MBED_CONF_TARGET_ROM_SIZE >= TEST_MIN_REQ_ROM_SIZE)
1430+
Case("snprintf buffer overflow %lld", test_snprintf_buffer_overflow_lld),
1431+
Case("snprintf buffer overflow %llu", test_snprintf_buffer_overflow_llu),
14291432
Case("snprintf buffer overflow %llx", test_snprintf_buffer_overflow_llx),
1433+
#endif
14301434
};
14311435

14321436
Specification specification(greentea_setup, cases, greentea_test_teardown_handler);

0 commit comments

Comments
 (0)