Commit Graph

7152 Commits

Author SHA1 Message Date
Daniel Mensinger bd5d54513c rewriter: Handle Arithmetic node 2019-03-03 20:25:07 +02:00
Jussi Pakkanen 1997ac2478
Merge pull request #4958 from bonzini/tap
Add initial TAP test support
2019-03-03 14:02:16 +02:00
Daniel Mensinger 5a22bb7901 rewriter: Use mparser to detect the end of some nodes 2019-03-03 13:57:25 +02:00
Daniel Mensinger 7199cd2095 rewriter: Avoid duplicates 2019-03-02 17:05:10 +02:00
Dylan Baker 841da29d2c Fix ternary in thing (#5007)
* tests: extend ternary test to cover bugs

See issues #5003, #3690, and #2404

* mparser: store subdir in ternary node

Ternaries don't really need subdirs, but they can be passed into
functions that expect the type they're provided to have a
subdir. Provide it to fulful the interface.

Fixes #5003
Fixes #3690
Fixes #2404
2019-03-02 12:57:24 +02:00
Steve Lhomme cb9b151985 Move the optimization options in the compiler config
They have no effect in the "Configuration" PropertyGroup at least in VS2017
2019-03-02 12:40:56 +02:00
Paolo Bonzini 91f847d308 mtest: implement TAP parsing
This provides an initial support for parsing TAP output.  It detects failures
and skipped tests without relying on exit code, as well as early termination
of the test due to an error or a crash.

For now, subtests are not recorded in the TestRun object.  However, because the
TAP output goes on stdout, it is printed by --print-errorlogs when a test does
not behave as expected.  Handling subtests as TestRuns, and serializing them
to JSON, can be added later.

The parser was written specifically for Meson, and comes with its own
test suite.

Fixes #2923.
2019-03-02 09:07:54 +01:00
Paolo Bonzini f2e513791e mtest: add support for hard errors
Hard errors also come from the GNU Automake test protocol.  They happen when
e.g., the set-up of a test case scenario fails, or when some
other unexpected or highly undesirable condition is encountered.

TAP will use them for parse errors too.  Add them to the exitcode protocol
first.
2019-03-02 09:07:54 +01:00
Paolo Bonzini d830945224 mtest: do not use return code to look for failed tests
--print-errorlogs is using the test's return code to look for failed
tests, instead of just looking at the TestResult.  Simplify the code and
make it work for TAP too.
2019-03-02 09:07:54 +01:00
Paolo Bonzini 1264f03637 mtest: refactor TestRun creation
Parse the error code outside SingleTestRunner's run() method.  This
will let us add TAP support without complicating that long method
further.
2019-03-02 09:07:54 +01:00
Paolo Bonzini 4b5cf3f7c5 interpreter: add "protocol" kwarg to test
This is the first step towards adding support for TAP.
2019-03-02 09:07:54 +01:00
Daniel Schulte f0b0bcf86d mintro: Add subproject_dir to --projectinfo 2019-03-01 23:40:33 +02:00
Daniel Schulte 924cf5e622 mintro: Add name of subproject the target is contained in to --target output 2019-03-01 22:29:52 +02:00
Nicolas Schneider ded0defc3f auto generate msvc pch source file if none is provided by the user 2019-03-01 21:50:31 +02:00
Daniel Mensinger fcd608c131 azure: Fix python3 in vs2017 tasks 2019-03-01 20:49:17 +02:00
Jussi Pakkanen a322dc534b Revert "Improve declare_dependency() example in Generating-sources.md [skip ci]"
This reverts commit 67a01c8d7f.
2019-02-28 22:41:06 +02:00
Michael Hirsch, Ph.D 71cffa67fa add NetCDF 2019-02-28 22:13:38 +02:00
John M. Lindemon 939c00a972 Fix nvcc error with threads dependency (4999) 2019-02-28 21:02:14 +02:00
John Ericson 2d6d242aec Feed compiler Properties to get its options defaulted
Before, the logic initialization compiler options from environment
variables vs config files was strewn about. Now, it is consolidated. We
leverage the new `envconfig.py` module to expose the configuration data
to `compilers.py` without creating an import cycle.
2019-02-27 13:10:16 -08:00
John Ericson c2db7a9cee Sync up initialization logic with Properties and BinaryTable
1. They (and the others) all use PerMachineDefaultable. It's not the
    best class, but consistency come first. (It and all of them can be
    improved accross the board later.)

 2. They use `None` as the default argument so as not to mutate what's
    effectively a global variables. (Thanks @dcbaker!)

 3. They have a `fallback` field to centralize authority on when
    environment variables should be consulted.
2019-02-27 13:10:16 -08:00
John Ericson 2622e9ec32 Move some configuration classes out of environment.py
First of all, I'd like compilers and other modules that environment.py
currently imports to be able to take these without creating
hard-to-follow module cycles.

Second of all, environment.py's exact purpose seems a bit obscured.
Splitting the data types (and basic pure functions) from the more
complex logic that infers that data seems like a good way to separate
concerns.
2019-02-27 13:10:16 -08:00
Daniel Mensinger 94fe01deec rewriter: Sort dict iterations to fix unit tests 2019-02-27 19:59:58 +02:00
Olexa Bilaniuk ecdef0d005 Add table entry for CUDA Toolkit 10.1. 2019-02-27 14:08:30 +02:00
Michael Hirsch, Ph.D 39e6dc5885 correct Fortran self-dep logic
corrected, generalized self-referential Fortran fix

further refine logic
2019-02-27 14:08:08 +02:00
Jussi Pakkanen 97555cf6d9
Merge pull request #4939 from mensinda/rwDefOpts
rewriter: Set and delete project default options
2019-02-26 22:34:33 +02:00
Martin Ejdestig 67a01c8d7f Improve declare_dependency() example in Generating-sources.md [skip ci]
By using private_dir_include() instead of enumerating headers in sources
of declare_dependency. Much more convenient, especially when there are
many headers.

Found out about this by reading #4638. It is not documented anywhere as
far as I can tell.
2019-02-26 19:19:43 +02:00
Michael Hirsch, Ph.D 32a344b949 Fortran: handle self-referential files 2019-02-26 19:16:50 +02:00
Jussi Pakkanen 76e385391f
Merge pull request #4914 from mensinda/cmakePreCheck
cmake: Check if modules exist before running CMake
2019-02-26 19:15:48 +02:00
Daniel Mensinger 4bf1a352cc mconf: Fixed crash for variables in targets (closes #4960) 2019-02-26 18:40:45 +02:00
John Ericson 8c6d6393f2 Remove redundant definition of `cflags_mapping`
It seems this was erroneously coppied in `54b6afa67`.
2019-02-26 15:44:06 +00:00
John Ericson 9cf0f31ec0 unit tests: Use unittest.skipUnless to simplify main()
This makes the testsuite work better with other test runners, like
pytest. This is important because better test runners are very useful to
development (e.g. avoiding running succeeding tests again and again),
even if we want to still support 0 dependency testing of Meson though
keeping the default test runnner working.
2019-02-26 15:42:17 +00:00
Daniel Mensinger 16b6b2d411
Use c++14 instead of c++17 in the tests 2019-02-26 09:34:58 +01:00
Daniel Mensinger 9e247cb52e
rewriter: Set and delete default options 2019-02-26 09:34:58 +01:00
Daniel Mensinger 74bb79e26e
rewriter: Remove matching regex from list 2019-02-26 09:34:57 +01:00
Daniel Mensinger e37d32aa9d
rewriter: Basic default_options support 2019-02-26 09:34:57 +01:00
Daniel Mensinger 719730ff14
Minor fixes for code review 2019-02-26 09:33:27 +01:00
Nirbheek Chauhan b7fa161cb9
Use tuple comprehensions
Co-Authored-By: mensinda <daniel@mensinger-ka.de>
2019-02-26 09:33:26 +01:00
Daniel Mensinger bc25a12709
Minor code fixes 2019-02-26 09:33:26 +01:00
Daniel Mensinger 1dfa3783f5
Use @lru_cache and added return annotation 2019-02-26 09:33:26 +01:00
Daniel Mensinger b69e45ebac
Fixed flake8 2019-02-26 09:33:26 +01:00
Daniel Mensinger b2dd5fbe08
Fixed minor logic error regarding case conversion 2019-02-26 09:33:26 +01:00
Daniel Mensinger 33f5f06f38
Added Mac support 2019-02-26 09:33:26 +01:00
Daniel Mensinger 03d9bc3b0e
Ignore exceptions 2019-02-26 09:33:26 +01:00
Daniel Mensinger cdc338b743
Preliminary CMake module search 2019-02-26 09:33:26 +01:00
Daniel Mensinger 6efc94b5dd
Support different CMake files 2019-02-26 09:33:25 +01:00
Jussi Pakkanen 92f95b3326
Merge pull request #4982 from mesonbuild/dmddebug
Hack to get failure output from CI.
2019-02-26 02:09:57 +02:00
Jussi Pakkanen 9acbd62789 Launch Meson via python3 so the binary name is correct. 2019-02-26 01:32:56 +02:00
Jussi Pakkanen 5d751a2506 Pick target exactly rather than relying on dict order. 2019-02-26 01:26:54 +02:00
Jussi Pakkanen 7564a63353 Copy python3.5 to python3 so tests pass on Cygwin. 2019-02-26 01:26:54 +02:00
Jussi Pakkanen 067ff7eeae Fall back to current interpreter when python3 not found. 2019-02-26 01:26:54 +02:00