diff options
| author | Daniel P. Berrangé <berrange@redhat.com> | 2023-04-20 11:26:17 +0100 |
|---|---|---|
| committer | Markus Armbruster <armbru@redhat.com> | 2023-04-25 15:23:06 +0200 |
| commit | 7ce54db23048bfcc3ea6821525bf333b715c7655 (patch) | |
| tree | c55a674cbde47fdd542c88d37cbc71cc6107a035 | |
| parent | de3b3f529d453dfaa1f8b437c1a1f0766d8108e4 (diff) | |
| download | focaccia-qemu-7ce54db23048bfcc3ea6821525bf333b715c7655.tar.gz focaccia-qemu-7ce54db23048bfcc3ea6821525bf333b715c7655.zip | |
qapi: support updating expected test output via make
It is possible to pass --update to tests/qapi-schema/test-qapi.py to make it update the output files on error. This is inconvenient to achieve though when test-qapi.py is run indirectly by make/meson. Instead simply allow for an env variable to be set: $ QAPI_TEST_UPDATE= make check-qapi-schema Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20230420102619.348173-2-berrange@redhat.com> Reviewed-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
| -rwxr-xr-x | tests/qapi-schema/test-qapi.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qapi-schema/test-qapi.py b/tests/qapi-schema/test-qapi.py index 2160cef082..d58c31f539 100755 --- a/tests/qapi-schema/test-qapi.py +++ b/tests/qapi-schema/test-qapi.py @@ -206,6 +206,7 @@ def main(argv): parser.add_argument('-d', '--dir', action='store', default='', help="directory containing tests") parser.add_argument('-u', '--update', action='store_true', + default='QAPI_TEST_UPDATE' in os.environ, help="update expected test results") parser.add_argument('tests', nargs='*', metavar='TEST', action='store') args = parser.parse_args() |