MDL-39465 detect environment problems in tests

This should help explain why something else fails.