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

Fix wrong relative paths in subninjas and fix tests #19

Closed
wants to merge 1 commit into from

Conversation

annagrram
Copy link

When projects have a different location than the workspace, it breaks ninja as the relative paths in the subninjas are relative to the subninja and not the build directory (ninja-build/ninja#977).

Also, some tests were broken (at least on Linux).

If you prefer to split it to 2 pull requests, let me know.

Not tested on non-Linux setups.

@Jarod42 Jarod42 force-pushed the master branch 7 times, most recently from 785742a to ad5ce2d Compare April 24, 2023 12:39
@@ -133,7 +133,8 @@ def exe(self, path):
if os.path.exists(path):
current_cwd = os.getcwd()
os.chdir(self.build_dir)
subprocess.check_call([os.path.relpath(path, self.build_dir)])
executable = os.path.relpath(path, self.build_dir)
subprocess.check_call([executable], env={'LD_LIBRARY_PATH': os.path.dirname(executable)})
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Applied that part (+ DYLD_LIBRARY_PATH for macos).

@@ -29,7 +29,7 @@ project "ninjatestprj_app"
defines {"NDEBUG"}
optimize "On"

project "ninjatestprj_lib test1"
project "ninjatestprj_lib_test1"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be seen as typo, but handling of space in project in now supported by this module.

@Jarod42
Copy link
Collaborator

Jarod42 commented May 1, 2023

Fixed by 5729cbe

@Jarod42 Jarod42 closed this May 1, 2023
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.

None yet

2 participants