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

scripts: add TESTCASE flag to run single unit test #9426

Merged
merged 1 commit into from
Mar 14, 2018

Conversation

wenjiaswe
Copy link
Contributor

@wenjiaswe wenjiaswe commented Mar 13, 2018

Enable user to run specified test case with different TIMEOUT expectation when needed.

Copy link
Contributor

@hexfusion hexfusion left a 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

Copy link
Contributor

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

Copy link
Contributor Author

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)


Copy link
Contributor

Choose a reason for hiding this comment

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

extra space?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

change applied.

@wenjiaswe
Copy link
Contributor Author

@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.

@wenjiaswe wenjiaswe force-pushed the testscript branch 3 times, most recently from d6bb2b2 to 01828ab Compare March 13, 2018 01:08
test Outdated
else
USERTIMEOUT="${TIMEOUT}"
fi
go test ${GO_TEST_FLAG} -timeout "${USERTIMEOUT}" "${COVER}" ${RACE} -cpu 1,2,4 ${RUN_ARG} "$@" "${TEST[@]}"
Copy link
Contributor

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.

Copy link
Contributor Author

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-io
Copy link

codecov-io commented Mar 13, 2018

Codecov Report

Merging #9426 into master will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@           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
Impacted Files Coverage Δ
pkg/tlsutil/tlsutil.go 86.2% <0%> (-6.9%) ⬇️
etcdserver/api/v3rpc/lease.go 74.32% <0%> (-6.76%) ⬇️
clientv3/namespace/watch.go 72.72% <0%> (-6.07%) ⬇️
etcdctl/ctlv3/command/lease_command.go 65.34% <0%> (-5.95%) ⬇️
mvcc/watcher.go 96.29% <0%> (-3.71%) ⬇️
proxy/grpcproxy/register.go 80.55% <0%> (-2.78%) ⬇️
etcdserver/v3_server.go 78.92% <0%> (-1.8%) ⬇️
lease/leasehttp/http.go 58.08% <0%> (-1.48%) ⬇️
pkg/schedule/schedule.go 81.69% <0%> (-1.41%) ⬇️
proxy/grpcproxy/lease.go 79.18% <0%> (-1.36%) ⬇️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e668a9...3571f40. Read the comment docs.

Copy link
Contributor

@gyuho gyuho left a 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"...
Copy link
Contributor

Choose a reason for hiding this comment

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

revert this change?

Copy link
Contributor Author

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.
Copy link
Contributor

@gyuho gyuho left a comment

Choose a reason for hiding this comment

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

lgtm. thanks!

@gyuho gyuho merged commit c541793 into etcd-io:master Mar 14, 2018
@wenjiaswe wenjiaswe deleted the testscript branch June 19, 2018 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants