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

Michaelrfairhurst/fix autosar a1 1 2 detect -w flag test workaround #696

Conversation

MichaelRFairhurst
Copy link
Contributor

Description

This draft PR is a copy of #688, demonstrating a possible workaround to pass unit tests and matrix tests with the correct behavior around the -w flag.

Gcc may be compiled to auto include warnings such as -Wformat. However,
passing in `-w` will suppress the enabled format warnings. The previous
query would not raise an issue, as it saw the `-Wformat` flag etc, even
though if `-w` was present, causing gcc to run with no warnings enabled.
@MichaelRFairhurst
Copy link
Contributor Author

Confirmed that this passes gcc and clang matrix testing.

Both of the following commands:

pwsh scripts/matrix_testing/CreateMatrixTestReport.ps1 -Configuration gcc -Rule -RuleName "A1-1-2"
# and
pwsh scripts/matrix_testing/CreateMatrixTestReport.ps1 -Configuration clang -Rule -RuleName "A1-1-2"

produce the following csv:

"PACKAGE","TEST_PASS","COMPILE_ERROR_OUTPUT","COMPILE_PASS","RULE","QUERY","SUITE","TEST_DIFFERENCE"
"Toolchain","True","","True","A1-1-2","CompilerWarningLevelNotInCompliance","AUTOSAR",""
"Toolchain","True","","True","A1-1-2","CompilerWarningLevelNotInCompliance","AUTOSAR",""
"Toolchain","True","","True","A1-1-2","CompilerWarningLevelNotInCompliance","AUTOSAR",""
"Toolchain","True","","True","A1-1-2","CompilerWarningLevelNotInCompliance","AUTOSAR",""

(note that the four rows correspond to the directories A1-1-2, A1-1-2.1, A1-1-2.2, and A1-1-2.3).

@MichaelRFairhurst
Copy link
Contributor Author

@lcartey What do you think? This seems like technical debt, albeit a working solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant