support autotest stop
capture this instead of reference in lambda
Merge pull request #6809 from heliclei/autotest-stop

Support autotest stop command