Hello community, here is the log from the commit of package meson for openSUSE:Factory checked in at 2017-10-05 11:55:30 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/meson (Old) and /work/SRC/openSUSE:Factory/.meson.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "meson" Thu Oct 5 11:55:30 2017 rev:24 rq:530558 version:0.42.1 Changes: -------- --- /work/SRC/openSUSE:Factory/meson/meson-testsuite.changes 2017-08-24 18:26:53.029059262 +0200 +++ /work/SRC/openSUSE:Factory/.meson.new/meson-testsuite.changes 2017-10-05 11:55:32.931920619 +0200 @@ -1,0 +2,11 @@ +Mon Oct 2 14:53:40 CEST 2017 - [email protected] + +- Update to version 0.42.1. This is a stable update with various + bug fixes. + +------------------------------------------------------------------- +Fri Sep 8 12:22:38 UTC 2017 - [email protected] + +- Rebase meson-fix-gcc48.patch (boo#1057701). + +------------------------------------------------------------------- --- /work/SRC/openSUSE:Factory/meson/meson.changes 2017-09-12 19:37:13.504344398 +0200 +++ /work/SRC/openSUSE:Factory/.meson.new/meson.changes 2017-10-05 11:55:33.423851405 +0200 @@ -1,0 +2,6 @@ +Mon Oct 2 14:53:40 CEST 2017 - [email protected] + +- Update to version 0.42.1. This is a stable update with various + bug fixes. + +------------------------------------------------------------------- Old: ---- meson-0.42.0.tar.gz meson-0.42.0.tar.gz.asc New: ---- meson-0.42.1.tar.gz meson-0.42.1.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ meson-testsuite.spec ++++++ --- /var/tmp/diff_new_pack.MnpuuX/_old 2017-10-05 11:55:34.319725353 +0200 +++ /var/tmp/diff_new_pack.MnpuuX/_new 2017-10-05 11:55:34.319725353 +0200 @@ -24,7 +24,7 @@ %endif %define _name mesonbuild Name: meson%{name_ext} -Version: 0.42.0 +Version: 0.42.1 Release: 0 Summary: Python-based build system License: Apache-2.0 ++++++ meson.spec ++++++ --- /var/tmp/diff_new_pack.MnpuuX/_old 2017-10-05 11:55:34.339722540 +0200 +++ /var/tmp/diff_new_pack.MnpuuX/_new 2017-10-05 11:55:34.339722540 +0200 @@ -24,7 +24,7 @@ %endif %define _name mesonbuild Name: meson%{name_ext} -Version: 0.42.0 +Version: 0.42.1 Release: 0 Summary: Python-based build system License: Apache-2.0 ++++++ meson-0.42.0.tar.gz -> meson-0.42.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/PKG-INFO new/meson-0.42.1/PKG-INFO --- old/meson-0.42.0/PKG-INFO 2017-08-14 23:44:24.000000000 +0200 +++ new/meson-0.42.1/PKG-INFO 2017-09-12 18:37:32.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: meson -Version: 0.42.0 +Version: 0.42.1 Summary: A high performance build system Home-page: http://mesonbuild.com Author: Jussi Pakkanen diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/man/meson.1 new/meson-0.42.1/man/meson.1 --- old/meson-0.42.0/man/meson.1 2017-08-14 23:41:34.000000000 +0200 +++ new/meson-0.42.1/man/meson.1 2017-09-12 18:21:02.000000000 +0200 @@ -1,4 +1,4 @@ -.TH MESON "1" "August 2017" "meson 0.42.0" "User Commands" +.TH MESON "1" "September 2017" "meson 0.42.1" "User Commands" .SH NAME meson - a high productivity build system .SH DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/man/mesonconf.1 new/meson-0.42.1/man/mesonconf.1 --- old/meson-0.42.0/man/mesonconf.1 2017-08-14 23:41:43.000000000 +0200 +++ new/meson-0.42.1/man/mesonconf.1 2017-09-12 18:21:13.000000000 +0200 @@ -1,4 +1,4 @@ -.TH MESONCONF "1" "August 2017" "mesonconf 0.42.0" "User Commands" +.TH MESONCONF "1" "September 2017" "mesonconf 0.42.1" "User Commands" .SH NAME mesonconf - a tool to configure Meson builds .SH DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/man/mesonintrospect.1 new/meson-0.42.1/man/mesonintrospect.1 --- old/meson-0.42.0/man/mesonintrospect.1 2017-08-14 23:41:52.000000000 +0200 +++ new/meson-0.42.1/man/mesonintrospect.1 2017-09-12 18:21:24.000000000 +0200 @@ -1,4 +1,4 @@ -.TH MESONCONF "1" "August 2017" "mesonintrospect 0.42.0" "User Commands" +.TH MESONCONF "1" "September 2017" "mesonintrospect 0.42.1" "User Commands" .SH NAME mesonintrospect - a tool to extract information about a Meson build .SH DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/man/mesontest.1 new/meson-0.42.1/man/mesontest.1 --- old/meson-0.42.0/man/mesontest.1 2017-08-14 23:41:10.000000000 +0200 +++ new/meson-0.42.1/man/mesontest.1 2017-09-12 18:20:37.000000000 +0200 @@ -1,4 +1,4 @@ -.TH MESON "1" "August 2017" "meson 0.42.0" "User Commands" +.TH MESON "1" "September 2017" "meson 0.42.1" "User Commands" .SH NAME mesontest - test tool for the Meson build system .SH DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/man/wraptool.1 new/meson-0.42.1/man/wraptool.1 --- old/meson-0.42.0/man/wraptool.1 2017-08-14 23:41:16.000000000 +0200 +++ new/meson-0.42.1/man/wraptool.1 2017-09-12 18:20:46.000000000 +0200 @@ -1,4 +1,4 @@ -.TH WRAPTOOL "1" "August 2017" "meson 0.42.0" "User Commands" +.TH WRAPTOOL "1" "September 2017" "meson 0.42.1" "User Commands" .SH NAME wraptool - source dependency downloader .SH DESCRIPTION diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/backend/ninjabackend.py new/meson-0.42.1/mesonbuild/backend/ninjabackend.py --- old/meson-0.42.0/mesonbuild/backend/ninjabackend.py 2017-08-14 23:40:27.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/backend/ninjabackend.py 2017-09-12 18:13:24.000000000 +0200 @@ -629,7 +629,7 @@ added_rule = True htmloutdir = os.path.join(self.environment.get_log_dir(), 'coveragereport') covinfo = os.path.join(self.environment.get_log_dir(), 'coverage.info') - phony_elem = NinjaBuildElement(self.all_outputs, 'coverage-html', 'phony', os.path.join(htmloutdir, 'index.html')) + phony_elem = NinjaBuildElement(self.all_outputs, 'meson-coverage-html', 'phony', os.path.join(htmloutdir, 'index.html')) phony_elem.write(outfile) # Alias that runs the target defined above self.create_target_alias('meson-coverage-html', outfile) @@ -1833,7 +1833,9 @@ continue filename = s.absolute_path(self.environment.get_source_dir(), self.environment.get_build_dir()) - with open(filename) as f: + # Some Fortran editors save in weird encodings, + # but all the parts we care about are in ASCII. + with open(filename, errors='ignore') as f: for line in f: modmatch = modre.match(line) if modmatch is not None: @@ -2028,6 +2030,12 @@ # Add compiler args and include paths from several sources; defaults, # build options, external dependencies, etc. commands += self.generate_basic_compiler_args(target, compiler, no_warn_args) + # Add custom target dirs as includes automatically, but before + # target-specific include directories. + # XXX: Not sure if anyone actually uses this? It can cause problems in + # situations which increase the likelihood for a header name collision, + # such as in subprojects. + commands += self.get_custom_target_dir_include_args(target, compiler) # Add include dirs from the `include_directories:` kwarg on the target # and from `include_directories:` of internal deps of the target. # @@ -2071,14 +2079,12 @@ # from external dependencies, internal dependencies, and from # per-target `include_directories:` # - # We prefer headers in the build dir and the custom target dir over the - # source dir since, for instance, the user might have an - # srcdir == builddir Autotools build in their source tree. Many - # projects that are moving to Meson have both Meson and Autotools in - # parallel as part of the transition. + # We prefer headers in the build dir over the source dir since, for + # instance, the user might have an srcdir == builddir Autotools build + # in their source tree. Many projects that are moving to Meson have + # both Meson and Autotools in parallel as part of the transition. if target.implicit_include_directories: commands += self.get_source_dir_include_args(target, compiler) - commands += self.get_custom_target_dir_include_args(target, compiler) if target.implicit_include_directories: commands += self.get_build_dir_include_args(target, compiler) # Finally add the private dir for the target to the include path. This diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/backend/vs2010backend.py new/meson-0.42.1/mesonbuild/backend/vs2010backend.py --- old/meson-0.42.0/mesonbuild/backend/vs2010backend.py 2017-08-14 23:11:28.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/backend/vs2010backend.py 2017-09-12 18:13:24.000000000 +0200 @@ -764,6 +764,10 @@ # This is where Visual Studio will insert target_args, target_defines, # etc, which are added later from external deps (see below). args += ['%(AdditionalOptions)', '%(PreprocessorDefinitions)', '%(AdditionalIncludeDirectories)'] + # Add custom target dirs as includes automatically, but before + # target-specific include dirs. See _generate_single_compile() in + # the ninja backend for caveats. + args += ['-I' + arg for arg in generated_files_include_dirs] # Add include dirs from the `include_directories:` kwarg on the target # and from `include_directories:` of internal deps of the target. # @@ -790,14 +794,12 @@ if l in file_args: file_args[l] += args # The highest priority includes. In order of directory search: - # target private dir, target build dir, generated sources include dirs, - # target source dir + # target private dir, target build dir, target source dir for args in file_args.values(): t_inc_dirs = [self.relpath(self.get_target_private_dir(target), self.get_target_dir(target))] if target.implicit_include_directories: t_inc_dirs += ['.'] - t_inc_dirs += generated_files_include_dirs if target.implicit_include_directories: t_inc_dirs += [proj_to_src_dir] args += ['-I' + arg for arg in t_inc_dirs] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/compilers/compilers.py new/meson-0.42.1/mesonbuild/compilers/compilers.py --- old/meson-0.42.0/mesonbuild/compilers/compilers.py 2017-07-25 17:40:53.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/compilers/compilers.py 2017-09-12 18:13:24.000000000 +0200 @@ -1041,8 +1041,11 @@ return get_gcc_soname_args(gcc_type, prefix, shlib_name, suffix, path, soversion, is_shared_module) def has_multi_arguments(self, args, env): + myargs = ['-Werror=unknown-warning-option', '-Werror=unused-command-line-argument'] + if mesonlib.version_compare(self.version, '>=3.6.0'): + myargs.append('-Werror=ignored-optimization-argument') return super().has_multi_arguments( - ['-Werror=unknown-warning-option', '-Werror=unused-command-line-argument'] + args, + myargs + args, env) def has_function(self, funcname, prefix, env, extra_args=None, dependencies=None): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/coredata.py new/meson-0.42.1/mesonbuild/coredata.py --- old/meson-0.42.0/mesonbuild/coredata.py 2017-08-14 23:41:24.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/coredata.py 2017-09-12 18:20:54.000000000 +0200 @@ -19,7 +19,7 @@ from .mesonlib import default_libdir, default_libexecdir, default_prefix import ast -version = '0.42.0' +version = '0.42.1' backendlist = ['ninja', 'vs', 'vs2010', 'vs2015', 'vs2017', 'xcode'] class UserOption: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/dependencies/misc.py new/meson-0.42.1/mesonbuild/dependencies/misc.py --- old/meson-0.42.0/mesonbuild/dependencies/misc.py 2017-08-14 23:11:28.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/dependencies/misc.py 2017-09-12 18:13:24.000000000 +0200 @@ -142,7 +142,7 @@ def validate_requested(self): for m in self.requested_modules: - if m not in self.src_modules: + if m not in self.src_modules and m not in self.lib_modules and m + '-mt' not in self.lib_modules_mt: msg = 'Requested Boost module {!r} not found' raise DependencyException(msg.format(m)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/environment.py new/meson-0.42.1/mesonbuild/environment.py --- old/meson-0.42.0/mesonbuild/environment.py 2017-08-13 20:43:17.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/environment.py 2017-09-12 18:13:24.000000000 +0200 @@ -503,6 +503,24 @@ if isinstance(compiler, str): compiler = [compiler] if 'cl' in compiler or 'cl.exe' in compiler: + # Watcom C provides it's own cl.exe clone that mimics an older + # version of Microsoft's compiler. Since Watcom's cl.exe is + # just a wrapper, we skip using it if we detect its presence + # so as not to confuse Meson when configuring for MSVC. + # + # Additionally the help text of Watcom's cl.exe is paged, and + # the binary will not exit without human intervention. In + # practice, Meson will block waiting for Watcom's cl.exe to + # exit, which requires user input and thus will never exit. + if 'WATCOM' in os.environ: + def sanitize(p): + return os.path.normcase(os.path.abspath(p)) + + watcom_cls = [sanitize(os.path.join(os.environ['WATCOM'], 'BINNT', 'cl')), + sanitize(os.path.join(os.environ['WATCOM'], 'BINNT', 'cl.exe'))] + found_cl = sanitize(shutil.which('cl')) + if found_cl in watcom_cls: + continue arg = '/?' else: arg = '--version' @@ -531,10 +549,14 @@ cls = ClangCCompiler if lang == 'c' else ClangCPPCompiler return cls(ccache + compiler, version, cltype, is_cross, exe_wrap) if 'Microsoft' in out or 'Microsoft' in err: - # Visual Studio prints version number to stderr but - # everything else to stdout. Why? Lord only knows. + # Latest versions of Visual Studio print version + # number to stderr but earlier ones print version + # on stdout. Why? Lord only knows. + # Check both outputs to figure out version. version = search_version(err) - if not err or not err.split('\n')[0]: + if version == 'unknown version': + version = search_version(out) + if version == 'unknown version': m = 'Failed to detect MSVC compiler arch: stderr was\n{!r}' raise EnvironmentException(m.format(err)) is_64 = err.split('\n')[0].endswith(' x64') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/interpreter.py new/meson-0.42.1/mesonbuild/interpreter.py --- old/meson-0.42.0/mesonbuild/interpreter.py 2017-08-14 23:40:27.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/interpreter.py 2017-09-12 18:13:24.000000000 +0200 @@ -1269,9 +1269,7 @@ rust_kwargs | cs_kwargs) -exe_kwargs = set() -exe_kwargs.update(build_target_common_kwargs) - +exe_kwargs = (build_target_common_kwargs) | {'implib'} shlib_kwargs = (build_target_common_kwargs) | {'version', 'soversion'} shmod_kwargs = shlib_kwargs stlib_kwargs = shlib_kwargs @@ -2285,7 +2283,8 @@ else: if not isinstance(envlist, list): envlist = [envlist] - env = {} + # Convert from array to environment object + env = EnvironmentVariablesHolder() for e in envlist: if '=' not in e: raise InterpreterException('Env var definition must be of type key=val.') @@ -2294,7 +2293,8 @@ val = val.strip() if ' ' in k: raise InterpreterException('Env var key must not have spaces in it.') - env[k] = val + env.set_method([k, val], {}) + env = env.held_object return env def add_test(self, node, args, kwargs, is_base_test): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/mesonlib.py new/meson-0.42.1/mesonbuild/mesonlib.py --- old/meson-0.42.0/mesonbuild/mesonlib.py 2017-07-21 22:07:39.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/mesonlib.py 2017-09-12 18:13:24.000000000 +0200 @@ -264,7 +264,7 @@ def grab_leading_numbers(vstr, strict=False): result = [] - for x in vstr.split('.'): + for x in vstr.rstrip('.').split('.'): try: result.append(int(x)) except ValueError as e: @@ -716,6 +716,7 @@ def unholder_array(entries): result = [] + entries = flatten(entries) for e in entries: if hasattr(e, 'held_object'): e = e.held_object diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/mesonmain.py new/meson-0.42.1/mesonbuild/mesonmain.py --- old/meson-0.42.0/mesonbuild/mesonmain.py 2017-08-13 20:43:17.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/mesonmain.py 2017-09-10 12:06:11.000000000 +0200 @@ -63,6 +63,14 @@ add_builtin_argument('stdsplit', action='store_false') add_builtin_argument('errorlogs', action='store_false') +def wrapmodetype(string): + try: + return getattr(WrapMode, string) + except AttributeError: + msg = ', '.join([t.name.lower() for t in WrapMode]) + msg = 'invalid argument {!r}, use one of {}'.format(string, msg) + raise argparse.ArgumentTypeError(msg) + parser.add_argument('--cross-file', default=None, help='File describing cross compilation environment.') parser.add_argument('-D', action='append', dest='projectoptions', default=[], metavar="option", @@ -71,7 +79,7 @@ version=coredata.version) # See the mesonlib.WrapMode enum for documentation parser.add_argument('--wrap-mode', default=WrapMode.default, - type=lambda t: getattr(WrapMode, t), choices=WrapMode, + type=wrapmodetype, choices=WrapMode, help='Special wrap mode to use') parser.add_argument('directories', nargs='*') @@ -113,13 +121,14 @@ priv_dir = os.path.join(build_dir, 'meson-private/coredata.dat') if os.path.exists(priv_dir): if not handshake: - msg = '''Trying to run Meson on a build directory that has already been configured. + print('''Trying to run Meson on a build directory that has already been configured. If you want to build it, just run your build command (e.g. ninja) inside the build directory. Meson will autodetect any changes in your setup and regenerate -itself as required. +itself as required. Though it shouldn't be necessary, running ninja reconfigure +will force Meson to regenerate the build files. -If you want to change option values, use the mesonconf tool instead.''' - raise RuntimeError(msg) +If you want to change option values, use meson configure instead.''') + sys.exit(0) else: if handshake: raise RuntimeError('Something went terribly wrong. Please file a bug.') @@ -135,6 +144,12 @@ def generate(self): env = environment.Environment(self.source_dir, self.build_dir, self.meson_script_launcher, self.options, self.original_cmd_line_args) mlog.initialize(env.get_log_dir()) + try: + self._generate(env) + finally: + mlog.shutdown() + + def _generate(self, env): mlog.debug('Build started at', datetime.datetime.now().isoformat()) mlog.debug('Python binary:', sys.executable) mlog.debug('Python system:', platform.system()) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/mlog.py new/meson-0.42.1/mesonbuild/mlog.py --- old/meson-0.42.0/mesonbuild/mlog.py 2017-07-16 12:21:31.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/mlog.py 2017-08-19 00:48:23.000000000 +0200 @@ -31,7 +31,9 @@ def shutdown(): global log_file if log_file is not None: - log_file.close() + exception_around_goer = log_file + log_file = None + exception_around_goer.close() class AnsiDecorator: plain_code = "\033[0m" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/modules/gnome.py new/meson-0.42.1/mesonbuild/modules/gnome.py --- old/meson-0.42.0/mesonbuild/modules/gnome.py 2017-08-14 23:11:28.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/modules/gnome.py 2017-09-12 18:13:24.000000000 +0200 @@ -480,7 +480,7 @@ if 'b_sanitize' in compiler.base_options: sanitize = state.environment.coredata.base_options['b_sanitize'].value cflags += compilers.sanitizer_compile_args(sanitize) - if sanitize == 'address': + if 'address' in sanitize.split(','): ldflags += ['-lasan'] # FIXME: Linking directly to libasan is not recommended but g-ir-scanner # does not understand -f LDFLAGS. https://bugzilla.gnome.org/show_bug.cgi?id=783892 @@ -798,7 +798,7 @@ modulename = args[0] if not isinstance(modulename, str): raise MesonException('Argument must be a string') - return ModuleReturnValue(os.path.join('share/gtkdoc/html', modulename), []) + return ModuleReturnValue(os.path.join('share/gtk-doc/html', modulename), []) @staticmethod def _unpack_args(arg, kwarg_name, kwargs, expend_file_state=None): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/mesonbuild/scripts/meson_install.py new/meson-0.42.1/mesonbuild/scripts/meson_install.py --- old/meson-0.42.0/mesonbuild/scripts/meson_install.py 2017-08-13 20:43:17.000000000 +0200 +++ new/meson-0.42.1/mesonbuild/scripts/meson_install.py 2017-09-12 18:13:24.000000000 +0200 @@ -100,7 +100,7 @@ use_selinux = False msg = "{!r}: Failed to restore SELinux context, ignoring SELinux context for all remaining files..." print(msg.format(to_file, e.returncode)) - except (FileNotFoundError, subprocess.CalledProcessError) as e: + except (FileNotFoundError, PermissionError, subprocess.CalledProcessError) as e: # If we don't have selinux or selinuxenabled returned 1, failure # is ignored quietly. use_selinux = False diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/meson-0.42.0/run_unittests.py new/meson-0.42.1/run_unittests.py --- old/meson-0.42.0/run_unittests.py 2017-08-14 23:40:27.000000000 +0200 +++ new/meson-0.42.1/run_unittests.py 2017-09-12 18:13:24.000000000 +0200 @@ -813,6 +813,8 @@ self._run(self.mtest_command + ['--setup=empty']) # Setup with only env works self._run(self.mtest_command + ['--setup=onlyenv']) + self._run(self.mtest_command + ['--setup=onlyenv2']) + self._run(self.mtest_command + ['--setup=onlyenv3']) # Setup with only a timeout works self._run(self.mtest_command + ['--setup=timeout']) @@ -897,7 +899,7 @@ raise Exception('Could not find someexe and somfxe commands') # Check include order for 'someexe' incs = [a for a in shlex.split(execmd) if a.startswith("-I")] - self.assertEqual(len(incs), 8) + self.assertEqual(len(incs), 9) # target private dir self.assertPathEqual(incs[0], "-Isub4/someexe@exe") # target build subdir @@ -914,6 +916,8 @@ self.assertPathEqual(incs[6], "-Isub1") # target internal dependency include_directories: source dir self.assertPathBasenameEqual(incs[7], 'sub1') + # custom target include dir + self.assertPathEqual(incs[8], '-Ictsub') # Check include order for 'somefxe' incs = [a for a in shlex.split(fxecmd) if a.startswith('-I')] self.assertEqual(len(incs), 9) @@ -1288,6 +1292,9 @@ targets = mesonbuild.coredata.forbidden_target_names # We don't actually define a target with this name targets.pop('build.ninja') + # Remove this to avoid multiple entries with the same name + # but different case. + targets.pop('PHONY') for i in targets: self.assertPathExists(os.path.join(testdir, i)) @@ -1907,6 +1914,19 @@ for i in compdb: self.assertIn("-fsanitize=address", i["command"]) + def test_coverage(self): + if not shutil.which('gcovr'): + raise unittest.SkipTest('gcovr not found') + if not shutil.which('genhtml'): + raise unittest.SkipTest('genhtml not found') + if 'clang' in os.environ.get('CC', '') and os.environ.get('TRAVIS_OS_NAME', '') == 'linux': + raise unittest.SkipTest('Gcovr has a bug and does not work with Clang in the CI environment.') + testdir = os.path.join(self.common_test_dir, '1 trivial') + self.init(testdir, ['-Db_coverage=true']) + self.build() + self.run_tests() + self.run_target('coverage-html') + class LinuxArmCrossCompileTests(BasePlatformTests): ''' Tests that verify cross-compilation to Linux/ARM diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/112 has arg/meson.build" "new/meson-0.42.1/test cases/common/112 has arg/meson.build" --- "old/meson-0.42.0/test cases/common/112 has arg/meson.build" 2017-08-14 23:24:38.000000000 +0200 +++ "new/meson-0.42.1/test cases/common/112 has arg/meson.build" 2017-09-12 18:30:57.000000000 +0200 @@ -42,3 +42,10 @@ assert(cc.has_multi_arguments(pre_arg), 'Arg that should have worked does not work.') assert(cc.has_multi_arguments([pre_arg, arg]), 'Arg that should have worked does not work.') endif + +if cc.get_id() == 'clang' and cc.version().version_compare('<=4.0.0') + # 4.0.0 does not support -fpeel-loops. Newer versions may. + # Please adjust above version number as new versions of clang are released. + notyet_arg = '-fpeel-loops' + assert(not cc.has_argument(notyet_arg), 'Arg that should be broken (unless clang added support recently) is not.') +endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/138 include order/ctsub/copyfile.py" "new/meson-0.42.1/test cases/common/138 include order/ctsub/copyfile.py" --- "old/meson-0.42.0/test cases/common/138 include order/ctsub/copyfile.py" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.42.1/test cases/common/138 include order/ctsub/copyfile.py" 2017-09-11 20:02:01.000000000 +0200 @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +import sys +import shutil + +shutil.copyfile(sys.argv[1], sys.argv[2]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/138 include order/ctsub/main.h" "new/meson-0.42.1/test cases/common/138 include order/ctsub/main.h" --- "old/meson-0.42.0/test cases/common/138 include order/ctsub/main.h" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.42.1/test cases/common/138 include order/ctsub/main.h" 2017-09-11 20:02:01.000000000 +0200 @@ -0,0 +1 @@ +#error "ctsub/main.h included" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/138 include order/ctsub/meson.build" "new/meson-0.42.1/test cases/common/138 include order/ctsub/meson.build" --- "old/meson-0.42.0/test cases/common/138 include order/ctsub/meson.build" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.42.1/test cases/common/138 include order/ctsub/meson.build" 2017-09-11 20:02:01.000000000 +0200 @@ -0,0 +1,9 @@ +# https://github.com/mesonbuild/meson/pull/2291 +copy = find_program('copyfile.py') +configure_file(input : 'main.h', + output : 'main.h', + command : [copy, '@INPUT@', '@OUTPUT@']) +ctfile = custom_target('emptyfile', + input : 'emptyfile.c', + output : 'emptyfile.c', + command : [copy, '@INPUT@', '@OUTPUT@']) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/138 include order/meson.build" "new/meson-0.42.1/test cases/common/138 include order/meson.build" --- "old/meson-0.42.0/test cases/common/138 include order/meson.build" 2017-08-14 23:25:28.000000000 +0200 +++ "new/meson-0.42.1/test cases/common/138 include order/meson.build" 2017-09-12 18:31:42.000000000 +0200 @@ -10,6 +10,8 @@ # 5. Include paths added via `include_directories:` of internal deps # Within this, the build dir takes precedence over the source dir +# Custom target dir with a built header +subdir('ctsub') # Defines an internal dep subdir('sub1') # Defines a per-target include path diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/138 include order/sub4/meson.build" "new/meson-0.42.1/test cases/common/138 include order/sub4/meson.build" --- "old/meson-0.42.0/test cases/common/138 include order/sub4/meson.build" 2017-03-28 21:40:23.000000000 +0200 +++ "new/meson-0.42.1/test cases/common/138 include order/sub4/meson.build" 2017-09-11 20:02:01.000000000 +0200 @@ -1,4 +1,4 @@ -e = executable('someexe', 'main.c', +e = executable('someexe', 'main.c', ctfile, c_args : ['-I' + sub3], include_directories : j, dependencies : dep) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/159 reserved targets/PHONY/meson.build" "new/meson-0.42.1/test cases/common/159 reserved targets/PHONY/meson.build" --- "old/meson-0.42.0/test cases/common/159 reserved targets/PHONY/meson.build" 2017-08-14 23:40:27.000000000 +0200 +++ "new/meson-0.42.1/test cases/common/159 reserved targets/PHONY/meson.build" 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -executable('test-PHONY', '../test.c') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/159 reserved targets/meson.build" "new/meson-0.42.1/test cases/common/159 reserved targets/meson.build" --- "old/meson-0.42.0/test cases/common/159 reserved targets/meson.build" 2017-08-14 23:40:27.000000000 +0200 +++ "new/meson-0.42.1/test cases/common/159 reserved targets/meson.build" 2017-09-12 18:32:18.000000000 +0200 @@ -15,11 +15,10 @@ subdir('dist') subdir('distcheck') subdir('install') -# We end up creating duplicate lowercase target names for this on -# case-insensitive HFS+, so disable it -# https://travis-ci.org/mesonbuild/meson/jobs/264468097 -#subdir('phony') -subdir('PHONY') +# We don't have a 'PHONY' directory because Windows and OSX +# choke horribly when there are two entries with the same +# name but different case. +subdir('phony') subdir('reconfigure') subdir('scan-build') subdir('test') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/48 test args/copyfile.py" "new/meson-0.42.1/test cases/common/48 test args/copyfile.py" --- "old/meson-0.42.0/test cases/common/48 test args/copyfile.py" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.42.1/test cases/common/48 test args/copyfile.py" 2017-09-12 18:12:44.000000000 +0200 @@ -0,0 +1,6 @@ +#!/usr/bin/env python3 + +import sys +import shutil + +shutil.copyfile(sys.argv[1], sys.argv[2]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/48 test args/meson.build" "new/meson-0.42.1/test cases/common/48 test args/meson.build" --- "old/meson-0.42.0/test cases/common/48 test args/meson.build" 2017-08-14 23:22:49.000000000 +0200 +++ "new/meson-0.42.1/test cases/common/48 test args/meson.build" 2017-09-12 18:29:17.000000000 +0200 @@ -18,4 +18,18 @@ test('command line arguments', e1, args : ['first', 'second']) test('environment variables', e2, env : env) test('environment variables 2', e3, env : env2) -test('file arg', find_program('tester.py'), args : files('testfile.txt')) + +# https://github.com/mesonbuild/meson/issues/2211#issuecomment-327741571 +env_array = ['MESONTESTING=picklerror'] +testfile = files('testfile.txt') +testerpy = find_program('tester.py') +test('file arg', testerpy, args : testfile, env : env_array) + +copy = find_program('copyfile.py') +tester = executable('tester', 'tester.c') +testfilect = custom_target('testfile', + input : testfile, + output : 'outfile.txt', + build_by_default : true, + command : [copy, '@INPUT@', '@OUTPUT@']) +test('custom target arg', tester, args : testfilect, env : env_array) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/48 test args/tester.c" "new/meson-0.42.1/test cases/common/48 test args/tester.c" --- "old/meson-0.42.0/test cases/common/48 test args/tester.c" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.42.1/test cases/common/48 test args/tester.c" 2017-09-12 18:12:44.000000000 +0200 @@ -0,0 +1,34 @@ +#include <stdio.h> +#include <string.h> +#include <fcntl.h> +#include <errno.h> + +#ifndef _MSC_VER +#include <unistd.h> +#endif + +int main(int argc, char **argv) { + char data[10]; + int fd, size; + + if (argc != 2) { + fprintf(stderr, "Incorrect number of arguments, got %i\n", argc); + return 1; + } + fd = open(argv[1], O_RDONLY); + if (fd < 0) { + fprintf(stderr, "First argument is wrong.\n"); + return 1; + } + + size = read(fd, data, 8); + if (size < 0) { + fprintf(stderr, "Failed to read: %s\n", strerror(errno)); + return 1; + } + if (strncmp(data, "contents", 8) != 0) { + fprintf(stderr, "Contents don't match, got %s\n", data); + return 1; + } + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/common/87 declare dep/entity/meson.build" "new/meson-0.42.1/test cases/common/87 declare dep/entity/meson.build" --- "old/meson-0.42.0/test cases/common/87 declare dep/entity/meson.build" 2016-06-01 21:38:46.000000000 +0200 +++ "new/meson-0.42.1/test cases/common/87 declare dep/entity/meson.build" 2017-09-12 18:12:44.000000000 +0200 @@ -1,6 +1,6 @@ entity_lib = static_library('entity', 'entity1.c') -entity_dep = declare_dependency(link_with : entity_lib, +entity_dep = declare_dependency(link_with : [[entity_lib]], include_directories : include_directories('.'), sources : 'entity2.c', compile_args : ['-DUSING_ENT=1'], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/frameworks/1 boost/extralib.cpp" "new/meson-0.42.1/test cases/frameworks/1 boost/extralib.cpp" --- "old/meson-0.42.0/test cases/frameworks/1 boost/extralib.cpp" 1970-01-01 01:00:00.000000000 +0100 +++ "new/meson-0.42.1/test cases/frameworks/1 boost/extralib.cpp" 2017-08-20 22:21:37.000000000 +0200 @@ -0,0 +1,25 @@ +#include <iostream> +#include <boost/log/trivial.hpp> +#include <boost/log/expressions.hpp> +#include <boost/log/utility/setup/console.hpp> +#include <boost/log/utility/setup/common_attributes.hpp> + +using namespace std; +namespace logging = boost::log; + +void InitLogger() { + logging::add_common_attributes(); + logging::register_simple_formatter_factory<logging::trivial::severity_level, char>("Severity"); + string log_format = "%TimeStamp% [%Severity%] - %Message%"; + + logging::add_console_log( + cout, + logging::keywords::format = log_format + ); +} + +int main(int argc, char **argv) { + InitLogger(); + BOOST_LOG_TRIVIAL(trace) << "SOMETHING"; + return 0; +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/frameworks/1 boost/meson.build" "new/meson-0.42.1/test cases/frameworks/1 boost/meson.build" --- "old/meson-0.42.0/test cases/frameworks/1 boost/meson.build" 2017-08-14 23:29:28.000000000 +0200 +++ "new/meson-0.42.1/test cases/frameworks/1 boost/meson.build" 2017-09-12 18:35:25.000000000 +0200 @@ -1,6 +1,10 @@ project('boosttest', 'cpp', default_options : ['cpp_std=c++11']) +add_project_arguments(['-DBOOST_LOG_DYN_LINK'], + language : 'cpp' +) + # We want to have multiple separate configurations of Boost # within one project. The need to be independent of each other. # Use one without a library dependency and one with it. @@ -10,15 +14,18 @@ staticdep = dependency('boost', modules : ['thread', 'system'], static : true) testdep = dependency('boost', modules : 'test') nomoddep = dependency('boost') +extralibdep = dependency('boost', modules : ['thread', 'system', 'log_setup', 'log']) nolinkexe = executable('nolinkedexe', 'nolinkexe.cc', dependencies : nolinkdep) linkexe = executable('linkedexe', 'linkexe.cc', dependencies : linkdep) staticexe = executable('staticlinkedexe', 'linkexe.cc', dependencies : staticdep) unitexe = executable('utf', 'unit_test.cpp', dependencies: testdep) nomodexe = executable('nomod', 'nomod.cpp', dependencies : nomoddep) +extralibexe = executable('extralibexe', 'extralib.cpp', dependencies : extralibdep) test('Boost nolinktest', nolinkexe) test('Boost linktest', linkexe) test('Boost statictest', staticexe) test('Boost UTF test', unitexe) test('Boost nomod', nomodexe) +test('Boost extralib test', extralibexe) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/frameworks/10 gtk-doc/meson.build" "new/meson-0.42.1/test cases/frameworks/10 gtk-doc/meson.build" --- "old/meson-0.42.0/test cases/frameworks/10 gtk-doc/meson.build" 2017-06-22 23:45:53.000000000 +0200 +++ "new/meson-0.42.1/test cases/frameworks/10 gtk-doc/meson.build" 2017-09-04 18:44:29.000000000 +0200 @@ -2,7 +2,7 @@ gnome = import('gnome') -assert(gnome.gtkdoc_html_dir('foobar') == 'share/gtkdoc/html/foobar', 'Gtkdoc install dir is incorrect.') +assert(gnome.gtkdoc_html_dir('foobar') == 'share/gtk-doc/html/foobar', 'Gtkdoc install dir is incorrect.') inc = include_directories('include') diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' "old/meson-0.42.0/test cases/unit/2 testsetups/meson.build" "new/meson-0.42.1/test cases/unit/2 testsetups/meson.build" --- "old/meson-0.42.0/test cases/unit/2 testsetups/meson.build" 2017-02-28 23:01:35.000000000 +0100 +++ "new/meson-0.42.1/test cases/unit/2 testsetups/meson.build" 2017-09-10 12:06:11.000000000 +0200 @@ -16,5 +16,7 @@ add_test_setup('empty') add_test_setup('onlyenv', env : env) +add_test_setup('onlyenv2', env : 'TEST_ENV=1') +add_test_setup('onlyenv3', env : ['TEST_ENV=1']) add_test_setup('wrapper', exe_wrapper : [vg, '--error-exitcode=1']) add_test_setup('timeout', timeout_multiplier : 20)
