Environment
- Ceedling 1.1.3 (
1.1.3-049a9d7)
- Ceedling 1.1.4 (
1.1.4-e44173e)
- GCC/Linux
Problem
When a test file directly includes a system header with a directory component:
the generated test runner contains:
The directory component and system-include delimiters are lost, causing runner compilation to fail.
This affects both Ceedling 1.1.3 and 1.1.4, so it is not a 1.1.4 regression.
It is related to ThrowTheSwitch/Ceedling#1194, but that issue concerned includes propagated into generated Partials. The Partial path is fixed in 1.1.4; the generated test-runner path remains affected.
Reproduction
Create a project:
ceedling new runner-system-include-repro
cd runner-system-include-repro
test/test_runner_system_include.c
#include <sys/stat.h>
#include "unity.h"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_runner_preserves_system_include_path(void)
{
struct stat value;
TEST_ASSERT_EQUAL_UINT(sizeof(value), sizeof(struct stat));
}
Run:
ceedling clobber test:all
Actual result
The test source itself compiles, but the generated runner fails:
build/test/runners/test_runner_system_include_runner.c:5:10:
fatal error: stat.h: No such file or directory
5 | #include "stat.h"
| ^~~~~~~~
The generated runner contains:
This was reproduced unchanged with both Ceedling 1.1.3 and 1.1.4.
Expected result
The generated runner should preserve the original include:
At minimum, both the directory component and the distinction between system and user includes should be retained.
Current workaround
A project-local forwarding header can mask the problem:
// test/support/stat.h
#include <sys/stat.h>
This workaround should not be necessary once the generated runner preserves the original include.
Environment
1.1.3-049a9d7)1.1.4-e44173e)Problem
When a test file directly includes a system header with a directory component:
the generated test runner contains:
The directory component and system-include delimiters are lost, causing runner compilation to fail.
This affects both Ceedling 1.1.3 and 1.1.4, so it is not a 1.1.4 regression.
It is related to ThrowTheSwitch/Ceedling#1194, but that issue concerned includes propagated into generated Partials. The Partial path is fixed in 1.1.4; the generated test-runner path remains affected.
Reproduction
Create a project:
ceedling new runner-system-include-repro cd runner-system-include-reprotest/test_runner_system_include.cRun:
Actual result
The test source itself compiles, but the generated runner fails:
The generated runner contains:
This was reproduced unchanged with both Ceedling 1.1.3 and 1.1.4.
Expected result
The generated runner should preserve the original include:
At minimum, both the directory component and the distinction between system and user includes should be retained.
Current workaround
A project-local forwarding header can mask the problem:
This workaround should not be necessary once the generated runner preserves the original include.