Linux updates for test tool

This commit is contained in:
Asher Baker
2018-07-19 13:55:28 +01:00
parent 9548b0c025
commit 2aea141c56
6 changed files with 49 additions and 242 deletions
+15 -22
View File
@@ -9,37 +9,30 @@ def BuildEverything():
if AMBuild.target['platform'] not in ['linux', 'windows']:
return
BuildBreakpad()
if AMBuild.target['platform'] in ['windows']:
BuildBreakpad()
BuildExtension();
def BuildBreakpad():
breakpad = AMBuild.AddJob('breakpad')
if AMBuild.target['platform'] in ['linux']:
if osutil.FileExists(os.path.join(AMBuild.outputFolder, 'breakpad', 'src', 'client', 'linux', 'libbreakpad_client.a')):
return
if osutil.FileExists(os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib')):
return
breakpad.AddCommand(ShellCommand('CXXFLAGS=-m32 CFLAGS=-m32 CPPFLAGS=-m32 ' + os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'configure')))
breakpad.AddCommand(ShellCommand('make src/client/linux/libbreakpad_client.a'))
breakpad.AddCommand(ShellCommand('make src/libbreakpad.a src/third_party/libdisasm/libdisasm.a'))
gyp = os.path.join(AMBuild.sourceFolder, 'breakpad', 'gyp', 'gyp.bat')
elif AMBuild.target['platform'] in ['windows']:
if osutil.FileExists(os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'client', 'windows', 'handler', 'Release', 'lib', 'exception_handler.lib')):
return
gyppath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.gyp')
breakpad.AddCommand(DirectCommand([gyp, '--no-circular-check', gyppath]))
gyp = os.path.join(AMBuild.sourceFolder, 'breakpad', 'gyp', 'gyp.bat')
slnpath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.sln')
breakpad.AddCommand(DirectCommand(['msbuild', slnpath, '/p:Configuration=Release']))
gyppath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.gyp')
breakpad.AddCommand(DirectCommand([gyp, '--no-circular-check', gyppath]))
gyppath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'crash_generation', 'crash_generation.gyp')
breakpad.AddCommand(DirectCommand([gyp, '--no-circular-check', gyppath]))
slnpath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'handler', 'exception_handler.sln')
breakpad.AddCommand(DirectCommand(['msbuild', slnpath, '/p:Configuration=Release']))
gyppath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'crash_generation', 'crash_generation.gyp')
breakpad.AddCommand(DirectCommand([gyp, '--no-circular-check', gyppath]))
slnpath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'crash_generation', 'crash_generation.sln')
breakpad.AddCommand(DirectCommand(['msbuild', slnpath, '/p:Configuration=Release']))
slnpath = os.path.join(AMBuild.sourceFolder, 'breakpad', 'src', 'src', 'client', 'windows', 'crash_generation', 'crash_generation.sln')
breakpad.AddCommand(DirectCommand(['msbuild', slnpath, '/p:Configuration=Release']))
def BuildExtension():
compiler = SM.DefaultCompiler()
@@ -69,7 +62,7 @@ def BuildExtension():
if AMBuild.target['platform'] in ['linux']:
link = os.path.join(AMBuild.outputFolder, extension.workFolder, 'libbreakpad_client.a')
target = os.path.join(AMBuild.outputFolder, 'breakpad', 'src', 'client', 'linux', 'libbreakpad_client.a')
target = os.path.join(AMBuild.sourceFolder, 'breakpad', 'build', 'src', 'client', 'linux', 'libbreakpad_client.a')
try:
os.lstat(link)
except: