summaryrefslogtreecommitdiff
path: root/test cases/rewrite
AgeCommit message (Collapse)Author
2025-11-23Condense directory names for rc1.Jussi Pakkanen
2025-11-21rewrite: fix duplicate objects for predefined globalsPaolo Bonzini
Global objects are treated as UnknownValue(), but unlike other variables their object is created on every call to get_cur_value_if_defined() instead of coming from a dictionary. This causes the dataflow DAG to have multiple objects from the same object. Fix this by building the UnknownValues at interpreter construction time. Fixes: #15261 Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-11-18rewriter: fix kwargs info for dict-valued kwargsBenjamin Gilbert
We can't modify dict-valued kwargs (#14739) but this lets us at least read them.
2025-11-18rewriter: support project(license_files: )Benjamin Gilbert
2025-08-10tests: host_machine instead of meson.host_machine()Volker Weißmann
2025-08-01Condense test directory names for 1.9.Jussi Pakkanen
2025-06-09AstInterpreter: Fix dead-code-crashVolker Weißmann
Without this commit, the rewriter and the static introspection tool crash if `meson.build` contains something like ```meson if false foo = not_defined endif ``` or ```meson if false message(not_defined) endif ``` While it could be argued, that you should not write stuff like this, this used to raise a `MesonBugException`, which we have to fix. Fixes #14667
2025-05-29rewriter: Rewrite how we add/remove source filesVolker Weißmann
Change the semantics of IntrospectionBuildTarget.source_nodes and IntrospectionBuildTarget.extra_files . The rewriter and the static introspection tool used to be very broken, now it is *less* broken, hence we add some tests in this commit. Fixes #11763
2025-05-29Add AstInterpreter.dataflow_dagVolker Weißmann
Make the AstInterpreter create a directed acyclic graph (called `dataflow_dag`) that stores the how the data flowes from one node in the AST to another. Add `AstInterpreter.node_to_runtime_value` which uses `dataflow_dag` to find what value a variable at runtime will have. We don't use dataflow_dag or node_to_runtime_value anywhere yet, but it will prove useful in future commits.
2025-04-08tests: Add a rewriter test that handles prefixDylan Baker
"prefix" has a lot of special handling that has to go on because so many other options depend on prefix. It was also regressed by the option refactor changes, so having a test feels appropriate. This was verified against the 1.7 release, so it has the same behavior as pre-option refactor Meson.
2021-12-15rewriter: create {add,rm}_extra_files commandsCeleste Wouters
Add ability to mutate a target's `extra_files` list through the rewriter. The logic is copied from sources add/rm, but changes the `extra_files` kwarg instead of the sources positional argument. Has additional logic to handle creating the `extra_files` list if it doesn't exist.
2021-01-12Allow '//' as project function id due to git bash path conversion.Luke Elliott
See https://stackoverflow.com/questions/54258996/git-bash-string-parameter-with-at-start-is-being-expanded-to-a-file-path
2019-06-05rewriter: Fix that default_options would not set the correct idDaniel Mensinger
Currently default_options uses "" for the kwarks id, however this is incorect and it must be "/". Additionally, this error won't be ignored in the future with "--skip" (this is why the tests were passing and this wasn't detected earlier).
2019-03-04rewriter: Fixed test caseDaniel Mensinger
2019-03-04rewriter: Require '/' for the project IDDaniel Mensinger
2019-03-04rewriter: Handle duplicate targetDaniel Mensinger
2019-03-04rewriter: Renamed tgt_{add,rm} --> target_{add,rm}Daniel Mensinger
2019-03-04rewriter: Sort source files (#5010)Daniel Mensinger
* rewriter: Sort source files * rewriter: Natural sorting * rewriter: Fix flake8 * rewriter: Fixed sorting * rewriter: Make sorting key more readable * rewriter: Even simpler key
2019-03-03rewriter: Handle Arithmetic nodeDaniel Mensinger
2019-03-02rewriter: Avoid duplicatesDaniel Mensinger
2019-02-26Use c++14 instead of c++17 in the testsDaniel Mensinger
2019-02-26rewriter: Set and delete default optionsDaniel Mensinger
2019-02-26rewriter: Remove matching regex from listDaniel Mensinger
2019-02-16Fixed flake8Daniel Mensinger
2019-02-16rewriter: Added support for adding targetsDaniel Mensinger
2019-02-16rewriter: Added support for removing targetsDaniel Mensinger
2019-01-31Added dependecy kwargs supportDaniel Mensinger
2019-01-31Added test caseDaniel Mensinger
2019-01-31Renamed operation test -> infoDaniel Mensinger
2019-01-31Some fixes and assignment based target findDaniel Mensinger
2019-01-22Removed old test filesDaniel Mensinger
2019-01-22Added subdir testDaniel Mensinger
2019-01-22Can now rewrite filesDaniel Mensinger
2019-01-22Added support for removing sources from a targetDaniel Mensinger
2019-01-22Added suport for adding sources to a targetDaniel Mensinger
2019-01-22First rewriter test caseDaniel Mensinger
2019-01-22Updated basic rewrite testcaseDaniel Mensinger
2016-12-04Store subdir information for each node so we can remove files set in other ↵Jussi Pakkanen
subdirectories.
2016-12-04Added unit test for rewriter.Jussi Pakkanen