test.py
changeset 5275 d4008f2981ba
parent 5274 8723fb3b377b
child 5279 1aec8ea805d2
equal deleted inserted replaced
5274:8723fb3b377b 5275:d4008f2981ba
   327 # path -- it is cooked up dynamically, so we do that too.
   327 # path -- it is cooked up dynamically, so we do that too.
   328 #
   328 #
   329 def make_library_path():
   329 def make_library_path():
   330     global LIBRARY_PATH
   330     global LIBRARY_PATH
   331 
   331 
   332     LIBRARY_PATH = "LD_LIBRARY_PATH='"        
   332     LIBRARY_PATH = "LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'"        
   333 
   333 
   334     if sys.platform == "darwin":
   334     if sys.platform == "darwin":
   335         LIBRARY_PATH = "DYLD_LIBRARY_PATH='"
   335         LIBRARY_PATH = "DYLD_LIBRARY_PATH='"
   336     elif sys.platform == "win32":
   336     elif sys.platform == "win32":
   337         LIBRARY_PATH = "PATH='"
   337         LIBRARY_PATH = "PATH=$PATH:'"
   338     elif sys.platform == "cygwin":
   338     elif sys.platform == "cygwin":
   339         LIBRARY_PATH = "PATH='"
   339         LIBRARY_PATH = "PATH=$PATH:'"
   340 
   340 
   341     for path in NS3_MODULE_PATH:
   341     for path in NS3_MODULE_PATH:
   342         LIBRARY_PATH = LIBRARY_PATH + path + ":"
   342         LIBRARY_PATH = LIBRARY_PATH + path + ":"
   343 
   343 
   344     LIBRARY_PATH = LIBRARY_PATH + "'"
   344     LIBRARY_PATH = LIBRARY_PATH + "'"
       
   345 
       
   346     if options.verbose:
       
   347         print "LIBRARY_PATH == %s" % LIBRARY_PATH
   345 
   348 
   346 def run_job_synchronously(shell_command, directory):
   349 def run_job_synchronously(shell_command, directory):
   347     cmd = "%s %s/%s/%s" % (LIBRARY_PATH, NS3_BUILDDIR, NS3_ACTIVE_VARIANT, shell_command)
   350     cmd = "%s %s/%s/%s" % (LIBRARY_PATH, NS3_BUILDDIR, NS3_ACTIVE_VARIANT, shell_command)
   348     if options.verbose:
   351     if options.verbose:
   349         print "Synchronously execute %s" % cmd
   352         print "Synchronously execute %s" % cmd