parameters: (self)
return_statement: return 0
docstring: Prepares a test environment for exeution.
  
          This includes tasks like determining the # of cores to use, setting
          environment variables, loading environment modules, etc.
docstring_summary: Prepares a test environment for exeution.
docstring_tokens: Prepares a test environment for exeution .
function: def prepare_test(self):
          """
          Prepares a test environment for exeution.
  
          This includes tasks like determining the # of cores to use, setting
          environment variables, loading environment modules, etc.
          """
          # Validate the branch constraints (i.e., if target_branch_name is master, then
          # source_branch_name must be master_merge_YYYYMMDD_HHMMSS)
          self.validate_branch_constraints()
  
          print("+" + "-"*78 + "+")
          print("Configuration Parameters")
          print("+" + "-"*78 + "+")
          print("--- arg_filename_packageenables = {}".format(self.arg_filename_packageenables))
          print("--- arg_filename_subprojects    = {}".format(self.arg_filename_subprojects))
          print("--- arg_jenkins_job_number      = {}".format(self.arg_jenkins_job_number))
          print("--- arg_max_cores_allowed       = {}".format(self.arg_max_cores_allowed))
          print("--- arg_num_concurrent_tests    = {}".format(self.arg_num_concurrent_tests))
          print("--- arg_pr_config_file          = {}".format(self.arg_pr_config_file))
          print("--- arg_pr_jenkins_job_name     = {}".format(self.arg_pr_jenkins_job_name))
          print("--- arg_pullrequest_number      = {}".format(self.arg_pullrequest_number))
          print("--- arg_pullrequest_cdash_track = {}".format(self.arg_pullrequest_cdash_track))
          print("--- arg_req_mem_per_core        = {}".format(self.arg_req_mem_per_core))
          print("--- arg_workspace_dir           = {}".format(self.arg_workspace_dir))
          print("")
          print("--- concurrency_build           = {}".format(self.concurrency_build))
          print("--- concurrency_test            = {}".format(self.concurrency_test))
          print("--- config_script               = {}".format(self.config_script))
          print("--- max_cores_allowed           = {}".format(self.max_cores_allowed))
          print("--- max_test_parallelism        = {}".format(self.max_test_parallelism))
          print("--- pullrequest_build_name      = {}".format(self.pullrequest_build_name))
          print("--- working_directory_ctest     = {}".format(self.working_directory_ctest))
          #print("---         = {}".format(self.))
          print("")
  
  
          print("+" + "-"*68 + "+")
          print("|   E N V I R O N M E N T   S E T   U P   S T A R T")
          print("+" + "-"*68 + "+")
          tr_config = setenvironment.SetEnvironment(self.arg_pr_config_file, self.arg_pr_jenkins_job_name)
  
          rval = 0
          if not self.args.dry_run:
              rval = tr_config.apply(throw_on_error=True)
              print("--- Environment setup completed ({})".format(rval))
          else:
              tr_config.pretty_print()
              print("")
              print("--- NOTICE: ENVVARS not set due to dry-run flag.")
              print("")
  
          if rval:
              msg = "ERROR: There was a problem configuring the environment."
              print(msg)
              raise Exception(msg)
  
          # Environment variables that we wish to print out.
          envvars_to_print = [
              "SEMS_",
              "TRILINOS_",
              "PULLREQUEST",
              "JENKINS",
              "KOKKOS",
              "BUILD",
              "JOB",
              "FORCE_CLEAN",
              "proxy",
              "PROXY",
              "PATH",
              "OMP_",
              "WORKSPACE",
              "CC",
              "CXX",
              "F77",
              "F90",
              "FC",
              "MODULESHOME"
              ]
          print("")
          tr_config.pretty_print_envvars(envvar_filter=envvars_to_print)
  
          print("+" + "-"*68 + "+")
          print("|   E N V I R O N M E N T   S E T   U P   C O M P L E T E")
          print("+" + "-"*68 + "+")
  
  
          print("+" + "-"*68 + "+")
          print("|   G e n e r a t e   `packageEnables.cmake`   S T A R T I N G")
          print("+" + "-"*68 + "+")
  
          self.create_package_enables_file(dryrun=self.args.dry_run)
  
          print("+" + "-"*68 + "+")
          print("|   G e n e r a t e   `packageEnables.cmake`   C O M P L E T E D")
          print("+" + "-"*68 + "+")
          print("")
  
          return 0
