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

tools: add capability to provide make command via environment #14459

Merged
merged 2 commits into from
Jul 9, 2020

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jul 8, 2020

Contribution description

This PR enables the user to set the name of the make command via the MAKE environment variable in our test scripts. If it is not provided it defaults to just make in all cases.

While not strictly necessary for the use with FreeBSD, as one could bend the gmake command accordingly there to not use the incompatible BSD Make

if ! [ -h /home/vagrant/.local/bin/make ]; then
# might not be a symlink, so remove
rm -f /home/vagrant/.local/bin/make
su - vagrant -c 'ln -s /usr/local/bin/gmake /home/vagrant/.local/bin/make'
fi

I find it friendlier if that would be not needed to run our scripts (I can imagine similar problems might be faced on Mac OS X and Windows).

Testing procedure

Touched tools and tests should be run

  • dist/tools/ci/print_toolchain_versions.sh
  • Any test using testrunner (one should be enough, but we can also just run CI: run tests)
  • dist/tools/compile_and_test_for_board/compile_and_test_for_board.py for at least one board
  • dist/tools/compile_test/compile_test.py for at most one application combination (can be canceled after the first application passes)
  • tests/lwip on native
  • tests/riotboot
  • tests/warn_conflicts

Issues/PRs references

Discovered while working on #14458, but not required for it.

Not all operating systems name the GNU Make `make`. FreeBSD e.g. uses a
different dialect of Make, that seems to be incompatible with GNU make.
(I wasn't able to get `make` run, but `gmake` works).

This allows our test scripts to be configured via the environment
variable `MAKE` to point to a different make command.
@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: tests Area: tests and testing framework OS: Mac OS X Host OS: This PR/issue concerns usage of RIOT with Mac OS X as a host system OS: Windows Host OS: This PR/issue concerns usage of RIOT with Windows as a host system Area: tools Area: Supplementary tools OS: FreeBSD Host OS: This PR/issue concerns usage of RIOT with FreeBSD as a host system labels Jul 8, 2020
@miri64 miri64 added this to the Release 2020.07 milestone Jul 8, 2020
@miri64 miri64 added the CI: run tests If set, CI server will run tests on hardware for the labeled PR label Jul 8, 2020
@aabadie aabadie added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jul 9, 2020
Copy link
Contributor

@aabadie aabadie left a comment

Choose a reason for hiding this comment

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

Tested all mentioned tools and all worked as expected (except tests/warn_conflict but that's a different issue and is addressed by #14474).

For testing, I did the opposite as you did in FreeBSD:

sudo /usr/bin/ln -s /usr/bin/make /usr/bin/gmake

Code changes are good.

ACK!

@@ -41,13 +41,14 @@
TESTRUNNER_RESET_AFTER_TERM = int(os.environ.get('TESTRUNNER_RESET_AFTER_TERM')
or '0')

MAKE = os.environ.get('MAKE', 'make')
Copy link
Contributor

Choose a reason for hiding this comment

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

Reported by Travis:

Suggested change
MAKE = os.environ.get('MAKE', 'make')
MAKE = os.environ.get('MAKE', 'make')

Copy link
Contributor

Choose a reason for hiding this comment

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

You can squash directly

For those tests that don't use the tooling fixed in the previous commit
@miri64 miri64 force-pushed the tools/enh/make-env branch from 77ebb41 to 1cb0e09 Compare July 9, 2020 08:59
@aabadie
Copy link
Contributor

aabadie commented Jul 9, 2020

The run failures on Murdock are unrelated. I think there's an issue with one of the nrf52dk workers. Re-triggering Murdock without "run tests" label.

@aabadie aabadie added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: run tests If set, CI server will run tests on hardware for the labeled PR labels Jul 9, 2020
@miri64
Copy link
Member Author

miri64 commented Jul 9, 2020

Then CI: skip compile tests would have been also a good idea, since this is only touching test executing scripts. But oh well, now it is already running ^^

@miri64 miri64 merged commit 37a5e87 into RIOT-OS:master Jul 9, 2020
@miri64 miri64 deleted the tools/enh/make-env branch July 9, 2020 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tests Area: tests and testing framework Area: tools Area: Supplementary tools CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR OS: FreeBSD Host OS: This PR/issue concerns usage of RIOT with FreeBSD as a host system OS: Mac OS X Host OS: This PR/issue concerns usage of RIOT with Mac OS X as a host system OS: Windows Host OS: This PR/issue concerns usage of RIOT with Windows as a host system Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants