<blockquote>
<p>Sorry for misunderstanding. I can reproduce only when calling from build folder without ctest:</p>

<pre><code> ./tests/test-output-pgsql-tablespace 
</code></pre>
</blockquote>

<p>It's important to be able to do this, otherwise it's a huge pain to attach a debugger to the process.</p>

<p>This was also with <code>tests/test-output-pgsql</code>, but the problem probably applies to any tests that use default.style</p>

<p>Perhaps as part of the build process we could copy default.style to the build directory?</p>

<blockquote>
<p>However, I am not sure if osm2pgsql_SOURCE_DIR is set correctly on old cmake. Which version do you use?</p>
</blockquote>

<p>My testing VM has 2.8.12.2.</p>

<p>Doing a full <code>git clean -xfd && git reset --hard HEAD</code> fixed this particular test failing in ctest, but we still need to be able to run a single test in isolation.</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/issues/490#issuecomment-153141576">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AD2-7qGbAJr2hFLGmNEf7OiXpZPe4-k8ks5pB7lHgaJpZM4GZqZC.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/issues/490#issuecomment-153141576"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>