This addresses only pg_regress. What about all the other test suites? Per the previous discussions, you'd need to patch up other places in a similar way, potentially everywhere system() is called.
Are there instructions for how I can run these other test suites? The installation notes that Julien linked, and the Postgres wiki Developer FAQ [1] only seem to mention "make check". I would be happy to try to fix other tests on Mac OS X.