Summary
Fallback preprocessing fails under non-C locale (e.g. ja_JP) when using partials.
The issue does not occur when LC_ALL=C is set.
Version
Ceedling => 1.1.0.pre.2-645b64a
----------------------
C:/Ruby34-x64/lib/ruby/gems/3.4.0/gems/ceedling-1.1.0.pre.2/
Build Frameworks
----------------------
CMock => 2.6.3
Unity => 2.6.3
CException => 1.3.4
Artifacts
Repro repository with both success and failure artifacts:
https://github.com/bluekani/ceedling-v110-partials-preprocess-issue
This repository contains:
working case (LC_ALL=C)
failing case (LC_ALL=ja_JP)
Preprocess output snippet
The failing case contains localized built-in markers:
https://github.com/bluekani/ceedling-v110-partials-preprocess-issue/blob/main/build_failed/test/preprocess/files/test_sensor_partials_mocks/directives_only/raw/test_sensor_partials_mocks.c
# 0 "test/test_sensor_partials_mocks.c"
# 0 "<組み込み>"
#define __STDC__ 1
# 0 "<組み込み>"
#define __STDC_VERSION__ 201710L
Output
https://github.com/bluekani/ceedling-v110-partials-preprocess-issue/blob/main/log_failed.txt
PS C:\Develop\CeedlingV110PartialsTest> where.exe gcc
C:\Ruby34-x64\msys64\usr\bin\gcc.exe
PS C:\Develop\CeedlingV110PartialsTest> $env:LC_ALL="ja_JP"
PS C:\Develop\CeedlingV110PartialsTest> ceedling test:all
EXAMPLE PROJECT
Loaded project configuration from working directory.
> Using: C:/Develop/CeedlingV110PartialsTest/project.yml
> Working directory: C:/Develop/CeedlingV110PartialsTest
Processing Partials configuration...
> Enabled mocking.
> Enabled preprocessing.
Ceedling set up completed in 363 milliseconds
Preparing Build Paths...
Collecting Essential Test Context
---------------------------------
Parsing test_sensor_partials_mocks.c for user & system #includes (fallback for preprocessing failures)...
Parsing test_sensor_partials_mocks.c for include path build directive macros...
Parsing test_sensor_partials_mocks.c for Partials directive macros...
Parsing test_sensor_partials_test.c for user & system #includes (fallback for preprocessing failures)...
Parsing test_sensor_partials_test.c for include path build directive macros...
Parsing test_sensor_partials_test.c for Partials directive macros...
Ingesting Test Configurations
-----------------------------
Collecting search paths, flags, and defines for test_sensor_partials_mocks.c...
Collecting search paths, flags, and defines for test_sensor_partials_test.c...
Collecting More Test Context
----------------------------
Extracting #includes from test_sensor_partials_test.c...
Extracting #includes from test_sensor_partials_mocks.c...
WARNING: Using fallback methods to extract #includes and other directives: Failed to read 'build/test/preprocess/files/test_sensor_partials_mocks/directives_only/raw/test_sensor_partials_mocks.c' for comment stripping >> undefined method 'count' for nil
WARNING: Using fallback methods to extract #includes and other directives: Failed to read 'build/test/preprocess/files/test_sensor_partials_test/directives_only/raw/test_sensor_partials_test.c' for comment stripping >> undefined method 'count' for nil
Determining Files to Be Generated...
Preprocessing for Testing & Mocking Partials
--------------------------------------------
Preprocessing header file for follow-on Partials handling test_sensor_partials_mocks::sensor.h...
Preprocessing header file for follow-on Partials handling test_sensor_partials_test::sensor.h...
Full-preprocessing for expanded Partial signature extraction test_sensor_partials_mocks::sensor.h...
Full-preprocessing for expanded Partial signature extraction test_sensor_partials_test::sensor.h...
Preprocessing for Testing Partials
----------------------------------
EXCEPTION: Failed to read 'build/test/preprocess/files/test_sensor_partials_test/directives_only/raw/sensor.c' for comment stripping >> undefined method 'count' for nil
Ceedling could not complete operations because of errors
Summary
Fallback preprocessing fails under non-C locale (e.g. ja_JP) when using partials.
The issue does not occur when
LC_ALL=Cis set.Version
Artifacts
Repro repository with both success and failure artifacts:
https://github.com/bluekani/ceedling-v110-partials-preprocess-issue
This repository contains:
working case (LC_ALL=C)
failing case (LC_ALL=ja_JP)
Preprocess output snippet
The failing case contains localized built-in markers:
https://github.com/bluekani/ceedling-v110-partials-preprocess-issue/blob/main/build_failed/test/preprocess/files/test_sensor_partials_mocks/directives_only/raw/test_sensor_partials_mocks.c
Output
https://github.com/bluekani/ceedling-v110-partials-preprocess-issue/blob/main/log_failed.txt