smoke.py: refactor some skipTest() logic