def __init__(self): if helixpayload() and os.path.exists(os.path.join(helixpayload(), 'SOD')): self._setsodpath(os.path.join(helixpayload(), 'SOD')) elif helixworkitempayload() and os.path.exists(os.path.join(helixworkitempayload(), 'SOD')): self._setsodpath(os.path.join(helixworkitempayload(), 'SOD')) else: relpath = os.path.join(get_artifacts_directory(), 'SOD') sodproj = os.path.join('..', '..', 'tools', 'ScenarioMeasurement', 'SizeOnDisk', 'SizeOnDisk.csproj') sod = CSharpProject(CSharpProjFile(sodproj, sys.path[0]), os.path.join(os.path.dirname(sodproj), os.path.join(get_artifacts_directory(), 'SOD'))) if not os.path.exists(relpath): sod.restore(get_packages_directory(), True, getruntimeidentifier()) sod.publish('Release', relpath, True, get_packages_directory(), None, getruntimeidentifier(), None, '--no-restore' ) self._setsodpath(sod.bin_path)
def existing(self, projectdir: str, projectfile: str): 'create a project from existing project file' self._backup(projectdir) csproj = CSharpProjFile(os.path.join(const.APPDIR, projectfile), sys.path[0]) self.project = CSharpProject(csproj, const.BINDIR) self._updateframework(csproj.file_name)
def __init__(self): startupdir = 'startup' self.reportjson = os.path.join(TRACEDIR, 'perf-lab-report.json') if helixpayload() and os.path.exists(os.path.join(helixpayload(), startupdir)): self._setstartuppath(os.path.join(helixpayload(), startupdir)) elif helixworkitempayload() and os.path.exists(os.path.join(helixworkitempayload(), startupdir)): self._setstartuppath(os.path.join(helixworkitempayload(), startupdir)) else: relpath = os.path.join(get_artifacts_directory(), startupdir) startupproj = os.path.join('..', '..', 'tools', 'ScenarioMeasurement', 'Startup', 'Startup.csproj') startup = CSharpProject(CSharpProjFile(startupproj, sys.path[0]), os.path.join(os.path.dirname(startupproj), os.path.join(get_artifacts_directory(), startupdir))) if not os.path.exists(relpath): startup.restore(get_packages_directory(), True, getruntimeidentifier()) startup.publish('Release', relpath, True, get_packages_directory(), None, getruntimeidentifier(), None, '--no-restore' ) self._setstartuppath(startup.bin_path)
def __init__(self): payload = helixpayload() if payload: self._setstartuppath(os.path.join(payload, 'Startup')) else: startupproj = os.path.join('..', '..', 'tools', 'ScenarioMeasurement', 'Startup', 'Startup.csproj') startup = CSharpProject( CSharpProjFile(startupproj, sys.path[0]), os.path.join( os.path.dirname(startupproj), os.path.join(get_artifacts_directory(), 'startup'))) startup.restore(get_packages_directory(), True) startup.build(configuration='Release', verbose=True, packages_path=get_packages_directory(), output_to_bindir=True) self._setstartuppath(startup.bin_path)
def __init__(self): payload = helixpayload() if payload: self._setstartuppath(os.path.join(payload, 'Startup')) else: startupproj = os.path.join('..', '..', 'tools', 'ScenarioMeasurement', 'Startup', 'Startup.csproj') startup = CSharpProject( CSharpProjFile(startupproj, sys.path[0]), os.path.join( os.path.dirname(startupproj), os.path.join(get_artifacts_directory(), 'startup'))) startup.restore(get_packages_directory(), True, getruntimeidentifier()) startup.publish('Release', os.path.join(get_artifacts_directory(), 'startup'), True, get_packages_directory(), None, getruntimeidentifier(), '--no-restore') self._setstartuppath(startup.bin_path)
def __init__(self): payload_startup = os.path.join(helixpayload(), 'Startup') workitem_startup = os.path.join(helixworkitempayload(), 'Startup') if os.path.exists(payload_startup): self._setstartuppath(payload_startup) elif os.path.exists(workitem_startup): self._setstartuppath(workitem_startup) else: relpath = os.path.join(get_artifacts_directory(), 'startup') startupproj = os.path.join('..', '..', 'tools', 'ScenarioMeasurement', 'Startup', 'Startup.csproj') startup = CSharpProject( CSharpProjFile(startupproj, sys.path[0]), os.path.join( os.path.dirname(startupproj), os.path.join(get_artifacts_directory(), 'startup'))) if not os.path.exists(relpath): startup.restore(get_packages_directory(), True, getruntimeidentifier()) startup.publish('Release', relpath, True, get_packages_directory(), None, getruntimeidentifier(), '--no-restore') self._setstartuppath(startup.bin_path)
def existing(self, projectfile: str): 'create a project from existing project file' csproj = CSharpProjFile(projectfile, sys.path[0]) self.project = CSharpProject(csproj, const.BINDIR) return self