From 21744811bb7638830a7ca495694d295acbadc150 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Mon, 4 May 2020 17:44:04 -0700 Subject: tests: Add wrapper header and fix --gc-sections requires a few standard headers to be explicitly included before itself or it will throw compilation errors. Having to always include these headers in the right order in every test is cumbersome. Instead, this patch encapsulates the problem in a new header that all tests should include (instead of directly). Also fix --gc-sections in the test framework which needs to be passed for linking, not for compiling. Signed-off-by: Julius Werner Change-Id: I4284d74c8673708e21a5266eb42f7b9ae19a1b12 Reviewed-on: https://review.coreboot.org/c/coreboot/+/41045 Tested-by: build bot (Jenkins) Reviewed-by: Jan Dabros Reviewed-by: Paul Fagerburg --- tests/device/i2c-test.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'tests/device') diff --git a/tests/device/i2c-test.c b/tests/device/i2c-test.c index 9303456261..acf7b0741d 100644 --- a/tests/device/i2c-test.c +++ b/tests/device/i2c-test.c @@ -1,12 +1,8 @@ /* SPDX-License-Identifier: GPL-2.0-only */ -#include -#include -#include -#include -#include - #include +#include +#include /* Simulate two i2c devices, both on bus 0, each with three uint8_t regs implemented. */ -- cgit v1.2.3