Age | Commit message (Collapse) | Author | Files | Lines |
|
Since this is optional, we should not accept that GCC is a valid ObjC or
G++ is a valid ObjC++ Compiler unless we've tested that they can
actually do a basic compile.
This requires fixing a number of tests that have broken assumptions. In
some cases I've split tests where issues with one language would hide
the other. It would be great if we had a competent test framework that
allowed subtests to skip, unfortunately we have python's unittest
instead. Because of that we can't avoid extra tests by use of subtests.
|
|
This tests ObjC and ObjC++ both with and without C enabled. I did this
because I ran into issues where ObjC only worked when C was enabled, and
then a later bug where C was disabled, due to the fact that C and ObjC
both use `c_std` and not `objc_std`.
|
|
Check clang-cl as well as cl, and clang as well as gcc.
|
|
When used as a class decorator VSCode can no longer see that
BasePlatformTest is a TestCase. I hate having to adapt the code to the
tools, but it's really annoying to not have completion and syntax
highlighting.
|
|
|
|
|
|
In a3679a64e (programs: favor version numbers with dots, 2025-01-03) we
have changed the regex used to extract version numbers to favor dotted
versions. It was reported though that the regex doesn't match major
version numbers that start with multiple digits correctly. Fix this.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
|
|
When using `find_program('perl')` we misdetect its version number:
Program perl found: YES 40 40 (/usr/bin/perl)
This is caused by Perl outputting the version information in a somewhat
weird format:
$ perl --version
This is perl 5, version 40, subversion 0 (v5.40.0) built for x86_64-linux-thread-multi
...
The problem here is that our version number detection picks the first
match of at one digit followed by at least one more digit and/or dot.
Consequently, as "40" matches that regular expression, we'd return its
value as the version number.
Naturally, the version number detection we perform is best-effort, only,
as there is no standardized format used by all programs. That being
said, we can do better here by first trying to match a dotted version
number so that we'd match the "5.40.0" string, not the "40". And given
that most projects use dotted version numbers this should be a strict
improvement in cases where we have multiple digits in-text. The old
behaviour continues to be used as a fallback though in case we weren't
able to match anything to not regress functionality.
The new regex also fixes another case: when the version information ends
with a trailing dot, like "foo version 1.2.3.", then we'd also have
matched that trailing dot. This can be for example the case when version
numbers end with ".rc1" or something similar. While we'd ideally include
such suffixes into the detected version, that issue is left for another
day.
Add a couple of tests.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
|
|
|
|
Inconsistency in the original implementation of commit
79e2c52a15e896e46ff3cfa3ec16fbf3f132ee01.
If an explicit list of targets is passed on the CLI, then that is passed
to rebuild_deps. If not, we pass every loaded test to rebuild_deps
instead. This means we cannot distinguish between "trying to run all
tests" and "trying to run specific tests". We then load all the deps for
all tests, and try to build them all as explicit arguments to the
underlying ninja.
There are two situations where this falls flat:
- given underspecified deps
- given all (selected?) tests legitimately happen to have no
dependencies
In both cases, we calculate that there are no deps to rebuild, we run
ninja without any targets, and this invokes the default "all" rule and
maybe builds a few thousand targets that this specific test run does not
need.
Additionally, in large projects which define many tests with many
dependencies, we could end up overflowing ARG_MAX when processing *all*
tests.
Instead, pass no tests to rebuild_deps. We then specially handle this by
directly running the relevant ninja target for "all test deps", which is
overall more elegant than specifying many many dependencies by name.
Given a subset of tests to guarantee the freshness of, we instead skip
running ninja at all if there are indeed no test dependencies.
|
|
This reverts commit 3c38e4720f7df0a9d0138363a9a995b31e848401.
|
|
Tests can tread on each other's toes when parallelism is high enough.
In this case, `test_prebuilt_shared_lib` creates an object file in the
`17 prebuilt shared` test dir.
`test_prebuilt_shared_lib_rpath_same_prefix` uses `shutil.copytree` to
copy that same test dir to a temporary location.
If the former test cleans up its object file while `copytree` is
running, the copy can fail with a fatal ENOENT `shutil.Error`.
Use `copy_srcdir` to prevent this from happening.
|
|
With
CC=ccache meson ...
meson crashes with
[...]
File "/usr/lib/python3.10/site-packages/mesonbuild/compilers/detect.py", line 364, in _detect_c_or_cpp_compiler
compiler_name = os.path.basename(compiler[0])
IndexError: list index out of range
Improve this by throwing an EnvironmentException to fail gracefully when
no compiler is specified.
Fixes #9933
Fixes #13589
|
|
It's not the first time I run into an issue with an intentionally missing
exe_wrapper during cross compilation. In pretty much all the cases the project
I tried to build already had code available to not need one in the first place.
Print out what command was actually the culprit to make debugging this easier.
|
|
Resolves: #13802
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Add a target that builds all crates that could be extern to others,
and then reruns clippy.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
Even though the "targets" introspection info already includes the
command line arguments used to invoke the compiler, this is not
enough to correlated with the "compilers" introspection info and
get extra information from there.
Together with the existing "language" key, adding a "machine" key
is enough to identify completely an entry in the compilers info.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
|
Any argument from the base target is copied to the test target, but some
keyword arguments for libraries are not available in executable.
Remove them.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
In some reason, recent version of MSYS2 is shipped with /usr/bin/cmd
which makes the test fail
|
|
Prepend the path of uninstalled libraries to PKG_CONFIG_PATH
so they have preference over other search paths set by the
user.
see: https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/3247
|
|
This is functionally equivalent to the logic used to locate the cross
exe_wrapper, but puts it below the "Compilers" heading rather than
"Other binaries".
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
Recent versions of the architecture-properties package provide a
cross-exe-wrapper package containing
${DEB_HOST_GNU_TYPE}-cross-exe-wrapper, which is currently a wrapper
around qemu-user but could use different emulators on each architecture
if it becomes necessary in the future.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
In Debian testing/unstable, there are wrappers available for various
GObject-Introspection tools during cross-builds, using qemu internally.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
Remove some trailing periods and always use present continuous tense (since
these appear as status messages).
|
|
uname -s does return gnu there.
Resolves: https://github.com/mesonbuild/meson/issues/13740
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
|
|
|
|
|
|
|
|
`DEB_HOST_ARCH` encodes both the CPU family and the OS, so using it to
get the CPU type gives the wrong answer for non-Linux ports.
However, `DEB_HOST_GNU_CPU` gives less detailed information about the
CPU: it's `arm` for all 32-bit ARM CPUs, and doesn't distinguish between
the differing baselines of `armel` (ARMv5 softfloat) and `armhf`
(ARMv7 hardfloat).
When cross-compiling for x86_64 Linux, this changes the `cpu()` from
`amd64` to `x86_64`, which is consistent with the answer we get during
native builds on that architecture.
When cross-compiling for `ppc64el`, this changes the `cpu()` from
`ppc64el` to `ppc64`, which is a reasonable change but is still not
consistent with what we see during native builds (which is `ppc64le`):
see #13741 for that.
Resolves: https://github.com/mesonbuild/meson/issues/13742
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
All official Debian release architectures use the Linux kernel, but
unofficial ports like hurd-i386 and kfreebsd-amd64 use the Hurd and
FreeBSD kernel, respectively.
Map Linux to 'linux' and kFreeBSD ports to 'freebsd' as per the
reference tables in Meson's documentation. For now, use the Debian
system name such as 'hurd' for anything else (see #13740 for the
question of whether Hurd should identify its kernel differently).
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
As per <https://mesonbuild.com/Reference-tables.html>, and matching what
happens when running Meson for a native build on Debian GNU/Hurd.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
This test parses several possible outputs of dpkg-architecture and
asserts that they produce the expected MachineInfo.
To avoid depending on suitable cross-tools being installed, use
unittest.mock to override locate_path with a version that pretends that
all of the tools we're interested in are in /usr/bin.
Similarly, use mock environment variables to exercise what happens
when we have those set.
The test data used here exercises most variations:
* big- and little-endianness
* GNU CPU (x86_64) differing from dpkg CPU (amd64)
* Linux, kFreeBSD and Hurd
* special-cased architectures: x86, arm, mips64el, ppc64el
expected_compilers() intentionally doesn't assume that every compiler
is gcc (even though they all are, right now), because #13721 proposes
adding valac which does not take a gcc suffix.
Signed-off-by: Simon McVittie <smcv@debian.org>
|
|
Fixes: #13711
|
|
This allows checking for tools that may not be available in older version of qt
or avoiding requesting tools that may not be necessary for a given project
Co-authored-by: Nirbheek Chauhan <nirbheek@centricular.com>
|
|
Send the info to stdout, where it belongs.
|
|
|
|
- detect unknown config keys in format config
- add test for detection of invalid config values
- detect invalid .editorconfig values
Fixes #13569
|
|
|
|
|
|
|
|
The flag was only introduced in ld 224.1, as mentioned in the initial PR
#13291.
Resolves #13543
|
|
Fixes #13508
- Fix indentation of comments in arrays
- Fix indentation of comments in dicts
- Fix indentation of comments in if clauses
- Fix indentation of comments in foreach clauses
|
|
for test attributes that are class constant. This reduces the work that
must be done for each test case, allowing some of the setup work to be
done once for the entire class.
|
|
|
|
|
|
Being unset shouldn't cause a ton of our tests to fail.
|
|
Correct base classes so GNU-like linkers all default to supporting response files.
|
|
This reverts commit 0c93149f09bbeedd03c70abc7b6d652b8e9ee9fa.
|
|
Running meson format multiple times on an empty file was adding a new line each time, which is bad for pre-commit checks...
|