Skip to content

Commit

Permalink
fix bsw-code-gen invocation
Browse files Browse the repository at this point in the history
  • Loading branch information
lmbsog0 committed Jan 28, 2024
1 parent d145a61 commit 3df7c2d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
12 changes: 6 additions & 6 deletions generated/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ add_custom_command(OUTPUT
${CMAKE_CURRENT_SOURCE_DIR}/CanTp_PBcfg.c
${CMAKE_CURRENT_SOURCE_DIR}/CanTp_PBcfg.h
DEPENDS ${CANTP_CONFIG_FILEPATH}
DEPENDS ${PROJECT_SOURCE_DIR}/script/header.h.jinja2
DEPENDS ${PROJECT_SOURCE_DIR}/script/source.c.jinja2
COMMAND ${PYTHON_EXECUTABLE} -m bsw_code_gen
-template_directory ${PROJECT_SOURCE_DIR}/script
DEPENDS ${PROJECT_SOURCE_DIR}/script/header_pb_cfg.h.jinja2
DEPENDS ${PROJECT_SOURCE_DIR}/script/source_pb_cfg.c.jinja2
COMMAND bsw_code_gen
${CANTP_CONFIG_FILEPATH}
${CMAKE_CURRENT_SOURCE_DIR}/CanTp_PBcfg.c
${CMAKE_CURRENT_SOURCE_DIR}/CanTp_PBcfg.h
-template_directory ${PROJECT_SOURCE_DIR}/script
-source_pb_cfg ${CMAKE_CURRENT_SOURCE_DIR}/CanTp_PBcfg.c
-header_pb_cfg ${CMAKE_CURRENT_SOURCE_DIR}/CanTp_PBcfg.h
COMMENT "generating post-build configuration header")

add_library(CanTp_PBcfg STATIC ${CMAKE_CURRENT_SOURCE_DIR}/CanTp_PBcfg.c)
Expand Down
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,14 +157,14 @@ def __init__(self,
self.can_tp_rx_data = list()
code_gen = BSWCodeGen(config, self.script_directory)
with open(os.path.join(self.build_directory, 'CanTp_PBcfg.h'), 'w') as fp:
fp.write(code_gen.header)
fp.write(code_gen.header_pb_cfg)
with open(os.path.join(self.build_directory, 'CanTp_PBcfg.c'), 'w') as fp:
fp.write(code_gen.source)
fp.write(code_gen.source_pb_cfg)
with open(self.header, 'r') as fp:
header = fp.read()
self.config = MockGen('_cffi_can_tp_pbcfg_{}'.format(config.get_id),
code_gen.source,
code_gen.header,
code_gen.source_pb_cfg,
code_gen.header_pb_cfg,
define_macros=tuple(self.compile_definitions),
include_dirs=tuple(self.include_directories + [self.build_directory]),
build_dir=self.build_directory)
Expand Down

0 comments on commit 3df7c2d

Please sign in to comment.