Skip to content

Commit d1a8b5b

Browse files
Merge pull request #289 from gilles-peskine-arm/iar-1.1.0-framework
IAR build fixes before 1.1.0/4.1.0/3.6.6: framework support
2 parents c3d6599 + 96b9d67 commit d1a8b5b

31 files changed

Lines changed: 75 additions & 24 deletions

tests/include/test/arguments.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#ifndef TEST_ARGUMENTS_H
1515
#define TEST_ARGUMENTS_H
1616

17-
#include "test_common.h"
17+
#include "build_info.h"
1818
#include <stdint.h>
1919
#include <stdlib.h>
2020

tests/include/test/asn1_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#ifndef ASN1_HELPERS_H
99
#define ASN1_HELPERS_H
1010

11-
#include "test_common.h"
11+
#include "build_info.h"
1212
#include "test/helpers.h"
1313

1414
/** Skip past an INTEGER in an ASN.1 buffer.

tests/include/test/bignum_codepath_check.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef BIGNUM_CODEPATH_CHECK_H
1818
#define BIGNUM_CODEPATH_CHECK_H
1919

20-
#include "test_common.h"
20+
#include "build_info.h"
2121

2222
#include "bignum_core.h"
2323

tests/include/test/bignum_helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#ifndef TEST_BIGNUM_HELPERS_H
1414
#define TEST_BIGNUM_HELPERS_H
1515

16-
#include "test_common.h"
16+
#include "build_info.h"
1717

1818
#if defined(MBEDTLS_BIGNUM_C)
1919

tests/include/test/build_info.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/**
2+
* \file test/build_info.h
3+
*
4+
* \brief Common things for all Mbed TLS and TF-PSA-Crypto test headers.
5+
*
6+
* Include this header first in all headers in `include/test/`.
7+
*/
8+
9+
/*
10+
* Copyright The Mbed TLS Contributors
11+
* SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
12+
*/
13+
14+
#ifndef TEST_BUILD_INFO_H
15+
#define TEST_BUILD_INFO_H
16+
17+
#include <mbedtls/build_info.h>
18+
19+
/* Most fields of publicly available structs are private and are wrapped with
20+
* MBEDTLS_PRIVATE macro. This define allows tests to access the private fields
21+
* directly (without using the MBEDTLS_PRIVATE wrapper). */
22+
#define MBEDTLS_ALLOW_PRIVATE_ACCESS
23+
24+
#endif /* TEST_BUILD_INFO_H */

tests/include/test/constant_flow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef TEST_CONSTANT_FLOW_H
1313
#define TEST_CONSTANT_FLOW_H
1414

15-
#include "test_common.h"
15+
#include "build_info.h"
1616

1717
/*
1818
* This file defines the two macros

tests/include/test/fake_external_rng_for_test.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#ifndef FAKE_EXTERNAL_RNG_FOR_TEST_H
1111
#define FAKE_EXTERNAL_RNG_FOR_TEST_H
1212

13-
#include "test_common.h"
13+
#include "build_info.h"
1414

1515
#if defined(MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG)
1616
/** Enable the insecure implementation of mbedtls_psa_external_get_random().

tests/include/test/helpers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#ifndef TEST_HELPERS_H
1414
#define TEST_HELPERS_H
1515

16-
#include "test_common.h"
16+
#include "build_info.h"
1717

1818
#if defined(__SANITIZE_ADDRESS__) /* gcc -fsanitize=address */
1919
# define MBEDTLS_TEST_HAVE_ASAN

tests/include/test/macros.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef TEST_MACROS_H
1313
#define TEST_MACROS_H
1414

15-
#include "test_common.h"
15+
#include "build_info.h"
1616

1717
#include <stdlib.h>
1818

tests/include/test/memory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#ifndef TEST_MEMORY_H
1313
#define TEST_MEMORY_H
1414

15-
#include "test_common.h"
15+
#include "build_info.h"
1616

1717
#include "mbedtls/platform.h"
1818
#include "test/helpers.h"

0 commit comments

Comments
 (0)