Exemple #1
0
    def __init__(self, args):
        Reporter.__init__(self, args)
        self.template_dir = os.path.join('reports', 'cdash')
        self.cdash_upload_url = args.cdash_upload_url

        if self.cdash_upload_url:
            self.buildid_regexp = re.compile("<buildId>([0-9]+)</buildId>")
        self.phase_regexp = re.compile(r"Executing phase: '(.*)'")

        if args.package:
            packages = args.package
        else:
            packages = []
            for file in args.specfiles:
                with open(file, 'r') as f:
                    s = spack.spec.Spec.from_yaml(f)
                    packages.append(s.format())
        self.install_command = ' '.join(packages)
        self.base_buildname = args.cdash_build or self.install_command
        self.site = args.cdash_site or socket.gethostname()
        self.osname = platform.system()
        self.endtime = int(time.time())
        if args.cdash_buildstamp:
            self.buildstamp = args.cdash_buildstamp
        else:
            buildstamp_format = "%Y%m%d-%H%M-{0}".format(args.cdash_track)
            self.buildstamp = time.strftime(buildstamp_format,
                                            time.localtime(self.endtime))
        self.buildIds = OrderedDict()
        self.revision = ''
        git = which('git')
        with working_dir(spack.paths.spack_root):
            self.revision = git('rev-parse', 'HEAD', output=str).strip()
        self.multiple_packages = False
Exemple #2
0
 def __init__(self, args):
     Reporter.__init__(self, args)
     self.template_dir = os.path.join('reports', 'cdash')
     self.cdash_upload_url = args.cdash_upload_url
     if args.package:
         packages = args.package
     else:
         packages = []
         for file in args.specfiles:
             with open(file, 'r') as f:
                 s = spack.spec.Spec.from_yaml(f)
                 packages.append(s.format())
     self.install_command = ' '.join(packages)
     self.buildname = args.cdash_build or self.install_command
     self.site = args.cdash_site or socket.gethostname()
     self.osname = platform.system()
     self.endtime = int(time.time())
     buildstamp_format = "%Y%m%d-%H%M-{0}".format(args.cdash_track)
     self.buildstamp = time.strftime(buildstamp_format,
                                     time.localtime(self.endtime))
     self.buildId = None
     self.revision = ''
     git = which('git')
     with working_dir(spack.paths.spack_root):
         self.revision = git('rev-parse', 'HEAD', output=str).strip()
Exemple #3
0
 def __init__(self, install_command, cdash_upload_url):
     Reporter.__init__(self, install_command, cdash_upload_url)
     self.template_dir = os.path.join('reports', 'cdash')
     self.hostname = socket.gethostname()
     self.osname = platform.system()
     self.starttime = int(time.time())
     # TODO: remove hardcoded use of Experimental here.
     #       Make the submission model configurable.
     self.buildstamp = time.strftime("%Y%m%d-%H%M-Experimental",
                                     time.localtime(self.starttime))
Exemple #4
0
 def __init__(self, install_command, cdash_upload_url):
     Reporter.__init__(self, install_command, cdash_upload_url)
     self.template_dir = os.path.join('reports', 'cdash')
     self.hostname = socket.gethostname()
     self.osname = platform.system()
     self.starttime = int(time.time())
     # TODO: remove hardcoded use of Experimental here.
     #       Make the submission model configurable.
     self.buildstamp = time.strftime("%Y%m%d-%H%M-Experimental",
                                     time.localtime(self.starttime))
Exemple #5
0
    def __init__(self, args):
        Reporter.__init__(self, args)
        self.success = True
        # Posixpath is used here to support the underlying template enginge
        # Jinja2, which expects `/` path separators
        self.template_dir = posixpath.join('reports', 'cdash')
        self.cdash_upload_url = args.cdash_upload_url

        if self.cdash_upload_url:
            self.buildid_regexp = re.compile("<buildId>([0-9]+)</buildId>")
        self.phase_regexp = re.compile(r"Executing phase: '(.*)'")

        self.authtoken = None
        if 'SPACK_CDASH_AUTH_TOKEN' in os.environ:
            tty.verbose("Using CDash auth token from environment")
            self.authtoken = os.environ.get('SPACK_CDASH_AUTH_TOKEN')

        if getattr(args, 'spec', ''):
            packages = args.spec
        elif getattr(args, 'specs', ''):
            packages = args.specs
        else:
            packages = []
            for file in args.specfiles:
                with open(file, 'r') as f:
                    s = spack.spec.Spec.from_yaml(f)
                    packages.append(s.format())
        self.install_command = ' '.join(packages)
        self.base_buildname = args.cdash_build or self.install_command
        self.site = args.cdash_site or socket.gethostname()
        self.osname = platform.system()
        self.endtime = int(time.time())
        if args.cdash_buildstamp:
            self.buildstamp = args.cdash_buildstamp
        else:
            buildstamp_format = "%Y%m%d-%H%M-{0}".format(args.cdash_track)
            self.buildstamp = time.strftime(buildstamp_format,
                                            time.localtime(self.endtime))
        self.buildIds = collections.OrderedDict()
        self.revision = ''
        git = which('git')
        with working_dir(spack.paths.spack_root):
            self.revision = git('rev-parse', 'HEAD', output=str).strip()
        self.multiple_packages = False
Exemple #6
0
 def __init__(self, install_command, cdash_upload_url):
     Reporter.__init__(self, install_command, cdash_upload_url)
     self.template_file = os.path.join('reports', 'junit.xml')
Exemple #7
0
 def __init__(self, args):
     Reporter.__init__(self, args)
     self.template_file = os.path.join('reports', 'junit.xml')
Exemple #8
0
 def __init__(self, install_command, cdash_upload_url):
     Reporter.__init__(self, install_command, cdash_upload_url)
     self.template_file = os.path.join('reports', 'junit.xml')
Exemple #9
0
 def __init__(self, args):
     Reporter.__init__(self, args)
     # Posixpath is used here to support the underlying template enginge
     # Jinja2, which expects `/` path separators
     self.template_file = posixpath.join('reports', 'junit.xml')