<p>I don't think changing the working directory is a good idea in general because it might have unintended side effects, for example, when temporary files are created. So I would prefer to hand in the test directory during compile time and use absolute paths for all files inside the tests.</p>
<p>The other thing this PR (and also <a href="https://github.com/openstreetmap/osm2pgsql/pull/497" class="issue-link" title="Drop custom o5m parser in favour of libosmium parser">#497</a>) shows is that the tests urgently need a test framework. This may be as little as a home-grown base test class all the tests inherit from or it may be an external test library. The gist is that a change like this should certainly not have to touch every single source file in tests/.</p>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/openstreetmap/osm2pgsql/pull/496#issuecomment-154711196">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AD2-7roxH53tMvtUPAFH4NhR4u65HRrMks5pDgQxgaJpZM4Gcax_.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
<link itemprop="url" href="https://github.com/openstreetmap/osm2pgsql/pull/496#issuecomment-154711196"></link>
<meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>