Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: extra_args from sanitycheck *.yaml do not propogate to cmake #24178

Closed
finikorg opened this issue Apr 8, 2020 · 3 comments · Fixed by #24288 or #24330
Closed

CI: extra_args from sanitycheck *.yaml do not propogate to cmake #24178

finikorg opened this issue Apr 8, 2020 · 3 comments · Fixed by #24288 or #24330
Assignees
Labels
area: Sanitycheck Sanitycheck has been renamed to Twister area: West West utility bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@finikorg
Copy link
Collaborator

finikorg commented Apr 8, 2020

extra_args from *.yaml do not go to the build system.

Reproduce
extra_args: "-DDEBUG_PRINTF=1" from samples/philosophers/sample.yaml is lost.

$ sanitycheck -c -M -p native_posix --test samples/philosophers/sample.kernel.philosopher

Output:

...
CMake Warning:
  Manually-specified variables were not used by the project:

    -DDEBUG_PRINTF
...

and

DEBUG   - Calling cmake with arguments: ['-B/home/niko/work/zephyrproject/sanity-out/native_posix/samples/philosophers/sample.kernel.philosopher', '-S/home/niko/work/zephyrproject/zephyr/samples/philosophers', '-DEXTRA_CFLAGS="-Werror ', '-DEXTRA_AFLAGS=-Wa,--fatal-warnings', '-DEXTRA_LDFLAGS="-Wl,--fatal-warnings', '-GUnix Makefiles', '-D-DDEBUG_PRINTF=1', '-DBOARD=native_posix']
@finikorg finikorg added bug The issue is a bug, or the PR is fixing a bug area: West West utility area: Sanitycheck Sanitycheck has been renamed to Twister labels Apr 8, 2020
@mbolivar-nordic
Copy link
Contributor

I don't think I'm the right assignee.

@mbolivar-nordic mbolivar-nordic removed their assignment Apr 8, 2020
@carlescufi carlescufi added the priority: medium Medium impact/importance bug label Apr 8, 2020
@nashif
Copy link
Member

nashif commented Apr 11, 2020

so, this is not an issue in sanitycheck or west.. The fact that cmake reports about the variable means it was passed correctly to the sample.
Looks like cmake has no idea what to with this and some additional handling is needed in the cmake file, fixed for this sample. If we do not want this to go through cmake then i think we should add

-DEXTRA_CFLAGS="-DDEBUG_PRINTF=1"

instead, not sure yet.

nashif added a commit to nashif/zephyr that referenced this issue Apr 12, 2020
The variables passed by sanitycheck and west were being ignored because
cmake knows nothing about them.

Fixes zephyrproject-rtos#24178

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
nashif added a commit that referenced this issue Apr 12, 2020
The variables passed by sanitycheck and west were being ignored because
cmake knows nothing about them.

Fixes #24178

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
@finikorg
Copy link
Collaborator Author

We can keep this bug to handle also other parameters in extra_args.

avisconti pushed a commit to avisconti/zephyr that referenced this issue Apr 15, 2020
The variables passed by sanitycheck and west were being ignored because
cmake knows nothing about them.

Fixes zephyrproject-rtos#24178

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
hakehuang pushed a commit to hakehuang/zephyr that referenced this issue Jun 20, 2020
The variables passed by sanitycheck and west were being ignored because
cmake knows nothing about them.

Fixes zephyrproject-rtos#24178

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sanitycheck Sanitycheck has been renamed to Twister area: West West utility bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
5 participants