parser.add_argument("--verbose", action="store_true", help="verbose messages for debugging") # For development use, not used normally parser.add_argument("--dev", action="store_true", help="for development use. do not use.") parser.add_argument( "--nup", action="store_true", help="use non-uploaded conainer development image, do not use.") #============================================================================================================== args = parser.parse_args() git = git_utils(args.verbose) commit_range = args.commit_range project = None host_mount = None repo_name = None # name of source repo on git server repo_basename = None # base name of cloned/to-be-cloned repo (can be different from name of repo on git server) source_branch = None cloned_flag = args.cloned or args.repo != None if args.repo != None: if args.cloned: print "Don't specify both '--cloned' and '--repo'" exit(1)
cmd_stdout = methodToCall() elif len(args) == 0 and len(kwargs) != 0: cmd_stdout = methodToCall(**kwargs) elif len(args) != 0 and len(kwargs) == 0: cmd_stdout = methodToCall(*args) else: cmd_stdout = methodToCall(*args, **kwargs) except: cmd_status = 1 check_results(expected_status, cmd_status, expected_stdout, cmd_stdout) #============================================================================ git = git_utils() status = 'PASS' os.chdir('/home/atull/repos/linux-socfpga') repo = Repo(os.getcwd()) if not repo.in_repo: print 'Not in a git repository. Please cd to your git repository.' exit(1) commit = Commit(repo, 'fe80c85cfb14fb715e7eea02bcdf8771b078e6ed') print 'Basic Commit operations...' # test_cmd(commit, cmd, expected_stdout, expected_status, *args, **kwargs) #test_cmd(commit, 'diff_tree_files', '', 0 )
def __init__(self): self.git = git_utils() self.checkpatch_pl_tmp = None self.spelling_txt_tmp = None self.const_structs_tmp = None