Skip to content

Commit

Permalink
Remove usage of env from Makefile rules
Browse files Browse the repository at this point in the history
One of the benefits here of setting `SHELL := bash` is that we no longer
need to use env to set environment variables before a shell command.
Bash just handles that itself.

Removed a useless use of `cat`.

Dropped the `-e` from `bash -ex` as that is handled in
./openqa-label-known-issues-multi itsef.

I'm not completely sure about that `grep -v` but it seem like it was
trying to avoid the error from invalid JSON (noted in the comment).
Putting `-` prefix on a rule command tells `make` not to stop if the
command fails. Not sure that is correct here or not.
  • Loading branch information
ingydotnet committed Jan 29, 2023
1 parent 1bee088 commit 3959c1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ test-python:
py.test tests)

test-online:
cat ./tests/incompletes | env dry_run=1 bash -ex ./openqa-label-known-issues-multi
env dry_run=1 ./trigger-openqa_in_openqa
dry_run=1 bash -x ./openqa-label-known-issues-multi < ./tests/incompletes
dry_run=1 ./trigger-openqa_in_openqa
# Invalid JSON causes the job to abort with an error
env tw_openqa_host=example.com dry_run=1 ./trigger-openqa_in_openqa | grep -v 'parse error:'
-tw_openqa_host=example.com dry_run=1 ./trigger-openqa_in_openqa

checkstyle: test-shellcheck test-yaml

Expand Down

0 comments on commit 3959c1f

Please sign in to comment.