run tests if invoked as command line tool