Skip to content
This repository has been archived by the owner on Apr 20, 2023. It is now read-only.

Failure in the gcov processing find command, whose test is AWOL #247

Closed
fish2000 opened this issue Apr 8, 2020 · 4 comments
Closed

Failure in the gcov processing find command, whose test is AWOL #247

fish2000 opened this issue Apr 8, 2020 · 4 comments

Comments

@fish2000
Copy link

fish2000 commented Apr 8, 2020

The gcov processing command issued by codecov contains malformed find predicates, and always fails. The failure looks like this:

Screen Shot 2020-04-08 at 1 45 10 AM

… this is on macOS, which offers BSD find as the default. I verified the failure by installing GNU findutils with Homebrew and changing a local clone of codecov to use that (as /usr/local/bin/gfind) – the error message is slightly more helpful:

`/usr/local/bin/gfind /Users/fish/Dropbox/CLU/clu -not -path './bower_components/**' -not -path './node_modules/**' -not -path './vendor/**' -type f -name *.gcno  -exec gcov -pb  {} +` exited with status 1, error: “gfind: paths must precede expression: `'

… the relevant gcov-related test is, I think, the only test in the codecov suite that is completely commented out and skipped:

    def test_gcov(self):
        self.skipTest("Need to fix this test...")
        # if self._env.get('TRAVIS') == 'true':
        #     self.write_c()
        #     output = self.run_cli(token='a', branch='b', commit='c')
        #     self.assertEqual(os.path.exists('hello.c.gcov'), True)
        #     report = output['reports'].split('<<<<<< network\n')[1].splitlines()
        #     self.assertIn('hello.c.gcov', report[0])
        # else:
        #     self.skipTest("Skipped, works on Travis only.")

… which suggests at least an acknowledgement of the problem, if not a genesis of same.

fish2000 added a commit to fish2000/codecov-python that referenced this issue Apr 8, 2020
This change fixes two related sub-problems:

1) The `gcov` processing command’s predicate parameters work with
   both BSD and GNU `find` out-of-the-box; and
2) The test for `gcov` processing has been restored to something
   that should work on both local clones and CI test runs.
fish2000 added a commit to fish2000/codecov-python that referenced this issue Apr 8, 2020
This change fixes two related sub-problems:

1) The `gcov` processing command’s predicate parameters work with
   both BSD and GNU `find` out-of-the-box; and
2) The test for `gcov` processing has been restored to something
   that should work on both local clones and CI test runs.

A global TRAVIS variable has been added to “codecov/__init__.py”
as a module-level constant.
@Luttik
Copy link

Luttik commented Apr 13, 2020

I also have the gcov find issue on github actions.

@sineverba
Copy link

I can confirm this bug and with v2.0.15 it works. Related also to this issue: #249.

@nmoinvaz
Copy link
Contributor

In PR #217 I have replaced the calls to find with a python function that does the same thing.

@thomasrockhu
Copy link
Contributor

We recently released 2.1.3 which pulls in #217.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants