Ceedling icon indicating copy to clipboard operation
Ceedling copied to clipboard

Enum redeclaration : Original and mocked header

Open JuPrgn opened this issue 8 months ago • 1 comments

Ceedling => 1.0.2-72c0935 CMock => 2.6.0 Unity => 2.6.1 CException => 1.3.4

Hello,

I'm getting enumeration redeclaration errors when a ModB.h header is included in ModA.h and I mock ModB in the tests. In the build/test/mock/test_ModA folder, I have a copy of the header ModB.h, both src header and this copied header seem to be included in the tests. If the ModB.h header is included in ModA.c instead of ModA.h, the problem doesn't appear.

In file included from src/ModA.h:4, from build/test/runners/test_ModA_runner.c:11: src/Modb.h:6:5: note: previous definition of ‘BSP_ERR’ with type ‘enum ’ 6 | BSP_ERR = 0U, | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:11:5: error: redeclaration of enumerator ‘HES_ERR’ 11 | HES_ERR, | ^~~~~~~ src/Modb.h:7:5: note: previous definition of ‘HES_ERR’ with type ‘enum ’ 7 | HES_ERR,

Is something wrong with my configuration ?

ModA.c :

#include "ModA.h"

void MODA_Init(void)
{
    MODB_Init();
}

ModA.h :

#ifndef MODA_H
#define MODA_H

#include "Modb.h"

void MODA_Init(void);

#endif // MODA_H

ModB.c :

#include "ModB.h"

void MODB_Init(void)
{
}

ModB.h :

#ifndef MODB_H
#define MODB_H

typedef enum
{
    BSP_ERR = 0U,
    HES_ERR,
    DRV_ERR
} ENUM_ERR_t;

void MODB_Init(void);

#endif // MODB_H

test_ModA.c :

#ifdef TEST

#include "unity.h"

#include "ModA.h"
#include "mock_ModB.h"

void setUp(void)
{
}

void tearDown(void)
{
}

void test_ModA_Init(void)
{
    MODB_Init_Expect();
    MODA_Init();
}

#endif

This is the content of build/test/mocks/test_ModA/ModB.h which recopy the enum and also include original ModB.h (where is also declared the enum) :

#ifndef _MODB_H_ 
#define _MODB_H_

#include "ModB.h"

typedef enum
{
    BSP_ERR = 0U,
    HES_ERR,
    DRV_ERR
} ENUM_ERR_t;

void MODB_Init(void);

#endif 

Project configuration :

---
:project:  
  :which_ceedling: gem 
  :ceedling_version: 1.0.2

  :use_mocks: TRUE
  :use_test_preprocessor: :all
  :use_backtrace: :simple
  :use_decorators: :auto #Decorate Ceedling's output text. Your options are :auto, :all, or :none

  :build_root: build
  :test_file_prefix: test_
  :default_tasks:
    - test:all

  :test_threads: 8
  :compile_threads: 8

  :release_build: FALSE

:mixins:
  :enabled: []
  :load_paths: []

:test_build:
  :use_assembly: FALSE
  
:release_build:
  :output: MyApp.out
  :use_assembly: FALSE
  :artifacts: []

:plugins:
  :load_paths: []
  :enabled:
    - report_tests_pretty_stdout
    - report_tests_raw_output_log

:extension:
  :executable: .hex

