added checks to run-tests

Related to PR 13936.
(cherry picked from commit a26101c63fcfbd42c0803203256554a7bbc8afec)