>From 2777834c3d57b5cf987d37a873454abb062f2dcd Mon Sep 17 00:00:00 2001 From: Matthieu Patou Date: Thu, 3 Jan 2013 14:33:45 -0800 Subject: [PATCH] Tests: Fix the display of test vars in screen --testenv The form bash -c echo "important stuff blabla bla" && LD_LIBARY_PATH bash is not working in screen when it's working in xterm and the in_screen script already wrap all the command within a bash shell so there is no need to re-force bash as the echo will execute in a bash shell --- selftest/selftest.pl | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/selftest/selftest.pl b/selftest/selftest.pl index 4ac5aeb..639c8a2 100755 --- a/selftest/selftest.pl +++ b/selftest/selftest.pl @@ -849,13 +849,7 @@ if ($opt_testenv) { my $envvarstr = exported_envvars_str($testenv_vars); - my @term = (); - if ($ENV{TERMINAL}) { - @term = ($ENV{TERMINAL}); - } else { - @term = ("xterm", "-e"); - } - my @term_args = ("bash", "-c", "echo -e \" + my @term_args = ("echo -e \" Welcome to the Samba4 Test environment '$testenv_name' This matches the client environment used in make test @@ -867,6 +861,13 @@ SMB_CONF_PATH=\$SMB_CONF_PATH $envvarstr \" && LD_LIBRARY_PATH=$ENV{LD_LIBRARY_PATH} bash"); + my @term = (); + if ($ENV{TERMINAL}) { + @term = ($ENV{TERMINAL}); + } else { + @term = ("xterm", "-e"); + unshift(@term_args, ("bash", "-c")); + } system(@term, @term_args); -- 1.7.9.5