selftest: Allow for wider range of terminals (besides xterm)
authorTim Beale <timbeale@catalyst.net.nz>
Fri, 31 May 2019 00:33:59 +0000 (12:33 +1200)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 31 May 2019 05:18:20 +0000 (05:18 +0000)
commit8e3bc591733c868320a0f91d3f3e3943bd95b92e
treee351c1cf9dc576db1b088116b32e44f0da76bb82
parent9a2c9834cb1b77547b8b932c35870301afb9fc25
selftest: Allow for wider range of terminals (besides xterm)

Allow developers to override the default @term_args, as well as the
terminal itself.

Currently, due to the nature of the args we pass to xterm (i.e. 'echo -e
"blah.." && bash'), it doesn't make it very flexible for use with other
terminals. By dropping these additional @term_args, it makes it much
easier to slot in an alternative terminal.

For example, these commands now work (more or less).

TERMINAL="terminator" TERMINAL_ARGS="-x bash" \
 SELFTEST_TESTENV=ad_dc make testenv

TERMINAL="bash" TERMINAL_ARGS="" \
 SELFTEST_TESTENV=nt4_dc make testenv

TERMINAL="bash" TERMINAL_ARGS="--norc" \
 SELFTEST_TESTENV=none make testenv

bash is usable, but a little weird because its output is still being
piped. Also bash with ad_dc is a little weird because we're using tee
for the DC's stdout. (I'd also recommend --norc, as it makes it easier
to differentiate between the testenv shell).

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
selftest/selftest.pl