-
Notifications
You must be signed in to change notification settings - Fork 9.9k
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
scripts: add TESTCASE flag to run single unit test #9426
Conversation
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.
@wenjiaswe just a few comments, I look forward to giving this a try!
test
Outdated
else | ||
RUN_ARG="" | ||
fi | ||
|
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.
maybe just cosmetic but saves an else statement.
RUN_ARG=""
if [ ! -z "${TESTCASE}" ]; then
RUN_ARG="-run=${TESTCASE}"
fi
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.
Thanks, change applied.
test
Outdated
@@ -57,6 +76,7 @@ else | |||
fi | |||
FMT=($FMT) | |||
|
|||
|
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.
extra space?
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.
change applied.
@hexfusion @jpbetz @gyuho Sorry, this is the same as #9378 , but I had the wrong rebase and branch for that one, so after I fixed that, github decides it should be closed. So I submitted this new one. |
d6bb2b2
to
01828ab
Compare
test
Outdated
else | ||
USERTIMEOUT="${TIMEOUT}" | ||
fi | ||
go test ${GO_TEST_FLAG} -timeout "${USERTIMEOUT}" "${COVER}" ${RACE} -cpu 1,2,4 ${RUN_ARG} "$@" "${TEST[@]}" |
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.
Tabs from line 119? Indentation looks different than above lines.
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.
Right... I am sorry I always disable tab in my text editor... Now I have fixed all the tag caused indentation I had and fixed one extra in the script that existed before;)
Codecov Report
@@ Coverage Diff @@
## master #9426 +/- ##
========================================
- Coverage 72.69% 72.6% -0.1%
========================================
Files 362 362
Lines 30827 30827
========================================
- Hits 22411 22383 -28
- Misses 6795 6825 +30
+ Partials 1621 1619 -2
Continue to review full report at Codecov.
|
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.
just nits. Thanks for first contribution!
test
Outdated
@@ -472,7 +545,7 @@ function commit_title_pass { | |||
spaceCommas=$(echo "$commitMsg" | sed 's/ /\n/g' | grep -c ',$' || echo 0) | |||
commaSpaces=$(echo "$commitMsg" | sed 's/,/\n/g' | grep -c '^ ' || echo 0) | |||
if [[ $(echo "$commitMsg" | grep -c ":..*") == 0 || "$commitMsg" == "$pkgPrefix" || "$spaceCommas" != "$commaSpaces" ]]; then | |||
echo "$l"... | |||
echo "$l"... |
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.
revert this change?
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.
OK, just applied. Thanks!
Enable user to run specified test case with different TIMEOUT expectation when needed.
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.
lgtm. thanks!
Enable user to run specified test case with different TIMEOUT expectation when needed.