Cherry picked the test matching (test vs. test/) fix to trunk