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

Make test-cmd work with OS-X tooling #61393

Merged
merged 2 commits into from
Mar 22, 2018

Conversation

totherme
Copy link
Contributor

OS-X thips with the BSD versions of date and grep. Those don't have
certain features the script relies on:

  • BSD date does not support nanoseconds (%N)
  • BSD grep does not support perl RegEx (-P)

As we use bash specifically in the hashbang anyway it is probably fine
to rely on the $RANDOM bashism here.

What this PR does / why we need it:

Currently make test-cmd doesn't work on OSX. This PR makes make test-cmd work on OSX.

Release note:

`make test-cmd` now works on OSX.

cc: @apelisse

OS-X thips with the BSD versions of `date` and `grep`. Those don't have
certain features the script relies on:
- BSD date does not support nanoseconds (`%N`)
- BSD grep does not support perl RegEx (`-P`)

As we use `bash` specifically in the hashbang anyway it is probably fine
to rely on the `$RANDOM` bashism here.
@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. labels Mar 20, 2018
@totherme
Copy link
Contributor Author

cc @hoegaarden @jamesjoshuahill

local ns_name
ns_name="namespace-$(date +%s)-${RANDOM}"
kube::log::status "Creating namespace ${ns_name}"
kubectl create namespace "$ns_name"
Copy link
Member

@apelisse apelisse Mar 20, 2018

Choose a reason for hiding this comment

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

I know I'm nitting but, shouldn't it be ${ns_name} (consistency)?

And below of course

Use "${VAR}" everywhere, instead of also using "$VAR" in some places.
@totherme
Copy link
Contributor Author

@apelisse : PTAL :)

@apelisse
Copy link
Member

/lgtm

Thank you, looks great

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Mar 21, 2018
@apelisse apelisse assigned ixdy and unassigned apelisse Mar 21, 2018
@ixdy
Copy link
Member

ixdy commented Mar 21, 2018

/lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: apelisse, ixdy, totherme

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

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 21, 2018
@totherme
Copy link
Contributor Author

Thanks all!

Um -- I see two lgtms, green tests, and a bunch of green labels.. But this hasn't been merged. Anyone have any idea what needs to happen next? :S

@k8s-github-robot
Copy link

Automatic merge from submit-queue (batch tested with PRs 61453, 61393, 61379, 61373, 61494). If you want to cherry-pick this change to another branch, please follow the instructions here.

@k8s-github-robot k8s-github-robot merged commit 9f71d7f into kubernetes:master Mar 22, 2018
@ixdy
Copy link
Member

ixdy commented Mar 22, 2018

@totherme the merge robot was just waiting for you to comment and ask the status. :)

(I think the submit queue was still catching up on PRs after code thaw.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants