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 os.path
import environment, interpreter, mesonlib import environment, interpreter, mesonlib
import build import build
import platform
import mlog, coredata import mlog, coredata
from coredata import MesonException 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) env = environment.Environment(self.source_dir, self.build_dir, self.meson_script_file, self.options)
mlog.initialize(env.get_log_dir()) mlog.initialize(env.get_log_dir())
mlog.debug('Build started at', datetime.datetime.now().isoformat()) 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(mlog.bold('The Meson build system'))
mlog.log('Version:', coredata.version) mlog.log('Version:', coredata.version)
mlog.log('Source dir:', mlog.bold(self.source_dir)) mlog.log('Source dir:', mlog.bold(self.source_dir))

@ -17,7 +17,7 @@
import sys, os, subprocess, time, datetime, pickle, multiprocessing, json import sys, os, subprocess, time, datetime, pickle, multiprocessing, json
import concurrent.futures as conc import concurrent.futures as conc
import argparse import argparse
import platform import mesonlib
tests_failed = False tests_failed = False
@ -62,7 +62,7 @@ def write_json_log(jsonlogfile, test_name, result):
jsonlogfile.write(json.dumps(result) + '\n') jsonlogfile.write(json.dumps(result) + '\n')
def run_with_mono(fname): 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 True
return False return False

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

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

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

Loading…
Cancel
Save