def checkout(self): os.chdir('..') self.args["version"] = "fixed-only-test-change" self.args["task"] = "test" self.args["output"] = "output/" if self.args["project"] == 'Node_redis': self.args["project"] = 'Node-redis' myGit.checkout(self.args) self.args["project"] = 'Node_redis' else: myGit.checkout(self.args)
def per_test(param_dict): myGit.checkout(param_dict) set_node_version(get_command(param_dict, "Node version")) run_npm_install() run_pre_and_post_command(get_command(param_dict, "Pre-command")) run_test_command(get_command(param_dict, "Test command")) get_test_stat() zip_test_results() run_pertest_command(get_command(param_dict, "Coverage command")) run_pre_and_post_command(get_command(param_dict, "Post-command"))
def per_test(param_dict): myGit.checkout(param_dict) set_node_version(get_command(param_dict, "Node version")) run_pre_and_post_command(get_command(param_dict, "Pre-command")) run_npm_install() run_test_command(get_command(param_dict, "Test command")) get_test_stat() write_test_names_into_file() run_rm_traces() run_pertest_command(get_command(param_dict, "Coverage command")) run_pre_and_post_command(get_command(param_dict, "Post-command"))
def test(param_dict): myGit.checkout(param_dict) set_node_version(get_command(param_dict, "Node version")) if get_command(param_dict, "Pre-command").count(".sh")==0: run_pre_and_post_command(get_command(param_dict, "Pre-command")) run_npm_install() run_pre_and_post_command(get_command(param_dict, "Pre-command")) run_test_command(get_command(param_dict, "Test command")) get_test_stat() run_coverage_command(get_command(param_dict, "Coverage command")) get_cov_stat() run_pre_and_post_command(get_command(param_dict, "Post-command"))
import argument_parser import myGit """ Examples: """ checkout_command_types = [ "checkout-buggy-version", "checkout-fixed-version", "checkout-fixed-only-test-change" ] test_results_command_types = [ "buggy-results", "fixed-results", "fixed-only-test-change-results" ] compare_results_command_types = ["compare-buggy-and-fixed-results"] info_command_types = ["info"] param_dict = argument_parser.arg_parser() if myGit.is_checkout(param_dict, checkout_command_types): myGit.checkout(param_dict) elif myGit.is_test(param_dict, test_results_command_types): myGit.test(param_dict) elif myGit.is_compare(param_dict, compare_results_command_types): myGit.compare(param_dict) elif myGit.is_info(param_dict, info_command_types): myGit.info(param_dict)