Re: [PATCH] Add pytest for a GCOV test-case

2021-01-15 Thread Martin Liška
On 1/15/21 1:28 PM, Rainer Orth wrote: Hi Martin, * 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. Done that. +be installed. Some optional tests also require Python3 and pytest module. It

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-15 Thread Rainer Orth
Hi Martin, * 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. >>> >>> Done that. >> +be installed. Some optional tests also require Python3 and pytest >> module. >> It would be bette

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-14 Thread Martin Liška
On 1/14/21 2:22 PM, Rainer Orth wrote: Hi Martin, * Besides, the test outcomes are not generic message facilities but are supposed to follow a common format: : [] with the pathname to the test relative to (in this case) gcc/testsuite. In this case, this might be something lik

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-14 Thread Rainer Orth
Hi Martin, >>> * 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. >> >> Done that. > > +be installed. Some optional tests also require Python3 and pytest module. > > It would be better to be

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-14 Thread Rainer Orth
Hi Martin, >> * Besides, the test outcomes are not generic message facilities but are >>supposed to follow a common format: >>: [] >>with the pathname to the test relative to (in this case) >>gcc/testsuite. In this case, this might be something like >>UNSUPPORTED: g++.dg/gco

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-14 Thread Martin Liška
On 1/13/21 2:38 PM, 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,

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-13 Thread Rainer Orth
Hi David, >> 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

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-13 Thread David Malcolm via Gcc-patches
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 update

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-13 Thread Rainer Orth
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

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-08 Thread Jeff Law via Gcc-patches
> > Ready for master? > Thanks, > Martin > > 0001-Add-pytest-for-a-GCOV-test-case.patch > > From 53f5169156044acf8ecec498aa89d6be44c7173a Mon Sep 17 00:00:00 2001 > From: Martin Liska > Date: Mon, 21 Dec 2020 09:14:28 +0100 > Subject: [PATCH] Add pytest for a GCOV test-c

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-07 Thread Martin Liška
e44c7173a Mon Sep 17 00:00:00 2001 From: Martin Liska Date: Mon, 21 Dec 2020 09:14:28 +0100 Subject: [PATCH] Add pytest for a GCOV test-case gcc/testsuite/ChangeLog: PR gcov-profile/98273 * lib/gcov.exp: Add run-gcov-pytest function which runs pytest. * g++.dg/gcov/pr98273.C: New test. * g++.dg

Re: [PATCH] Add pytest for a GCOV test-case

2021-01-05 Thread Jeff Law via Gcc-patches
On 12/23/20 6:03 AM, Martin Liška wrote: > At a high level, this patch calls out to Python 3, allowing for test >> logic to be written in Python, rather than Tcl.  Are we doing this >> anywhere else in our test suite? > > No. I'm surprised.  I thought we did this for some of David's work at some

Re: [PATCH] Add pytest for a GCOV test-case

2020-12-23 Thread Martin Liška
+expect { + -re "FAILED($prefix)\[^\r\n\]+\r\n" { + fail "$expect_out(1,string)" + exp_continue + } + -re "PASSED($prefix)\[^\r\n\]+\r\n" { + pass "$expect_out(1,string)" + exp_continue + } + } +} + # Calle

Re: [PATCH] Add pytest for a GCOV test-case

2020-12-22 Thread David Malcolm via Gcc-patches
On Tue, 2020-12-22 at 12:39 +0100, Martin Liška wrote: > Hello. > > The patch adds a new test for an existing GCOV test-case. Newly > added run-gcov-pytest parses JSON format produced by GCOV and > runs pytest on it. > > Patch can bootstrap on x86_64-linux-gnu and survives regression > tests. At

[PATCH] Add pytest for a GCOV test-case

2020-12-22 Thread Martin Liška
Hello. The patch adds a new test for an existing GCOV test-case. Newly added run-gcov-pytest parses JSON format produced by GCOV and runs pytest on it. Patch can bootstrap on x86_64-linux-gnu and survives regression tests. Ready to be installed? Thanks, Martin gcc/testsuite/ChangeLog: