More robust windows detection and more logs.

pull/243/head
Jussi Pakkanen 9 years ago
parent c19570654c
commit 9d559b2b39
  1. 3
      meson.py
  2. 4
      meson_test.py
  3. 3
      mesonlib.py
  4. 8
      run_tests.py
  5. 7
      symbolextractor.py

@ -19,6 +19,7 @@ import datetime
import os.path
import environment, interpreter, mesonlib
import build
import platform
import mlog, coredata
from coredata import MesonException
@ -118,6 +119,8 @@ itself as required.'''
env = environment.Environment(self.source_dir, self.build_dir, self.meson_script_file, self.options)
mlog.initialize(env.get_log_dir())
mlog.debug('Build started at', datetime.datetime.now().isoformat())
mlog.debug('Python binary:', sys.executable)
mlog.debug('Python system:', platform.system())
mlog.log(mlog.bold('The Meson build system'))
mlog.log('Version:', coredata.version)
mlog.log('Source dir:', mlog.bold(self.source_dir))

@ -17,7 +17,7 @@
import sys, os, subprocess, time, datetime, pickle, multiprocessing, json
import concurrent.futures as conc
import argparse
import platform
import mesonlib
tests_failed = False
@ -62,7 +62,7 @@ def write_json_log(jsonlogfile, test_name, result):
jsonlogfile.write(json.dumps(result) + '\n')
def run_with_mono(fname):
if fname.endswith('.exe') and not platform.system().lower() == 'windows':
if fname.endswith('.exe') and not mesonlib.is_windows():
return True
return False

@ -76,7 +76,8 @@ def is_linux():
return platform.system().lower() == 'linux'
def is_windows():
return platform.system().lower() == 'windows'
platname = platform.system().lower()
return platname == 'windows' or 'mingw' in platname
def is_debianlike():
try:

@ -15,7 +15,7 @@
# limitations under the License.
from glob import glob
import os, subprocess, shutil, sys, platform, signal
import os, subprocess, shutil, sys, signal
from io import StringIO
import sys
import environment
@ -91,11 +91,11 @@ def setup_commands(backend):
install_commands = [ninja_command, 'install']
def platform_fix_filename(fname):
if platform.system() == 'Darwin':
if mesonlib.is_osx():
if fname.endswith('.so'):
return fname[:-2] + 'dylib'
return fname.replace('.so.', '.dylib.')
elif platform.system() == 'Windows':
elif mesonlib.is_windows():
if fname.endswith('.so'):
(p, f) = os.path.split(fname)
f = f[3:-2] + 'dll'
@ -105,7 +105,7 @@ def platform_fix_filename(fname):
return fname
def validate_install(srcdir, installdir):
if platform.system() == 'Windows':
if mesonlib.is_windows():
# Don't really know how Windows installs should work
# so skip.
return ''

@ -22,7 +22,8 @@
# This file is basically a reimplementation of
# http://cgit.freedesktop.org/libreoffice/core/commit/?id=3213cd54b76bc80a6f0516aac75a48ff3b2ad67c
import sys, subprocess, platform
import sys, subprocess
import mesonlib
import argparse
parser = argparse.ArgumentParser()
@ -84,9 +85,9 @@ def gen_symbols(libfilename, outfilename, cross_host):
# toolset but there are more important things
# to do.
dummy_syms(outfilename)
elif platform.system() == 'Linux':
elif mesonlib.is_linux():
linux_syms(libfilename, outfilename)
elif platform.system() == 'Darwin':
elif mesonlib.is_osx():
osx_syms(libfilename, outfilename)
else:
dummy_syms(outfilename)

Loading…
Cancel
Save