mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
build: make make tests SCREEN=1 work on freebsd
This commit is contained in:
parent
f827fcd0e0
commit
9d958ce582
@ -1,10 +1,24 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
export TMPDIR="$SELFTEST_TMPDIR"
|
||||
|
||||
SERVERNAME="$ENVNAME"
|
||||
[ -z "$SERVERNAME" ] && SERVERNAME="base"
|
||||
basedir=$TMPDIR
|
||||
osname=$(uname)
|
||||
if [ "$osname" = "Linux" ]; then
|
||||
vars=$(mktemp)
|
||||
else
|
||||
vars=$(mktemp -t tmpsmb)
|
||||
function seq() {
|
||||
dpt=$1
|
||||
end=$2
|
||||
while [ $dpt -le $end ]; do
|
||||
echo "$dpt"
|
||||
dpt=$(( $dpt + 1))
|
||||
done
|
||||
}
|
||||
fi
|
||||
|
||||
[ -r $basedir/$SERVERNAME.pid ] && {
|
||||
for i in $(seq 2 100); do
|
||||
@ -19,7 +33,6 @@ rm -f $basedir/$SERVERNAME.*
|
||||
|
||||
# set most of the environment vars we have in the screen session too
|
||||
_ENV=""
|
||||
vars=$(mktemp)
|
||||
printenv |
|
||||
egrep -v '^TERMCAP|^WINDOW|^SHELL|^STY|^SHLVL|^SAMBA_VALGRIND|\$' |
|
||||
egrep '^[A-Z]' |
|
||||
|
@ -88,6 +88,7 @@ sub check_or_start($$$)
|
||||
POSIX::mkfifo($env_vars->{SAMBA_TEST_FIFO}, 0700);
|
||||
unlink($env_vars->{SAMBA_TEST_LOG});
|
||||
|
||||
my $pwd = `pwd`;
|
||||
print "STARTING SAMBA for $ENV{ENVNAME}\n";
|
||||
my $pid = fork();
|
||||
if ($pid == 0) {
|
||||
@ -138,9 +139,11 @@ sub check_or_start($$$)
|
||||
if (defined($ENV{SAMBA_PROCESS_MODEL})) {
|
||||
$model = $ENV{SAMBA_PROCESS_MODEL};
|
||||
}
|
||||
my $ret = system("$valgrind $samba $optarg $env_vars->{CONFIGURATION} -M $model -i");
|
||||
chomp($pwd);
|
||||
my $cmdline = "$valgrind ${pwd}/$samba $optarg $env_vars->{CONFIGURATION} -M $model -i";
|
||||
my $ret = system("$cmdline");
|
||||
if ($ret == -1) {
|
||||
print "Unable to start $samba: $ret: $!\n";
|
||||
print "Unable to start $cmdline: $ret: $!\n";
|
||||
exit 1;
|
||||
}
|
||||
my $exit = ($ret >> 8);
|
||||
|
@ -130,8 +130,8 @@ def cmd_testonly(opt):
|
||||
server_wrapper = '../selftest/gdb_run _DUMMY=X'
|
||||
|
||||
if Options.options.SCREEN:
|
||||
server_wrapper = '../selftest/in_screen %s' % server_wrapper
|
||||
os.environ['TERMINAL'] = '../selftest/in_screen'
|
||||
server_wrapper = '%s/../selftest/in_screen %s' % (os.getcwd(), server_wrapper)
|
||||
os.environ['TERMINAL'] = '%s/../selftest/in_screen' % os.getcwd()
|
||||
elif server_wrapper != '':
|
||||
server_wrapper = 'xterm -n server -l -e %s' % server_wrapper
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user