Skip to content
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

Added and tweaked the method of reporting makefile targets #1277

Merged
merged 4 commits into from
Apr 13, 2021

Conversation

rkazak
Copy link
Contributor

@rkazak rkazak commented Apr 3, 2021

Added a target into the make file to be able to report available targets within the makefile. This was a tweak of something I saw on - https://stackoverflow.com/questions/4219255/how-do-you-get-the-list-of-targets-in-a-makefile

This help us by documenting known targets.

@ti-chi-bot ti-chi-bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 3, 2021
@codecov-io
Copy link

codecov-io commented Apr 3, 2021

Codecov Report

Merging #1277 (3fed932) into master (ad2bc6a) will increase coverage by 27.27%.
The diff coverage is n/a.

❗ Current head 3fed932 differs from pull request most recent head 97a08d9. Consider uploading reports for the commit 97a08d9 to get more accurate results
Impacted file tree graph

@@             Coverage Diff             @@
##           master    #1277       +/-   ##
===========================================
+ Coverage   26.25%   53.53%   +27.27%     
===========================================
  Files         263      289       +26     
  Lines       18947    20851     +1904     
===========================================
+ Hits         4975    11163     +6188     
+ Misses      13201     7939     -5262     
- Partials      771     1749      +978     
Flag Coverage Δ
cluster 45.07% <ø> (?)
dm 26.61% <ø> (?)
integrate 48.04% <ø> (+31.55%) ⬆️
playground 3.10% <ø> (?)
tiup 16.37% <ø> (-0.13%) ⬇️
unittest 22.73% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cmd/root.go 75.82% <0.00%> (-1.50%) ⬇️
components/dm/ansible/import.go 62.69% <0.00%> (-0.58%) ⬇️
cmd/mirror.go 48.40% <0.00%> (-0.29%) ⬇️
pkg/logger/debug.go 16.66% <0.00%> (ø)
components/playground/instance/process.go 0.00% <0.00%> (ø)
components/playground/instance/tikv_config.go 0.00% <0.00%> (ø)
pkg/cluster/operation/download.go 36.84% <0.00%> (ø)
components/playground/instance/pd.go 0.00% <0.00%> (ø)
pkg/cluster/operation/systemd.go 70.00% <0.00%> (ø)
components/playground/instance/instance.go 0.00% <0.00%> (ø)
... and 207 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 23876c0...97a08d9. Read the comment docs.

@AstroProfundis AstroProfundis added this to the v1.5.0 milestone Apr 3, 2021
@AstroProfundis AstroProfundis changed the title Added and tweaked the method of reporting makefile targets - https://… Added and tweaked the method of reporting makefile targets Apr 3, 2021
@printf "%-30s %s\n" "Target" "Description"
@printf "%-30s %s\n" "------" "-----------"
@make -pqR : 2>/dev/null \
| awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems this only work when the locale is C (and maybe other English locales).

$ env LANG=zh_CN.UTF-8 make targets
Target                         Description
------                         -----------
$ env LANG=C make targets
Target                         Description
------                         -----------
bench                          build the tiup-bench component
build                          build tiup and all it's components
build_integration_test         run the playground, cluster, and dm integration tests.
build_tiup_cluster_test        run the tiup-cluster tests
build_tiup_dm_test             run the tiup-dm tests
build_tiup_playground_test     run the tiup-playground tests
build_tiup_test                run the tiup tests
check                          run all checkers. (fmt, lint, tidy, check-static and vet)
check-static                   run the golangci-lint static check tool
clean                          run the build cleanup steps
client                         build the tiup-client component
cluster                        build the tiup-cluster component
components                     build the playground, client, cluster, dm, bench and server components
ctl                            build the tiup-ctl component
default                        run the checks and then build.
dm                             build the tiup-dm component
doc                            build the tiup-doc component
errdoc                         build the tiup-errdoc component
failpoint-disable              disable failpoint
failpoint-enable               enable failpoint
fmt                            run the go formatter utility
lint                           run the lint checker revive
playground                     build tiup-playground component
race                           run race check with failpoint enabled
run-tests                      run the unit tests
server                         build the tiup-server component
test                           run tests with failpoint enabled
tidy                           run tidy check
tiup                           build the tiup driver
tools/bin/failpoint-ctl        build the failpoint-ctl utility
tools/bin/golangci-lint        pull in specific version of golangci-lint (v1.38.0)
tools/bin/revive               build revive utility
unit-test                      run the code coverage test phase
vet                            run the go vet tool

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went a quick test and can confirms that adding an LANG=C line just above the targets target would do the trick.

Makefile Show resolved Hide resolved
@lucklove
Copy link
Member

/lgtm

@ti-chi-bot
Copy link
Member

[REVIEW NOTIFICATION]

This pull request has been approved by:

  • lucklove

To complete the pull request process, please ask the reviewers in the list to review by filling /cc @reviewer in the comment.
After your PR has acquired the required number of LGTMs, you can assign this pull request to the committer in the list by filling /assign @committer in the comment to help you merge this pull request.

The full list of commands accepted by this bot can be found here.

Reviewer can indicate their review by writing /lgtm in a comment.
Reviewer can cancel approval by writing /lgtm cancel in a comment.

@ti-chi-bot ti-chi-bot added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 13, 2021
@lucklove
Copy link
Member

/merge

@ti-chi-bot
Copy link
Member

This pull request has been accepted and is ready to merge.

Commit hash: 97a08d9

@ti-chi-bot ti-chi-bot added the status/can-merge Indicates a PR has been approved by a committer. label Apr 13, 2021
@ti-chi-bot ti-chi-bot merged commit 3366472 into pingcap:master Apr 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
size/M Denotes a PR that changes 30-99 lines, ignoring generated files. status/can-merge Indicates a PR has been approved by a committer. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants