commands: refactor commands.py to avoid using no_wait arg.

In the commands.py, the RunHWTestSuite method will call run_suite script twice,
one with create_and_return arg to create a suite job and exit, and the other
call with 'mock_job_id' arg to wait for the suite results. However, when we
specify --no_wait is True, the second call does not wait for results,
thus become unnecessary. So, refactor commands.py to call run_suite
script twice only when we explicitly specify to wait for results, and
omit the --no-wait arg.

BUG=chromium:533621
TEST=unittest and tryjob test with expected results.
cbuidlbot --remote -g "302135 302100" --hwtest lumpy-release.

Change-Id: Ic1eff91a14389af9219248e24ff25852d6804c80
Previous-Reviewed-on: https://chromium-review.googlesource.com/302100
(cherry picked from commit 5262ce9aeb073ea5a7edfda21fe1479f33c278ad)
Reviewed-on: https://chromium-review.googlesource.com/304850
Reviewed-by: Fang Deng <fdeng@chromium.org>
Commit-Queue: Shuqian Zhao <shuqianz@chromium.org>
Tested-by: Shuqian Zhao <shuqianz@chromium.org>
2 files changed