proxygen
upload_gtest Namespace Reference

Functions

def main ()
 

Variables

string __author__ = 'wan@google.com (Zhanyong Wan)'
 
string CC_FLAG = '--cc='
 
string GTEST_GROUP = 'googletestframework@googlegroups.com'
 

Function Documentation

def upload_gtest.main ( void  )

Definition at line 49 of file upload_gtest.py.

References join.

49 def main():
50  # Finds the path to upload.py, assuming it is in the same directory
51  # as this file.
52  my_dir = os.path.dirname(os.path.abspath(__file__))
53  upload_py_path = os.path.join(my_dir, 'upload.py')
54 
55  # Adds Google Test discussion group to the cc line if it's not there
56  # already.
57  upload_py_argv = [upload_py_path]
58  found_cc_flag = False
59  for arg in sys.argv[1:]:
60  if arg.startswith(CC_FLAG):
61  found_cc_flag = True
62  cc_line = arg[len(CC_FLAG):]
63  cc_list = [addr for addr in cc_line.split(',') if addr]
64  if GTEST_GROUP not in cc_list:
65  cc_list.append(GTEST_GROUP)
66  upload_py_argv.append(CC_FLAG + ','.join(cc_list))
67  else:
68  upload_py_argv.append(arg)
69 
70  if not found_cc_flag:
71  upload_py_argv.append(CC_FLAG + GTEST_GROUP)
72 
73  # Invokes upload.py with the modified command line flags.
74  os.execv(upload_py_path, upload_py_argv)
75 
76 
#define join

Variable Documentation

string upload_gtest.__author__ = 'wan@google.com (Zhanyong Wan)'
private

Definition at line 40 of file upload_gtest.py.

string upload_gtest.CC_FLAG = '--cc='

Definition at line 45 of file upload_gtest.py.

string upload_gtest.GTEST_GROUP = 'googletestframework@googlegroups.com'

Definition at line 46 of file upload_gtest.py.