function_tokens: def prepare_test ( self ) : # Validate the branch constraints (i.e., if target_branch_name is master, then # source_branch_name must be master_merge_YYYYMMDD_HHMMSS) self . validate_branch_constraints ( ) print ( "+" + "-" * 78 + "+" ) print ( "Configuration Parameters" ) print ( "+" + "-" * 78 + "+" ) print ( "--- arg_filename_packageenables = {}" . format ( self . arg_filename_packageenables ) ) print ( "--- arg_filename_subprojects    = {}" . format ( self . arg_filename_subprojects ) ) print ( "--- arg_jenkins_job_number      = {}" . format ( self . arg_jenkins_job_number ) ) print ( "--- arg_max_cores_allowed       = {}" . format ( self . arg_max_cores_allowed ) ) print ( "--- arg_num_concurrent_tests    = {}" . format ( self . arg_num_concurrent_tests ) ) print ( "--- arg_pr_config_file          = {}" . format ( self . arg_pr_config_file ) ) print ( "--- arg_pr_jenkins_job_name     = {}" . format ( self . arg_pr_jenkins_job_name ) ) print ( "--- arg_pullrequest_number      = {}" . format ( self . arg_pullrequest_number ) ) print ( "--- arg_pullrequest_cdash_track = {}" . format ( self . arg_pullrequest_cdash_track ) ) print ( "--- arg_req_mem_per_core        = {}" . format ( self . arg_req_mem_per_core ) ) print ( "--- arg_workspace_dir           = {}" . format ( self . arg_workspace_dir ) ) print ( "" ) print ( "--- concurrency_build           = {}" . format ( self . concurrency_build ) ) print ( "--- concurrency_test            = {}" . format ( self . concurrency_test ) ) print ( "--- config_script               = {}" . format ( self . config_script ) ) print ( "--- max_cores_allowed           = {}" . format ( self . max_cores_allowed ) ) print ( "--- max_test_parallelism        = {}" . format ( self . max_test_parallelism ) ) print ( "--- pullrequest_build_name      = {}" . format ( self . pullrequest_build_name ) ) print ( "--- working_directory_ctest     = {}" . format ( self . working_directory_ctest ) ) #print("---         = {}".format(self.)) print ( "" ) print ( "+" + "-" * 68 + "+" ) print ( "|   E N V I R O N M E N T   S E T   U P   S T A R T" ) print ( "+" + "-" * 68 + "+" ) tr_config = setenvironment . SetEnvironment ( self . arg_pr_config_file , self . arg_pr_jenkins_job_name ) rval = 0 if not self . args . dry_run : rval = tr_config . apply ( throw_on_error = True ) print ( "--- Environment setup completed ({})" . format ( rval ) ) else : tr_config . pretty_print ( ) print ( "" ) print ( "--- NOTICE: ENVVARS not set due to dry-run flag." ) print ( "" ) if rval : msg = "ERROR: There was a problem configuring the environment." print ( msg ) raise Exception ( msg ) # Environment variables that we wish to print out. envvars_to_print = [ "SEMS_" , "TRILINOS_" , "PULLREQUEST" , "JENKINS" , "KOKKOS" , "BUILD" , "JOB" , "FORCE_CLEAN" , "proxy" , "PROXY" , "PATH" , "OMP_" , "WORKSPACE" , "CC" , "CXX" , "F77" , "F90" , "FC" , "MODULESHOME" ] print ( "" ) tr_config . pretty_print_envvars ( envvar_filter = envvars_to_print ) print ( "+" + "-" * 68 + "+" ) print ( "|   E N V I R O N M E N T   S E T   U P   C O M P L E T E" ) print ( "+" + "-" * 68 + "+" ) print ( "+" + "-" * 68 + "+" ) print ( "|   G e n e r a t e   `packageEnables.cmake`   S T A R T I N G" ) print ( "+" + "-" * 68 + "+" ) self . create_package_enables_file ( dryrun = self . args . dry_run ) print ( "+" + "-" * 68 + "+" ) print ( "|   G e n e r a t e   `packageEnables.cmake`   C O M P L E T E D" ) print ( "+" + "-" * 68 + "+" ) print ( "" ) return 0