The test was failing for two reasons on macOS:
1. The build info directory was not created during the test.
2. Temporary directories are created with symbolic links on macOS and
the path canonicalization returns the given path if it doesn't exist.
This lead to a mismatch between the project root's canonical path (which
did exist and thus was a real path after canonicalization) and the build
info directory's canonical path (which did not exist and was a symbolic
link after canonicalization).
The fix is to create the build info directory to make sure its canonical
path matches the project root's canonical path.