make self-test an option in runtest