Skip to content

Import marco's report tool #235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 151 commits into from
Oct 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
151 commits
Select commit Hold shift + click to select a range
b52837e
First commit
marco-c Mar 17, 2017
60bc7d0
Add basic README
marco-c Mar 17, 2017
b331d0e
Remove now useless code
marco-c Mar 17, 2017
899f714
Fix the signature of get_report
jgraham Mar 17, 2017
8b141ed
Merge pull request #3 from jgraham/signature_fixup
marco-c Mar 17, 2017
02839f8
Add an option to skip downloading or processing files.
jgraham Mar 17, 2017
6793074
Merge pull request #2 from jgraham/skip_processing
marco-c Mar 17, 2017
d0e07f5
Download code coverage artifacts also if branch and commit are the de…
marco-c Apr 27, 2017
69f3a61
Add some basic tests
marco-c Apr 27, 2017
8563068
Run tests on Travis
marco-c Apr 27, 2017
b173803
Test both Python 2.7 and 3.5
marco-c Apr 27, 2017
9c9d921
Fix flake8 issues
marco-c Apr 27, 2017
ff764b7
Create ccov-artifacts if it doesn't exist
marco-c Apr 27, 2017
1d60497
Ignore error only if directory already exists
marco-c Apr 27, 2017
98a87f1
Import errno
marco-c Apr 27, 2017
1ed0311
Merge pull request #9 from marco-c/add_tests
marco-c Apr 27, 2017
9cc61eb
Add .gitignore
marco-c Apr 27, 2017
cf824d4
Cache pip directory
marco-c Apr 27, 2017
90cc3e5
Use urllib instead of the requests package
marco-c Apr 27, 2017
e12b2e1
Remove 'requests' from requirements. Fixes #6
marco-c Apr 27, 2017
9be8a5c
Use MH_BRANCH and GECKO_HEAD_REV environment variables when they are …
marco-c Apr 27, 2017
108e37d
Add gcc used during the build to the path when run on a one-click loa…
marco-c Apr 27, 2017
61b938c
Support filtering artifacts by test suite. Fixes #1
marco-c Apr 28, 2017
e1bc0a4
Add unit test for suite_name_from_task_name
marco-c Apr 28, 2017
c583d0a
Fix flake8 issue
marco-c Apr 28, 2017
1c5e850
Actually call function that has to be tested
marco-c Apr 28, 2017
4e545a9
Auomatically download grcov. Fixes #5
marco-c Apr 28, 2017
74c3612
Add basic test for grcov downloading
marco-c Apr 28, 2017
822062f
Merge pull request #10 from marco-c/use_urllib_instead_of_requests
marco-c Apr 28, 2017
0eb0372
Merge branch 'master' of github.com:marco-c/firefox-code-coverage int…
marco-c Apr 28, 2017
085aec8
Merge pull request #11 from marco-c/use_oneclickloaner_env_variables
marco-c Apr 28, 2017
de77f27
Use 'ignore_errors' parameter for ignoring errors in shutil.rmtree
marco-c Apr 28, 2017
938c171
Simplify code to filter tasks
marco-c Apr 28, 2017
3c93244
Merge branch 'master' of github.com:marco-c/firefox-code-coverage int…
marco-c Apr 28, 2017
6dd48b3
Print warning when a suite couldn't be found
marco-c Apr 28, 2017
b5a5879
Merge pull request #13 from marco-c/support_filtering_by_test_suite
marco-c Apr 28, 2017
3612d1f
Merge branch 'master' of github.com:marco-c/firefox-code-coverage int…
marco-c Apr 28, 2017
4dc9c8a
Download standalone version of grcov, to avoid issues with old libc v…
marco-c Apr 28, 2017
4ae6df8
Test download_grcov more thoroughly
marco-c Apr 28, 2017
86f5925
Merge pull request #14 from marco-c/download_grcov
marco-c Apr 28, 2017
62ac15c
Merge branch 'master' of github.com:marco-c/firefox-code-coverage int…
marco-c Apr 28, 2017
5d4f800
Small refactoring using one_click_loaner_gcc variable
marco-c Apr 28, 2017
39016d3
Also wait if the directory is empty
marco-c Apr 28, 2017
f133d20
Fix flake8 issues
marco-c Apr 28, 2017
27dfcba
Merge pull request #12 from marco-c/oneclickloaner_gcc
marco-c Apr 28, 2017
c920ce7
Don't assume grcov is installed globally
marco-c Apr 28, 2017
e8474d0
Basic tests for other codecoverage.py functions
marco-c Apr 28, 2017
97b2b18
Install lcov (for genhtml)
marco-c Apr 28, 2017
694ad7f
Cleanup after tests
marco-c Apr 28, 2017
c2a003c
Install and use GCC 6
marco-c Apr 28, 2017
132f062
Merge pull request #15 from marco-c/more_tests
marco-c Apr 29, 2017
6d72673
Don't fail when the suite argument is undefined
marco-c May 5, 2017
4aaa082
No need to add ~/.local/bin to the path
marco-c May 5, 2017
b698934
Set default src_dir when running on a one-click loaner. Fixes #16
marco-c May 6, 2017
19d1e35
Install genhtml in a subfolder. Fixes #17
marco-c May 6, 2017
955b54c
Add basic test for download_genhtml
marco-c May 6, 2017
2b2b5ae
Don't download and install genhtml manually as part of the Travis build
marco-c May 6, 2017
58c274f
Add missing download_genhtml call
marco-c May 6, 2017
0f51105
Merge pull request #18 from marco-c/loaner_default_src_dir
marco-c May 9, 2017
fb5398b
Merge pull request #19 from marco-c/loaner_genhtml
marco-c May 9, 2017
4a813c8
Fix prefix-dir argument name
marco-c May 31, 2017
5c8bc65
'-z' grcov parameter is no longer needed
marco-c Jun 16, 2017
5a9c01b
Rename ccov build from opt to debug. Fixes #22
marco-c May 22, 2018
9e4c7e5
Update artifact names
marco-c May 22, 2018
6706212
Download normal Linux grcov build instead of the standalone one (the …
marco-c May 22, 2018
fe56213
Don't download gcno file anymore, as it's not needed
marco-c May 22, 2018
c116adf
Don't wait 60 seconds before checking grcov's return code
marco-c May 22, 2018
9daa399
Add setup.py (#25)
rhcu May 29, 2018
1153691
changed name (#26)
rhcu May 29, 2018
5b1edf1
Add test for installing the package (#31)
rhcu May 30, 2018
0eb44a4
Allow callers to decide the grcov's output format (#32)
rhcu May 31, 2018
31514e5
Add more flake8 plugins (#34)
rhcu May 31, 2018
790eb08
Add option to ignore suites (#36)
rhcu Jun 8, 2018
a720ce6
Use --with-artifacts instead of --no-download (#37)
rhcu Jun 15, 2018
5903b6e
Use a GitHub access token for retrieving the list of grcov releases (…
marco-c Jun 18, 2018
71e36c4
Add optional output directory to generate_html_report (#40)
rhcu Jun 19, 2018
9ff2453
Don't download an artifact again if it was already downloaded
marco-c Jun 30, 2018
5cb74d7
Retry when an artifact download fails
marco-c Jun 30, 2018
a15d333
Add an option to generate only high-level stats instead of a full HTM…
marco-c Jun 30, 2018
995b89d
Remove --no-grcov option
marco-c Jun 30, 2018
65c3bdd
Always download artifacts, use with_artifacts just as the output dire…
marco-c Jul 1, 2018
9e82d1e
No longer need to retrieve artifacts of the build
marco-c Jul 1, 2018
d0d1992
Remove unused module
marco-c Jul 1, 2018
f23c9e7
Support downloading artifacts from Windows ccov build too. Fixes #21
marco-c Jul 1, 2018
c2c26d9
Print progress while downloading artifacts. Fixes #20
marco-c Jul 1, 2018
d5163d8
Fix bug when a suite is selected
marco-c Jul 2, 2018
309fe4a
Update tests with the new parameters and with support for Windows
marco-c Jul 2, 2018
3d9efa0
Speed up tests
marco-c Jul 2, 2018
e88d94e
Only use one grcov artifact for the test
marco-c Jul 2, 2018
5ac08eb
Add option to choose platform
marco-c Jul 2, 2018
d3a95ac
Add missing newline to please flake8
marco-c Jul 2, 2018
3433477
Add option to use existing CSS style file (#41)
rhcu Jul 4, 2018
a7c6731
Choose the task with the best status if there are retriggers (#43)
rhcu Jul 9, 2018
a85301b
Take into account filters (suite and platform) also when the artifact…
marco-c Jul 10, 2018
2a6504a
Merge pull request #44 from marco-c/filter_with_artifacts
rhcu Jul 11, 2018
9ad6c37
No need to create lcov-bin directory, it's created automatically by make
marco-c Jul 18, 2018
e907316
Add license to setup.py
marco-c Jul 27, 2018
3c70be1
Move module in a canonical location (#45)
marco-c Jul 31, 2018
cc386da
Remove use of prefix in genhtml (#47)
rhcu Aug 6, 2018
06e2438
Pin all dependencies (#50)
pyup-bot Aug 28, 2018
d85c755
Update flake8-coding from 1.3.0 to 1.3.1 (#51)
pyup-bot Sep 9, 2018
177d953
Fix error message
marco-c Sep 11, 2018
410b633
Update setuptools from 40.2.0 to 40.3.0 (#52)
pyup-bot Sep 16, 2018
673b1a2
Update setuptools from 40.3.0 to 40.4.0 (#53)
pyup-bot Sep 18, 2018
3600fae
Update setuptools from 40.4.0 to 40.4.1 (#54)
pyup-bot Sep 18, 2018
4205e97
Update setuptools from 40.4.1 to 40.4.2 (#55)
pyup-bot Sep 21, 2018
10f64dc
Update setuptools from 40.4.2 to 40.4.3 (#56)
pyup-bot Sep 23, 2018
bd6f0fb
Update wheel from 0.31.1 to 0.32.0 (#57)
pyup-bot Sep 30, 2018
24901a7
Update wheel from 0.32.0 to 0.32.1 (#58)
pyup-bot Oct 4, 2018
0ad94dc
Update flake8-copyright from 0.2.0 to 0.2.2 (#60)
pyup-bot Oct 10, 2018
6fe606e
Update wheel from 0.32.1 to 0.32.2 (#62)
pyup-bot Oct 21, 2018
57d190c
Update flake8 from 3.5.0 to 3.6.0 (#63)
pyup-bot Oct 24, 2018
8d75b48
Update setuptools from 40.4.3 to 40.5.0 (#64)
pyup-bot Oct 26, 2018
f230ae3
Update setuptools from 40.5.0 to 40.6.1 (#66)
pyup-bot Nov 13, 2018
274f8ae
Update setuptools from 40.6.1 to 40.6.2 (#67)
pyup-bot Nov 13, 2018
e740e07
Update wheel from 0.32.2 to 0.32.3 (#68)
pyup-bot Nov 19, 2018
65d85ce
Update flake8-isort from 2.5 to 2.6.0 (#69)
pyup-bot Dec 3, 2018
d378786
Update setuptools from 40.6.2 to 40.6.3 (#70)
pyup-bot Dec 11, 2018
b664e6c
Update setuptools from 40.6.3 to 40.7.0 (#71)
pyup-bot Jan 27, 2019
eda7f58
Update setuptools from 40.7.0 to 40.7.1 (#72)
pyup-bot Jan 29, 2019
833ff5f
Update flake8 from 3.6.0 to 3.7.1 (#73)
pyup-bot Jan 30, 2019
637889e
Update flake8 from 3.7.1 to 3.7.3 (#74)
pyup-bot Feb 1, 2019
cea6db2
Update setuptools from 40.7.1 to 40.7.2 (#75)
pyup-bot Feb 1, 2019
2b2bafb
Update flake8 from 3.7.3 to 3.7.4 (#76)
pyup-bot Feb 1, 2019
7b36018
Update setuptools from 40.7.2 to 40.7.3 (#77)
pyup-bot Feb 3, 2019
aaa0354
Update flake8 from 3.7.4 to 3.7.5 (#78)
pyup-bot Feb 5, 2019
8daf4bc
Update setuptools from 40.7.3 to 40.8.0 (#79)
pyup-bot Feb 7, 2019
99c8991
Update wheel from 0.32.3 to 0.33.0 (#80)
pyup-bot Feb 13, 2019
34d779c
Update flake8 from 3.7.5 to 3.7.6 (#81)
pyup-bot Feb 19, 2019
e8596fc
Update wheel from 0.33.0 to 0.33.1 (#82)
pyup-bot Feb 20, 2019
781a78d
Update flake8-isort from 2.6.0 to 2.7.0 (#83)
pyup-bot Mar 20, 2019
445da82
Update setuptools from 40.8.0 to 40.9.0 (#84)
pyup-bot Apr 3, 2019
7f39b7a
Update setuptools from 40.9.0 to 41.0.0 (#85)
pyup-bot Apr 5, 2019
9392680
Update setuptools from 41.0.0 to 41.0.1 (#87)
pyup-bot Apr 23, 2019
da94890
Update wheel from 0.33.1 to 0.33.2 (#89)
pyup-bot May 9, 2019
b8cf824
Update wheel from 0.33.2 to 0.33.4 (#91)
pyup-bot May 12, 2019
edc09d2
Update flake8-coding from 1.3.1 to 1.3.2 (#92)
pyup-bot Jun 17, 2019
e069c97
Update flake8 from 3.7.6 to 3.7.8 (#93)
pyup-bot Jul 22, 2019
10e91e7
Update wheel from 0.33.4 to 0.33.6 (#99)
pyup-bot Sep 1, 2019
e6e3b85
Update setuptools from 41.0.1 to 41.2.0 (#100)
pyup-bot Sep 1, 2019
723d863
Use double quotes so we don't have to escape them
marco-c Oct 1, 2019
f0d1291
Bump flake8-quotes from 1.0.0 to 2.1.0 (#101)
dependabot-preview[bot] Oct 1, 2019
6ec7811
Bump setuptools from 41.2.0 to 41.4.0 (#102)
dependabot-preview[bot] Oct 7, 2019
273df07
Bump flake8-debugger from 3.1.0 to 3.1.1 (#103)
dependabot-preview[bot] Oct 15, 2019
edf4aba
Bump flake8-debugger from 3.1.1 to 3.2.0 (#104)
dependabot-preview[bot] Oct 16, 2019
c6e3b33
Drop Python 2.7 testing
marco-c Oct 19, 2019
8957f96
Use pre-commit
marco-c Oct 19, 2019
bbfedb1
Add .gitignore
marco-c Oct 19, 2019
36d00cf
Update suite name
marco-c Oct 19, 2019
68ec865
Import marco-c/firefox-code-coverage
Oct 25, 2019
a117839
Patch marco-c/firefox-code-coverage to work in mozilla/code-coverage,…
Oct 23, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .isort.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[settings]
known_first_party = code_coverage_backend,code_coverage_bot,code_coverage_events,code_coverage_tools,conftest
known_first_party = code_coverage_backend,code_coverage_bot,code_coverage_events,code_coverage_tools,conftest,firefox_code_coverage
known_third_party = connexion,datadog,dateutil,fakeredis,flask,flask_cors,flask_talisman,google,hglib,jsone,jsonschema,libmozdata,libmozevent,logbook,pytest,pytz,raven,redis,requests,responses,setuptools,structlog,taskcluster,werkzeug,zstandard
force_single_line = True
default_section=FIRSTPARTY
Expand Down
19 changes: 19 additions & 0 deletions .taskcluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,25 @@ tasks:
owner: [email protected]
source: https://github.com/mozilla/code-coverage

- taskId: {$eval: as_slugid("report_check_tests")}
provisionerId: aws-provisioner-v1
workerType: github-worker
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
payload:
maxRunTime: 3600
image: python:3.7
command:
- sh
- -lxce
- "git clone --quiet ${repository} /src && cd /src && git checkout ${head_rev} -b checks &&
cd /src/report && ./ci-test.sh"
metadata:
name: "Code Coverage Report checks: unit tests"
description: Check python code with unittest
owner: [email protected]
source: https://github.com/mozilla/code-coverage

- taskId: {$eval: as_slugid("backend_build")}
created: {$fromNow: ''}
deadline: {$fromNow: '1 hour'}
Expand Down
27 changes: 27 additions & 0 deletions report/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
cache/
ccov-artifacts/
grcov
grcov_ver
lcov-bin/
lcov/
output.info
report/
3 changes: 3 additions & 0 deletions report/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
recursive-exclude tests *
3 changes: 3 additions & 0 deletions report/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# firefox-code-coverage

A description on how to use this tool is available at https://developer.mozilla.org/en-US/docs/Mozilla/Testing/Measuring_Code_Coverage_on_Firefox.
7 changes: 7 additions & 0 deletions report/ci-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash -e

pip install --disable-pip-version-check --no-cache-dir --quiet -r test-requirements.txt

python -m unittest discover tests
python setup.py sdist bdist_wheel
pip install dist/firefox_code_coverage-1.0.0.tar.gz
1 change: 1 addition & 0 deletions report/firefox_code_coverage/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# -*- coding: utf-8 -*-
Loading