Add a flag --test-stop to test programs