On Wed, 2021-01-13 at 14:38 +0100, Rainer Orth wrote:
> Hi Martin,
> 
> > On 1/6/21 12:36 AM, Jeff Law wrote:
> > > unresolved "could not find python interpreter $testcase" in
> > > run-gcov-pytest if you find the right magic in the output of your
> > > spawn.
> > 
> > Achieved that with the updated patch.
> > 
> > Ready for master?
> 
> unfortunately, your patch has a large number of problems:
> 
> * On targets where run-gcov-pytest decides that pytest isn't
> available
>   (incorrectly in some cases), mail-report.log is cluttered with
> 
> UNRESOLVED: could not find Python interpreter and (or) pytest module
> for pr98273.C
> 
>   I fear you've been misled by David and Jeff here: UNRESOLVED isn't
>   appropriate for cases like this.  Please read the DejaGnu manual
> for
>   the semantics of the various test outcomes.  If anything (we often
>   just silently skip testcases that cannot be run on some target),
> use
>   UNSUPPORTED instead.

This may be lack of sleep on my part, but looking back at the emails, I
said that this case should be "UNSUPPORTED", but it looks like Martin
misread it as "UNRESOLVED", and I didn't correct him.  Sorry.

> * Besides, the test outcomes are not generic message facilities but
> are
>   supposed to follow a common format:
> 
>   <result>: <testname> [<subtest>]
> 
>   with <testname> the pathname to the test relative to (in this case)
>   gcc/testsuite.  In this case, this might be something like
> 
>   UNSUPPORTED: g++.dg/gcov/pr98273.C run-gcov-pytest
> 
>   Currently, you don't have the pathname in run-gcov-pytest, though.
> 
> * If we now have an (even optional) dependency on python/pytest, this
>   (with the exact versions and use) needs to be documented in
>   install.texi.

Agreed.

[...snip various other issues...]

> 
>   On top of all this, I wonder why you insist on a particular Python
>   version here: I tried your single testcase and it PASSes just as
> well
>   with Python 2.7!?  One reason I'm asking is that Solaris 11.3
> bundles
>   both Python 2.7 and 3.4, but (unlike Linux and Solaris 11.4) don't
>   have /usr/bin/python3, just python (which is 2.7), python2.7, and
>   python3.4.  Not that it matters too much, but you should be aware
> of
>   the issue.

In particular, given the differences between Python 2 and Python 3 I
think it's a good idea to be explicit about the versions of Python that
we expect i.e. are such tests coded to the common subset of Python 2
and 3, or just to Python 3?  Given that they're intended to be
optional, I suggest just Python 3.  (I would like to be able to add
other Python-based scripts to the DejaGnu suite e.g. to verify JSON
output, hence I'd prefer to not have to maintain Python 2
compatibility)

[...snip...]

Dave

Reply via email to