-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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 sh2ju use awk instead of bc. #60695
Conversation
awk is available in all of our test runners (as part of busybox or debian base packages), bc is not.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cblecker, rmmh 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 |
/assign @krzyzacy |
Note that I tossed |
@rmmh: @BenTheElder added bc to kubekins last night, do we still need this? |
@BenTheElder Is the artifacts dir being created, and the variable set right? I don't see any artifacts being exported |
@cblecker not sure. Though I also think not needing to install yet another thing is preferable either way, we can fix the job configuration independent of this PR, just noting that there's something else missing to actually get JUnit results. |
do you need something like
like in https://github.com/kubernetes/kubernetes/blob/master/hack/jenkins/test-dockerized.sh? |
@krzyzacy Oh, yes! We have those in verify-dockerized: kubernetes/hack/jenkins/verify-dockerized.sh Lines 34 to 37 in ae1fc13
Which I think is the target for the pull-kubernetes-verify job |
we should export those env on the pod, but please, please don't make anything else look like |
/retest Review the full test history for this PR. Silence the bot with an |
@@ -130,8 +130,8 @@ function juLog() { | |||
# calculate vars | |||
asserts=$(($asserts+1)) | |||
errors=$(($errors+$err)) | |||
time=`echo "${end} - ${ini}" | bc -l` | |||
total=`echo "${total} + ${time}" | bc -l` | |||
time=`echo "${end} ${ini}" | awk '{print $1 - $2}'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
couldn't we also just use bash arithmetic?
echo $((${end} - ${ini}))
echo $((${total} + ${time}))
I checked in the busybox image and this seems to work and is more readable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, since the times are floating points. Bash doesn't have floating point arithmetic.
[MILESTONENOTIFIER] Milestone Removed From Pull Request @BenTheElder @cblecker @krzyzacy @rmmh @kubernetes/sig-testing-misc Important: This pull request was missing the |
/retest Review the full test history for this PR. Silence the bot with an |
/retest |
/retest Review the full test history for this PR. Silence the bot with an |
/test all [submit-queue is verifying that this PR is safe to merge] |
/test all Tests are more than 96 hours old. Re-running tests. |
Automatic merge from submit-queue. If you want to cherry-pick this change to another branch, please follow the instructions here. |
awk is available in all of our test runners (as part of busybox or debian base packages), bc is not.
This will fix spurious errors in the typecheck job.
Release note: