Skip to content

Improve running make test

Ash McKenzie requested to merge ashmckenzie/makefile-local-env-check into master

What does this Merge Request do?

This MR improves the make test target to be more helpful about which tools are missing:

Before

$ make test
/bin/bash: go: command not found
make: *** [Makefile:900: install-vale] Error 127

After

$ make test
WARNING: vale is not currently installed
WARNING: markdownlint is not currently installed.
WARNING: rubocop is not currently installed.
WARNING: rspec is not currently installed.
/bin/bash: go: command not found
make: *** [Makefile:922: install-vale] Error 127

make test is designed to fail (because it's used by CI etc) so make test has listed the tools that are missing and has attempted to install but has failed because go isn't available which is because this is being run in a completely clean system with no software installed.

I've also added make test_warn_missing_tools which:

$ make test_warn_missing_tools
WARNING: vale is not currently installed
WARNING: markdownlint is not currently installed.
WARNING: rubocop is not currently installed.
WARNING: rspec is not currently installed.

but doesn't fail. The purpose behind this target is to be run as part of !1500 (merged) which will warn that tools are not available but won't fail and therefore allowing lefthook to continue 🙂

Merge Request checklist

  • Tests added for new functionality. If not, please raise Issue to follow-up.
  • This change is backward compatible. If not, please include steps to communicate to our users.
  • Documentation added/updated, if needed.
  • gdk doctor test added, if needed.
Edited by Ash McKenzie

Merge request reports