Added condition for the test to not fail if the test directory does not exist.
that is true for cases where we have tests in master but not in the branch.
Merge branch '4.2'