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

refs #12274 - test/cli/proj2_test.py: made it location-independent / some cleanups #6636

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

firewave
Copy link
Collaborator

No description provided.

@firewave firewave changed the title refs #12274 - test/cli/proj_2_test.py: made it location-independent / some cleanups refs #12274 - test/cli/proj2_test.py: made it location-independent / some cleanups Jul 24, 2024
@firewave

This comment was marked as resolved.

@firewave firewave marked this pull request as draft July 24, 2024 08:55
@firewave

This comment was marked as resolved.

@firewave
Copy link
Collaborator Author

firewave commented Aug 4, 2024

There is still an issue that a Windows binary somehow reports an absolute path where a Linux one doesn't:

FAILED proj2_test.py::test_gui_project_loads_absolute_vs_solution_2 - AssertionError: assert 'D:\\a\\cppcheck\\cppcheck\\test\\cli\\proj2\\a\\a.c:1:7: error: Division by zero. [zerodiv]\nx = 3 / 0;\n      ^\nD:\\a\\cppcheck\\cppcheck\\test\\cli\\proj2\\b\\b.c:1:7: error: Division by zero. [zerodiv]\nx = 3 / 0;\n      ^\n' == 'a\\a.c:1:7: error: Division by zero. [zerodiv]\nx = 3 / 0;\n      ^\nb\\b.c:1:7: error: Division by zero. [zerodiv]\nx = 3 / 0;\n      ^\n'
  
  - a\a.c:1:7: error: Division by zero. [zerodiv]
  + D:\a\cppcheck\cppcheck\test\cli\proj2\a\a.c:1:7: error: Division by zero. [zerodiv]
    x = 3 / 0;
          ^
  - b\b.c:1:7: error: Division by zero. [zerodiv]
  + D:\a\cppcheck\cppcheck\test\cli\proj2\b\b.c:1:7: error: Division by zero. [zerodiv]
    x = 3 / 0;
          ^

@firewave
Copy link
Collaborator Author

firewave commented Aug 7, 2024

There is still an issue that a Windows binary somehow reports an absolute path where a Linux one doesn't:

This appears to be caused by Path::simplifyPath(). realFilename() within simplecpp does nothing on Linux but does a lot on Windows - but only if the file exists and the unit tests for those functions do not generate files.

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