Re: make coverage-html would fail within build directory separate from source tree

From: walker <failaway(at)qq(dot)com>
To: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
Cc: pgsql-hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: make coverage-html would fail within build directory separate from source tree
Date: 2021-03-04 14:00:11
Message-ID: tencent_3F0B3FA3A4F0C54D424B2DBC75B449FCFD0A@qq.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

thanks for your reply. it indeed that there are no .gcon files in source tree directory, they're in build tree directory, which results in failures.

That's a bit wired.

Add more detailed testing steps:
mkdir build_dir
cd build_dir
/home/postgres/postgresql-13.2/configure -- enable-coverage
make
make check
make coverage-html

thanks
walker

------------------&nbsp;Original&nbsp;------------------
From: "Alvaro Herrera" <alvherre(at)alvh(dot)no-ip(dot)org&gt;;
Date:&nbsp;Thu, Mar 4, 2021 09:31 PM
To:&nbsp;"walker"<failaway(at)qq(dot)com&gt;;
Cc:&nbsp;"pgsql-hackers"<pgsql-hackers(at)lists(dot)postgresql(dot)org&gt;;
Subject:&nbsp;Re: make coverage-html would fail within build directory separate from source tree

On 2021-Mar-04, walker wrote:

&gt; Hi, hackers
&gt;
&gt; During installation from source code, I created a build directory separate from the source tree, and execute the following command in the build directory:
&gt; /home/postgres/postgresql-13.2/configure -- enable-coverage
&gt; make
&gt; make check
&gt; make coverage-html
&gt;
&gt;
&gt; However, while executing make coverage-html, it failed with the following error messages:
&gt; /bin/lcov --gcov-tool /bin/gcov -q --no-external -c -i -d . -d /home/postgres/postgresql-13.2/ -o lcve_base.info
&gt; ...
&gt; geninfo: ERROR: no .gcno files found in /home/postgres/postgresql-13.2/!
&gt; make: *** [lcov_base.info] Error 255
&gt; make: *** Deleting file 'lcov_base.info'

Hmm, it works fine for me.&nbsp; config.log says I do this (in
/pgsql/build/master-coverage):

&nbsp; $ /pgsql/source/REL_13_STABLE/configure --enable-debug --enable-depend --enable-cassert --enable-coverage --cache-file=/home/alvherre/run/pgconfig.master-coverage.cache --enable-thread-safety --enable-tap-tests --with-python --with-perl --with-tcl --with-openssl --with-libxml --with-tclconfig=/usr/lib/tcl8.6 PYTHON=/usr/bin/python3 --prefix=/pgsql/install/master-coverage --with-pgport=55451

I do run "make install" too, though (and "make -C contrib install").
Not sure if that makes a difference.&nbsp;
But for sure there are no .gcno files in the source dir -- they're all
in the build dir.

--
Álvaro Herrera&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Valdivia, Chile
"La persona que no quería pecar / estaba obligada a sentarse
&nbsp;en duras y empinadas sillas&nbsp;&nbsp;&nbsp; / desprovistas, por cierto
&nbsp;de blandos atenuantes"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (Patricio Vogel)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2021-03-04 14:05:55 Re: make coverage-html would fail within build directory separate from source tree
Previous Message Tomas Vondra 2021-03-04 13:59:09 Re: Increase value of OUTER_VAR