Skip to content

Commit eb12a69

Browse files
committed
meson: simplify test script
No need to set env, we have the test 'env' argument. Shorten the PYTEST_FLAGS var name to keep the one-line script a little more manageable. Signed-off-by: Jeremy Kerr <[email protected]>
1 parent 577ac8e commit eb12a69

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

meson.build

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,9 @@ if tests
141141
# redirecting to a file. We can detect this if stdout is an terminal, and
142142
# disable TAP protocol.
143143
pytest = find_program('pytest')
144-
script = '''export DBUS_STARTER_BUS_TYPE=user; if [ ! -t 1 ]; then PYTEST_FLAGS="--tap"; fi; @0@ $PYTEST_FLAGS $@'''.format(pytest.full_path())
144+
script = 'if [ ! -t 1 ]; then PFL="--tap"; fi; @0@ $PFL $@'.format(
145+
pytest.full_path()
146+
)
145147
sh = find_program('sh')
146148
dbus_run_session = find_program('dbus-run-session')
147149

@@ -159,6 +161,7 @@ if tests
159161
depends: [test_deps],
160162
args: [ sh.full_path(), '-c', script, '--' ],
161163
protocol: 'tap',
164+
env: ['DBUS_STARTER_TYPE=user'],
162165
)
163166

164167
endif

0 commit comments

Comments
 (0)