:paths:
  :test:
    - +:test/**
  :source:
    - src/**
  :include:
    - src/** 
  :libraries: []

:files:
  :test: []
  :source: []

:defines:
  :commmon: &common_defines
    - UNITY_INT_WIDTH=16
    - CMOCK_MEM_INDEX_TYPE=uint16_t
    - CMOCK_MEM_ALIGN=1
    - CMOCK_MEM_SIZE=4096
  :test:
    - *common_defines
    - TEST # Simple list option to add symbol 'TEST' to compilation of all files in all test executables
  :test_preprocess:
    - *common_defines
    - TEST
  :release: []

  :use_test_definition: FALSE 

:cmock:
  :plugins:                        # What plugins should be used by CMock?
    - :ignore
    - :callback
  :verbosity:  2                   # the options being 0 errors only, 1 warnings and errors, 2 normal info, 3 verbose
  :when_no_prototypes:  :warn      # the options being :ignore, :warn, or :erro

  :skeleton_path:  ''              # Subdirectory to store stubs when generated (default: '')
  :mock_prefix:  'mock_'           # Prefix to append to filenames for mocks
  :mock_suffix:  ''                # Suffix to append to filenames for mocks

  :strippables:  ['(?:__attribute__\s*\([ (]*.*?[ )]*\)+)']
  :attributes:
     - __ramfunc
     - __irq
     - __fiq
     - register
     - extern
  :c_calling_conventions:
     - __stdcall
     - __cdecl
     - __fastcall
  :treat_externs:  :exclude
  :treat_inlines:  :include

  :treat_as:        
    uint8:    HEX8
    uint16:   HEX16
    uint32:   UINT32
    uint64:   UINT64
    int8:     INT8
    bool:     UINT8
  :memcmp_if_unknown:  true 
  :when_ptr:  :compare_data

  :weak:  '' 
  :enforce_strict_ordering: true
  :fail_on_unexpected_calls: true
  :callback_include_count: true
  :callback_after_arg_check: false
  :exclude_setjmp_h:  false

:unity:
  :defines:
    - UNITY_EXCLUDE_FLOAT

:environment: []

:libraries:
  :placement: :end
  :flag: "-l${1}"
  :path_flag: "-L ${1}"
  :system: []
  :test: []
  :release: []
...

Full verbose log ``` 🌱 Welcome to Ceedling!

Ceedling => 1.0.2-72c0935

/usr/local/bundle/gems/ceedling-1.0.2/

Build Frameworks

   CMock => 2.6.0
   Unity => 2.6.1

CException => 1.3.4 🚧 Loaded project configuration from command line argument.

Using: /project/project.yml Working directory: /project

  • Merging command line mixin using project_GCC.yml

Set which Ceedling from config :project ↳ :which_ceedling => gem Launching Ceedling from /usr/local/bundle/gems/ceedling-1.0.2/

🚧 Application & Build Frameworks Ceedling => 1.0.2-72c0935 CMock => 2.6.0 Unity => 2.6.1 CException => 1.3.4

🚧 Validating configuration contains minimum required sections...

🚧 Base configuration handling... Processing environment variables...

🚧 Plugin Handling

Discovering all plugins...

Rake plugins: gcov Programmatic plugins: report_tests_pretty_stdout, report_tests_raw_output_log, gcov Config plugins: report_tests_pretty_stdout Merging configuration from plugin report_tests_pretty_stdout... {plugins: {display_raw_test_results: false}}

🚧 Assembling Default Settings

Collecting default tool configurations... Collecting CMock defaults... Collecting Plugin YAML defaults...

  • gcov >> {gcov: {summaries: true, report_task: false, utilities: ["gcovr"], reports: [], gcovr: {report_root: ".", config_file: nil, merge_mode_function: "merge-use-line-max"}, report_generator: {verbosity: "Warning", collection_paths_source: [], custom_args: [], gcov_exclude: []}}} Collecting Plugin Ruby hash defaults...
  • gcov >> {tools: {gcov_compiler: {executable: "gcc", name: "default_gcov_compiler", optional: false, arguments: ["-g", "-fprofile-arcs", "-ftest-coverage", "-I"${5}"", "-D"${6}"", "-DGCOV_COMPILER", "-DCODE_COVERAGE", "-c "${1}"", "-o "${2}"", "-MMD", "-MF "${4}""]}, gcov_linker: {executable: "gcc", name: "default_gcov_linker", optional: false, arguments: ["-g", "-fprofile-arcs", "-ftest-coverage", "${1}", "${5}", "-o "${2}"", "${4}"]}, gcov_fixture: {executable: "${1}", name: "default_gcov_fixture", optional: false, arguments: []}, gcov_summary: {executable: "gcov", name: "default_gcov_summary", optional: true, arguments: ["-n", "-p", "-b", "-o "${2}"", ""${1}""]}, gcov_report: {executable: "gcov", name: "default_gcov_report", optional: true, arguments: ["-b", "-c", "-r", "-x", "${1}"]}, gcov_gcovr_report: {executable: "gcovr", name: "default_gcov_gcovr_report", optional: true, arguments: ["${1}"]}, gcov_reportgenerator_report: {executable: "reportgenerator", name: "default_gcov_reportgenerator_report", optional: true, arguments: ["${1}"]}}} Populating project configuration with collected default values...

🚧 Completing Project Configuration

Processing Unity configuration... Unity configuration >> {defines: ["UNITY_EXCLUDE_FLOAT"], vendor_path: "/usr/local/bundle/gems/ceedling-1.0.2/vendor", use_param_tests: false} Processing CMock configuration... CMock configuration >> {plugins: [:ignore, :callback], verbosity: 2, when_no_prototypes: :warn, skeleton_path: "", mock_prefix: "mock_", mock_suffix: "", strippables: ["(?:attribute\s*\([ (].?[ )]*\)+)"], attributes: ["__ramfunc", "__irq", "__fiq", "register", "extern"], c_calling_conventions: ["__stdcall", "__cdecl", "__fastcall"], treat_externs: :exclude, treat_inlines: :include, treat_as: {"uint8" => "HEX8", "uint16" => "HEX16", "uint32" => "UINT32", "uint64" => "UINT64", "int8" => "INT8", "bool" => "UINT8"}, memcmp_if_unknown: true, when_ptr: :compare_data, weak: "", enforce_strict_ordering: true, fail_on_unexpected_calls: true, callback_include_count: true, callback_after_arg_check: false, exclude_setjmp_h: false, vendor_path: "/usr/local/bundle/gems/ceedling-1.0.2/vendor", includes: [], defines: [], unity_helper_path: [], mock_path: "build/test/mocks"} Populating test runner generation settings... Test Runner configuration >> {cmdline_args: true, includes: [], defines: ["UNITY_EXCLUDE_FLOAT"], file_suffix: "runner", mock_prefix: "mock", mock_suffix: "", enforce_strict_ordering: true, use_param_tests: false} CException configuration >> {vendor_path: "/usr/local/bundle/gems/ceedling-1.0.2/vendor", defines: []} Processing environment variables... Processing path entries and expanding any string replacements... Expanding any string replacements in :flags entries... Expanding any string replacements in :defines entries... Standardizing all paths... Populating tool definition settings and expanding any string replacements... Processing tool definition shortcuts...

test_linker arguments: "-lm" gcov_linker arguments: "-lm"

🚧 Validating final project configuration... Build paths:

  • build/test/mocks
  • build/artifacts
  • build/test
  • build/vendor
  • build/artifacts/test
  • build/test/runners
  • build/test/results
  • build/test/out
  • build/test/cache
  • build/test/dependencies
  • build/vendor/unity/src
  • build/vendor/cmock/src
  • build/logs
  • build/test/preprocess/includes
  • build/test/preprocess/files

🚧 Loading Plugins

Adding plugin gcov to Rake load list... Instantiating plugin class ReportTestsPrettyStdout... Instantiating plugin class ReportTestsRawOutputLog... Instantiating plugin class Gcov...

Ceedling set up completed in 288 milliseconds

👟 Preparing Build Paths...

Batch Elapsed: (All: 0.012sec Sum: 0.022sec)

👟 Collecting Test Context

Parsing test_ModA.c for include path build directive macros... Parsing test_ModB.c for include path build directive macros... Search paths for #includes found via TEST_INCLUDE_PATH() in test/test_ModB.c:

Search paths for #includes found via TEST_INCLUDE_PATH() in test/test_ModA.c:

Batch Elapsed: (All: 0.009sec Sum: 0.015sec)

👟 Ingesting Test Configurations

Collecting search paths, flags, and defines test_ModB.c... Collecting search paths, flags, and defines test_ModA.c...

Batch Elapsed: (All: 0.006sec Sum: 0.007sec)

👟 Collecting Test Context

Preprocessing #include statements for test_ModA.c... Preprocessing #include statements for test_ModB.c... Extracting #include statements via preprocessor from test_ModB.c... Command: {name: "default_test_shallow_includes_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -MM -MG -MP -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "test/test_ModB.c""} Extracting #include statements via preprocessor from test_ModA.c... Command: {name: "default_test_shallow_includes_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -MM -MG -MP -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "test/test_ModA.c""}

Shell executed command: gcc -fpack-struct -E -MM -MG -MP -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "test/test_ModA.c" With $stdout: test_ModA.o: test/test_ModA.c unity.h ModA.h mock_ModB.h unity.h: ModA.h: mock_ModB.h: With $stderr: And terminated with status: pid 23 exit 0

Command: {name: "default_test_nested_includes_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -MM -MG -H -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "test/test_ModA.c""}

Shell executed command: gcc -fpack-struct -E -MM -MG -MP -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "test/test_ModB.c" With $stdout: test_ModB.o: test/test_ModB.c unity.h ModB.h unity.h: ModB.h: With $stderr: And terminated with status: pid 21 exit 0

Command: {name: "default_test_nested_includes_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -MM -MG -H -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "test/test_ModB.c""}

Shell executed command: gcc -fpack-struct -E -MM -MG -H -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "test/test_ModB.c" With $stdout: test_ModB.o: test/test_ModB.c build/vendor/unity/src/unity.h
build/vendor/unity/src/unity_internals.h src/ModB.h With $stderr: . build/vendor/unity/src/unity.h .. build/vendor/unity/src/unity_internals.h . src/ModB.h And terminated with status: pid 36 exit 0

Extracted #include list from test/test_ModB.c:

  • build/vendor/unity/src/unity.h
  • src/ModB.h

Shell executed command: gcc -fpack-struct -E -MM -MG -H -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "test/test_ModA.c" With $stdout: test_ModA.o: test/test_ModA.c build/vendor/unity/src/unity.h
build/vendor/unity/src/unity_internals.h src/ModA.h src/Modb.h
build/test/mocks/test_ModA/mock_ModB.h build/test/mocks/test_ModA/ModB.h With $stderr: . build/vendor/unity/src/unity.h .. build/vendor/unity/src/unity_internals.h . src/ModA.h .. src/Modb.h . build/test/mocks/test_ModA/mock_ModB.h .. build/test/mocks/test_ModA/ModB.h ... build/test/mocks/test_ModA/ModB.h And terminated with status: pid 33 exit 0

Extracted #include list from test/test_ModA.c:

  • build/vendor/unity/src/unity.h
  • src/ModA.h
  • mock_ModB.h
  • build/test/mocks/test_ModA/mock_ModB.h

Batch Elapsed: (All: 0.245sec Sum: 0.483sec)

👟 Determining Files to be Generated...

Batch Elapsed: (All: 0.002sec Sum: 0.000sec)

👟 Preprocessing for Mocks

Preprocessing test_ModA::ModB.h... Preprocessing test_ModA::ModB.h... Extracting #include statements via preprocessor from test_ModA::ModB.h... Command: {name: "default_test_shallow_includes_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -MM -MG -MP -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "src/ModB.h""} Extracting #include statements via preprocessor from test_ModA::ModB.h... Command: {name: "default_test_shallow_includes_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -MM -MG -MP -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "src/ModB.h""}

Shell executed command: gcc -fpack-struct -E -MM -MG -MP -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "src/ModB.h" With $stdout: ModB.o: src/ModB.h With $stderr: And terminated with status: pid 49 exit 0

Command: {name: "default_test_nested_includes_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -MM -MG -H -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "src/ModB.h""}

Shell executed command: gcc -fpack-struct -E -MM -MG -MP -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "src/ModB.h" With $stdout: ModB.o: src/ModB.h With $stderr: And terminated with status: pid 52 exit 0

Command: {name: "default_test_nested_includes_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -MM -MG -H -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "src/ModB.h""}

Shell executed command: gcc -fpack-struct -E -MM -MG -H -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "src/ModB.h" With $stdout: ModB.o: src/ModB.h With $stderr: And terminated with status: pid 61 exit 0

Extracted #include list from src/ModB.h:

  • src/ModB.h

Shell executed command: gcc -fpack-struct -E -MM -MG -H -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -nostdinc -x c "src/ModB.h" With $stdout: ModB.o: src/ModB.h With $stderr: And terminated with status: pid 67 exit 0

Extracted #include list from src/ModB.h:

  • src/ModB.h

Command: {name: "default_test_file_full_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c "src/ModB.h" -o "build/test/preprocess/files/test_ModA/full_expansion/ModB.h""} Command: {name: "default_test_file_full_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c "src/ModB.h" -o "build/test/preprocess/files/test_ModA/full_expansion/ModB.h""}

Shell executed command: gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c "src/ModB.h" -o "build/test/preprocess/files/test_ModA/full_expansion/ModB.h" With $stdout: With $stderr: And terminated with status: pid 78 exit 0

Shell executed command: gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c "src/ModB.h" -o "build/test/preprocess/files/test_ModA/full_expansion/ModB.h" With $stdout: With $stderr: And terminated with status: pid 73 exit 0

Command: {name: "default_test_file_directives_only_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c -fdirectives-only "src/ModB.h" -o "build/test/preprocess/files/test_ModA/directives_only/ModB.h""} Command: {name: "default_test_file_directives_only_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c -fdirectives-only "src/ModB.h" -o "build/test/preprocess/files/test_ModA/directives_only/ModB.h""}

Shell executed command: gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c -fdirectives-only "src/ModB.h" -o "build/test/preprocess/files/test_ModA/directives_only/ModB.h" With $stdout: With $stderr: And terminated with status: pid 85 exit 0

Shell executed command: gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c -fdirectives-only "src/ModB.h" -o "build/test/preprocess/files/test_ModA/directives_only/ModB.h" With $stdout: With $stderr: And terminated with status: pid 88 exit 0

Batch Elapsed: (All: 0.231sec Sum: 0.457sec)

👟 Mocking

Generating mock for test_ModA::ModB.h... Generating mock for test_ModA::ModB.h... Creating mock for ModB... Creating mock for ModB...

Batch Elapsed: (All: 0.157sec Sum: 0.215sec)

👟 Preprocessing Test Files

Preprocessing test_ModA.c... Preprocessing test_ModB.c... Loading #include statement listing file for test_ModB.c... Loading #include statement listing file for test_ModA.c... Loaded existing #include list from build/test/preprocess/includes/test_ModB/test_ModB.c.yml:

  • build/vendor/unity/src/unity.h
  • src/ModB.h

Command: {name: "default_test_file_full_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c "test/test_ModB.c" -o "build/test/preprocess/files/test_ModB/full_expansion/test_ModB.c""} Loaded existing #include list from build/test/preprocess/includes/test_ModA/test_ModA.c.yml:

  • build/vendor/unity/src/unity.h
  • src/ModA.h
  • mock_ModB.h
  • build/test/mocks/test_ModA/mock_ModB.h

Command: {name: "default_test_file_full_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c "test/test_ModA.c" -o "build/test/preprocess/files/test_ModA/full_expansion/test_ModA.c""}

Shell executed command: gcc -fpack-struct -E -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c "test/test_ModB.c" -o "build/test/preprocess/files/test_ModB/full_expansion/test_ModB.c" With $stdout: With $stderr: And terminated with status: pid 101 exit 0

Shell executed command: gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c "test/test_ModA.c" -o "build/test/preprocess/files/test_ModA/full_expansion/test_ModA.c" With $stdout: With $stderr: And terminated with status: pid 106 exit 0

Command: {name: "default_test_file_directives_only_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c -fdirectives-only "test/test_ModB.c" -o "build/test/preprocess/files/test_ModB/directives_only/test_ModB.c""} Command: {name: "default_test_file_directives_only_preprocessor", executable: "gcc", options: {}, line: "gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c -fdirectives-only "test/test_ModA.c" -o "build/test/preprocess/files/test_ModA/directives_only/test_ModA.c""}

Shell executed command: gcc -fpack-struct -E -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c -fdirectives-only "test/test_ModB.c" -o "build/test/preprocess/files/test_ModB/directives_only/test_ModB.c" With $stdout: With $stderr: And terminated with status: pid 113 exit 0

Shell executed command: gcc -fpack-struct -E -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -DGNU_COMPILER -x c -fdirectives-only "test/test_ModA.c" -o "build/test/preprocess/files/test_ModA/directives_only/test_ModA.c" With $stdout: With $stderr: And terminated with status: pid 119 exit 0

Extra source files found via TEST_SOURCE_FILE() in test/test_ModB.c:

Extra source files found via TEST_SOURCE_FILE() in test/test_ModA.c:

Batch Elapsed: (All: 1.697sec Sum: 3.347sec)

👟 Collecting Test Context

Parsing test case names test_ModA.c... Parsing test case names test_ModB.c... Test cases found in test/test_ModA.c:

  • 16:test_ModA_Init()

Test cases found in test/test_ModB.c:

  • 14:test_ModB_Init()

Batch Elapsed: (All: 0.013sec Sum: 0.023sec)

👟 Test Runners

Generating runner for test_ModA.c... Generating runner for test_ModB.c...

Batch Elapsed: (All: 0.015sec Sum: 0.027sec)

👟 Determining Artifacts to Be Built...

Batch Elapsed: (All: 0.001sec Sum: 0.001sec)

👟 Building Objects

Plugin | Gcov > :pre_compile_execute... Compiling test_ModA.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "test/test_ModA.c" -o "build/test/out/test_ModA/test_ModA.o" -MMD -MF "build/test/dependencies/test_ModA.d""} Plugin | Gcov > :pre_compile_execute... Compiling test_ModA::ModA.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "src/ModA.c" -o "build/test/out/test_ModA/ModA.o" -MMD -MF "build/test/dependencies/ModA.d""} Plugin | Gcov > :pre_compile_execute... Compiling test_ModA::unity.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/vendor/unity/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/vendor/unity/src/unity.c" -o "build/test/out/test_ModA/unity.o" -MMD -MF "build/test/dependencies/unity.d""} Plugin | Gcov > :pre_compile_execute... Compiling test_ModA::cmock.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/vendor/cmock/src/cmock.c" -o "build/test/out/test_ModA/cmock.o" -MMD -MF "build/test/dependencies/cmock.d""} Plugin | Gcov > :pre_compile_execute... Compiling test_ModB.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "test/test_ModB.c" -o "build/test/out/test_ModB/test_ModB.o" -MMD -MF "build/test/dependencies/test_ModB.d""} Plugin | Gcov > :pre_compile_execute... Compiling test_ModB::ModB.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "src/ModB.c" -o "build/test/out/test_ModB/ModB.o" -MMD -MF "build/test/dependencies/ModB.d""} Plugin | Gcov > :pre_compile_execute... Compiling test_ModA::test_ModA_runner.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/test/runners/test_ModA_runner.c" -o "build/test/out/test_ModA/test_ModA_runner.o" -MMD -MF "build/test/dependencies/test_ModA_runner.d""} Plugin | Gcov > :pre_compile_execute... Compiling test_ModA::mock_ModB.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/test/mocks/test_ModA/build/test/mocks/test_ModA/mock_ModB.c" -o "build/test/out/test_ModA/mock_ModB.o" -MMD -MF "build/test/dependencies/mock_ModB.d""}

Shell executed command: gcc -fpack-struct -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "src/ModA.c" -o "build/test/out/test_ModA/ModA.o" -MMD -MF "build/test/dependencies/ModA.d" With $stdout: With $stderr: And terminated with status: pid 141 exit 0

Shell executed command: gcc -fpack-struct -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "src/ModB.c" -o "build/test/out/test_ModB/ModB.o" -MMD -MF "build/test/dependencies/ModB.d" With $stdout: With $stderr: And terminated with status: pid 156 exit 0

Plugin | Gcov > :pre_compile_execute... Compiling test_ModB::unity.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/vendor/unity/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/vendor/unity/src/unity.c" -o "build/test/out/test_ModB/unity.o" -MMD -MF "build/test/dependencies/unity.d""} Plugin | Gcov > :pre_compile_execute... Compiling test_ModB::test_ModB_runner.c... Command: {name: "default_test_compiler", executable: "gcc", options: {}, line: "gcc -fpack-struct -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/test/runners/test_ModB_runner.c" -o "build/test/out/test_ModB/test_ModB_runner.o" -MMD -MF "build/test/dependencies/test_ModB_runner.d""}

Shell executed command: gcc -fpack-struct -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/vendor/cmock/src/cmock.c" -o "build/test/out/test_ModA/cmock.o" -MMD -MF "build/test/dependencies/cmock.d" With $stdout: With $stderr: And terminated with status: pid 148 exit 0

Shell executed command: gcc -fpack-struct -I"build/vendor/unity/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/vendor/unity/src/unity.c" -o "build/test/out/test_ModA/unity.o" -MMD -MF "build/test/dependencies/unity.d" With $stdout: With $stderr: And terminated with status: pid 145 exit 0

Shell executed command: gcc -fpack-struct -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "test/test_ModA.c" -o "build/test/out/test_ModA/test_ModA.o" -MMD -MF "build/test/dependencies/test_ModA.d" With $stdout: With $stderr: In file included from build/test/mocks/test_ModA/mock_ModB.h:6, from test/test_ModA.c:6: build/test/mocks/test_ModA/ModB.h:10:5: error: redeclaration of enumerator ‘BSP_ERR’ 10 | BSP_ERR = 0U, | ^~~~~~~ In file included from src/ModA.h:4, from test/test_ModA.c:5: src/Modb.h:6:5: note: previous definition of ‘BSP_ERR’ with type ‘enum ’ 6 | BSP_ERR = 0U, | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:11:5: error: redeclaration of enumerator ‘HES_ERR’ 11 | HES_ERR, | ^~~~~~~ src/Modb.h:7:5: note: previous definition of ‘HES_ERR’ with type ‘enum ’ 7 | HES_ERR, | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:12:5: error: redeclaration of enumerator ‘DRV_ERR’ 12 | DRV_ERR | ^~~~~~~ src/Modb.h:8:5: note: previous definition of ‘DRV_ERR’ with type ‘enum ’ 8 | DRV_ERR | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:13:3: error: conflicting types for ‘ENUM_ERR_t’; have ‘enum ’ 13 | } ENUM_ERR_t; | ^~~~~~~~~~ src/Modb.h:9:3: note: previous declaration of ‘ENUM_ERR_t’ with type ‘ENUM_ERR_t’ 9 | } ENUM_ERR_t; | ^~~~~~~~~~ And terminated with status: pid 139 exit 1

Shell executed command: gcc -fpack-struct -I"build/vendor/unity/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/vendor/unity/src/unity.c" -o "build/test/out/test_ModB/unity.o" -MMD -MF "build/test/dependencies/unity.d" With $stdout: With $stderr: And terminated with status: pid 189 exit 0

Shell executed command: gcc -fpack-struct -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "test/test_ModB.c" -o "build/test/out/test_ModB/test_ModB.o" -MMD -MF "build/test/dependencies/test_ModB.d" With $stdout: With $stderr: And terminated with status: pid 151 exit 0

Shell executed command: gcc -fpack-struct -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/test/runners/test_ModA_runner.c" -o "build/test/out/test_ModA/test_ModA_runner.o" -MMD -MF "build/test/dependencies/test_ModA_runner.d" With $stdout: With $stderr: In file included from build/test/mocks/test_ModA/mock_ModB.h:6, from build/test/runners/test_ModA_runner.c:12: build/test/mocks/test_ModA/ModB.h:10:5: error: redeclaration of enumerator ‘BSP_ERR’ 10 | BSP_ERR = 0U, | ^~~~~~~ In file included from src/ModA.h:4, from build/test/runners/test_ModA_runner.c:11: src/Modb.h:6:5: note: previous definition of ‘BSP_ERR’ with type ‘enum ’ 6 | BSP_ERR = 0U, | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:11:5: error: redeclaration of enumerator ‘HES_ERR’ 11 | HES_ERR, | ^~~~~~~ src/Modb.h:7:5: note: previous definition of ‘HES_ERR’ with type ‘enum ’ 7 | HES_ERR, | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:12:5: error: redeclaration of enumerator ‘DRV_ERR’ 12 | DRV_ERR | ^~~~~~~ src/Modb.h:8:5: note: previous definition of ‘DRV_ERR’ with type ‘enum ’ 8 | DRV_ERR | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:13:3: error: conflicting types for ‘ENUM_ERR_t’; have ‘enum ’ 13 | } ENUM_ERR_t; | ^~~~~~~~~~ src/Modb.h:9:3: note: previous declaration of ‘ENUM_ERR_t’ with type ‘ENUM_ERR_t’ 9 | } ENUM_ERR_t; | ^~~~~~~~~~ And terminated with status: pid 174 exit 1

Shell executed command: gcc -fpack-struct -I"build/test/mocks/test_ModB" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/test/runners/test_ModB_runner.c" -o "build/test/out/test_ModB/test_ModB_runner.o" -MMD -MF "build/test/dependencies/test_ModB_runner.d" With $stdout: With $stderr: And terminated with status: pid 195 exit 0

Shell executed command: gcc -fpack-struct -I"build/test/mocks/test_ModA" -I"src" -I"build/vendor/unity/src" -I"build/vendor/cmock/src" -D"UNITY_INT_WIDTH=16" -D"CMOCK_MEM_INDEX_TYPE=uint16_t" -D"CMOCK_MEM_ALIGN=1" -D"CMOCK_MEM_SIZE=4096" -D"TEST" -D"TEST_GCC" -D"UNITY_EXCLUDE_FLOAT" -D"UNITY_USE_COMMAND_LINE_ARGS" -DGNU_COMPILER -g -c "build/test/mocks/test_ModA/build/test/mocks/test_ModA/mock_ModB.c" -o "build/test/out/test_ModA/mock_ModB.o" -MMD -MF "build/test/dependencies/mock_ModB.d" With $stdout: With $stderr: And terminated with status: pid 181 exit 0

🧨 EXCEPTION: 'Default Test Compiler' (gcc) terminated with exit code [1] and output >> In file included from build/test/mocks/test_ModA/mock_ModB.h:6, from build/test/runners/test_ModA_runner.c:12: build/test/mocks/test_ModA/ModB.h:10:5: error: redeclaration of enumerator ‘BSP_ERR’ 10 | BSP_ERR = 0U, | ^~~~~~~ In file included from src/ModA.h:4, from build/test/runners/test_ModA_runner.c:11: src/Modb.h:6:5: note: previous definition of ‘BSP_ERR’ with type ‘enum ’ 6 | BSP_ERR = 0U, | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:11:5: error: redeclaration of enumerator ‘HES_ERR’ 11 | HES_ERR, | ^~~~~~~ src/Modb.h:7:5: note: previous definition of ‘HES_ERR’ with type ‘enum ’ 7 | HES_ERR, | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:12:5: error: redeclaration of enumerator ‘DRV_ERR’ 12 | DRV_ERR | ^~~~~~~ src/Modb.h:8:5: note: previous definition of ‘DRV_ERR’ with type ‘enum ’ 8 | DRV_ERR | ^~~~~~~ build/test/mocks/test_ModA/ModB.h:13:3: error: conflicting types for ‘ENUM_ERR_t’; have ‘enum ’ 13 | } ENUM_ERR_t; | ^~~~~~~~~~ src/Modb.h:9:3: note: previous declaration of ‘ENUM_ERR_t’ with type ‘ENUM_ERR_t’ 9 | } ENUM_ERR_t; | ^~~~~~~~~~

Debug Backtrace ==> /usr/local/bundle/gems/ceedling-1.0.2/lib/ceedling/tool_executor.rb:95:in 'ToolExecutor#exec': (ShellException) /usr/local/bundle/gems/ceedling-1.0.2/lib/ceedling/generator.rb:169:in 'Generator#generate_object_file_c' /usr/local/bundle/gems/ceedling-1.0.2/lib/ceedling/test_invoker.rb:487:in 'TestInvoker#compile_test_component' /usr/local/bundle/gems/ceedling-1.0.2/lib/ceedling/test_invoker.rb:386:in 'block (2 levels) in TestInvoker#setup_and_invoke' /usr/local/bundle/gems/ceedling-1.0.2/lib/ceedling/batchinator.rb:57:in 'block (3 levels) in Batchinator#exec' /usr/local/lib/ruby/3.4.0/benchmark.rb:323:in 'Benchmark.realtime' /usr/local/bundle/gems/ceedling-1.0.2/lib/ceedling/batchinator.rb:57:in 'block (2 levels) in Batchinator#exec' /usr/local/bundle/gems/parallel-1.27.0/lib/parallel.rb:650:in 'Parallel.call_with_index' /usr/local/bundle/gems/parallel-1.27.0/lib/parallel.rb:441:in 'block (2 levels) in Parallel.work_in_threads' /usr/local/bundle/gems/parallel-1.27.0/lib/parallel.rb:660:in 'Parallel.with_instrumentation' /usr/local/bundle/gems/parallel-1.27.0/lib/parallel.rb:440:in 'block in Parallel.work_in_threads' /usr/local/bundle/gems/parallel-1.27.0/lib/parallel.rb:219:in 'block (4 levels) in Parallel.in_threads' 🌱 Ceedling could not complete operations because of errors Plugin | ReportTestsRawOutputLog > :post_error...

Running Raw Tests Output Report

Tests produced no extra console output.

JuPrgn avatar May 22 '25 11:05 JuPrgn

Hi,

Do you know why build/test/mocks/test_ModA/ModB.h both replicates the enum definition and includes the original ModB.h containing that same enum declaration?

JuPrgn avatar Aug 18 '25 08:08 JuPrgn