Page MenuHomePhabricator

[CI] Generate coverage reports for cashtab
ClosedPublic

Authored by Fabien on Thu, Jan 7, 20:12.

Details

Reviewers
majcosta
Group Reviewers
Restricted Project
Commits
rABCb56c6036cd0b: [CI] Generate coverage reports for cashtab
Summary

This diff adds coverage statistics to teamcity, and create an lcov html
report in the teamcity coverage report tab. Next step is the build
status panel integration.

Depends on D8842.

Test Plan
./contrib/teamcity/build-configurations.py cashtab-tests

Check this creates an abc-ci-builds/cashtab-tests/coverage.tar.gz
archive and prints out teamcity statistics commands.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien requested review of this revision.Thu, Jan 7, 20:12

got this when running ./contrib/teamcity/build-configurations.py cashtab-tests

[marco@marco-pc bitcoin-abc]$ cat /home/marco/.npm/_logs/2021-01-08T00_11_48_041Z-debug.log 
0 info it worked if it ends with ok
1 verbose cli [
1 verbose cli   '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'run',
1 verbose cli   'test',
1 verbose cli   '--coverage',
1 verbose cli   '--',
1 verbose cli   '--reporters=jest-junit',
1 verbose cli   '--coverageReporters=text',
1 verbose cli   '--coverageReporters=lcov',
1 verbose cli   '--coverageReporters=teamcity'
1 verbose cli ]
2 info using npm@6.14.10
3 info using node@v15.5.1
4 verbose run-script [ 'pretest', 'test', 'posttest' ]
5 info lifecycle cashtab@0.1.8~pretest: cashtab@0.1.8
6 info lifecycle cashtab@0.1.8~test: cashtab@0.1.8
7 verbose lifecycle cashtab@0.1.8~test: unsafe-perm in lifecycle true
8 verbose lifecycle cashtab@0.1.8~test: PATH: /usr/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/home/marco/dev/bitcoin-abc/web/cashtab/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/lib/jvm/default/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/marco/bin:/home/marco/apps/bitcoin-abc-0.22.6/bin:/home/marco/apps/flutter/bin:/home/marco/.npm-packages/bin:/home/marco/.gem/ruby/2.7.0/bin:/home/marco/apps/WeiDU-Linux:/home/marco/.npm-packages/bin:/home/marco/.gem/ruby/2.7.0/bin:/home/marco/apps/WeiDU-Linux
9 verbose lifecycle cashtab@0.1.8~test: CWD: /home/marco/dev/bitcoin-abc/web/cashtab
10 silly lifecycle cashtab@0.1.8~test: Args: [
10 silly lifecycle   '-c',
10 silly lifecycle   'node scripts/test.js "--reporters=jest-junit" "--coverageReporters=text" "--coverageReporters=lcov" "--coverageReporters=teamcity"'
10 silly lifecycle ]
11 silly lifecycle cashtab@0.1.8~test: Returned: code: 1  signal: null
12 info lifecycle cashtab@0.1.8~test: Failed to exec test script
13 verbose stack Error: cashtab@0.1.8 test: `node scripts/test.js "--reporters=jest-junit" "--coverageReporters=text" "--coverageReporters=lcov" "--coverageReporters=teamcity"`
13 verbose stack Exit status 1
13 verbose stack     at EventEmitter.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:332:16)
13 verbose stack     at EventEmitter.emit (node:events:376:20)
13 verbose stack     at ChildProcess.<anonymous> (/usr/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
13 verbose stack     at ChildProcess.emit (node:events:376:20)
13 verbose stack     at maybeClose (node:internal/child_process:1063:16)
13 verbose stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:295:5)
14 verbose pkgid cashtab@0.1.8
15 verbose cwd /home/marco/dev/bitcoin-abc/web/cashtab
16 verbose Linux 5.10.3-arch1-1
17 verbose argv "/usr/bin/node" "/usr/bin/npm" "run" "test" "--coverage" "--" "--reporters=jest-junit" "--coverageReporters=text" "--coverageReporters=lcov" "--coverageReporters=teamcity"
18 verbose node v15.5.1
19 verbose npm  v6.14.10
20 error code ELIFECYCLE
21 error errno 1
22 error cashtab@0.1.8 test: `node scripts/test.js "--reporters=jest-junit" "--coverageReporters=text" "--coverageReporters=lcov" "--coverageReporters=teamcity"`
22 error Exit status 1
23 error Failed at the cashtab@0.1.8 test script.
23 error This is probably not a problem with npm. There is likely additional logging output above.
24 verbose exit [ 1, true ]
majcosta requested changes to this revision.Fri, Jan 8, 00:35
This revision now requires changes to proceed.Fri, Jan 8, 00:35
This revision is now accepted and ready to land.Fri, Jan 8, 09:17
This revision was automatically updated to reflect the committed changes.