Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
2164066b
...
2164066b095f9a281453a8bbd969587bab1d4df4
authored
2002-08-06 15:06:19 +0000
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Fixed paths. (mail_prepare_spools,mail_cleanup_spools): new procedures.
1 parent
96d43dfa
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
6 deletions
mail/testsuite/lib/mail.exp
mail/testsuite/lib/mail.exp
View file @
2164066
...
...
@@ -23,6 +23,12 @@ if [info exists TOOL_EXECUTABLE] {
if
!
[
info
exists MAIL
]
{
if !
[
is_remote host
]
{
set MAIL
[
findfile
$base
_dir/../mail
"
$base
_dir/../mail"
[
transform mail
]]
set MAIL_SPOOL_SOURCE
"
$srcdir
/spool"
set MAIL_FOLDER_SOURCE
"
$srcdir
/folder"
set MAIL_SPOOL_DIR
"
$objdir
/data/spool"
set MAIL_FOLDER_DIR
"
$objdir
/data/folder"
set MAIL_RC_DIR
"
$srcdir
/etc"
set MAKESPOOL
"
$srcdir
/makespool"
}
else
{
if
[
info
exists host_board
]
{
if
[
board_info
$host
_board exists top_builddir
]
{
...
...
@@ -38,18 +44,24 @@ if ![info exists MAIL] {
perror
"for instructions on how to set up it."
exit 1
}
set MAIL_RC_DIR
"
[
board_info
$host
_board srcdir
]
/etc"
set MAIL_SPOOL_SOURCE
"
[
board_info
$host
_board srcdir
]
/spool"
set MAIL_FOLDER_SOURCE
"
[
board_info
$host
_board srcdir
]
/folder"
set MAIL_SPOOL_DIR
"
[
board_info
$host
_board objdir
]
/data/spool"
set MAIL_FOLDER_DIR
"
[
board_info
$host
_board objdir
]
/data/folder"
set MAKESPOOL
"
[
board_info
$host
_board srcdir
]
/makespool"
}
}
verbose
"using MAIL =
$
MAIL"
2
if
!
[
info
exists MAILFLAGS
]
{
set MAILFLAGS
"--nosum --norc --mail-spool
$
srcdir
/spool
"
set MAILFLAGS
"--nosum --norc --mail-spool
$
MAIL_SPOOL_DIR
"
}
#FIXME:
set
env
(
MAILRC
)
$
srcdir
/etc
/mail.rc
set
env
(
MBOX
)
$srcdir
/spool/mbox
#FIXME:
this doesn't work with remote testing
set
env
(
MAILRC
)
$
MAIL_RC_DIR
/mail.rc
set
env
(
MBOX
)
"
$
MAIL_SPOOL_DIR/mbox"
# The variable mail_prompt is a regexp which matches the mail prompt.
global
mail_prompt
...
...
@@ -59,6 +71,31 @@ if ![info exists mail_prompt] then {
### Only procedures should come after this point.
proc
mail_prepare_spools
{}
{
global MAIL_SPOOL_SOURCE
global MAIL_SPOOL_DIR
global MAIL_FOLDER_SOURCE
global MAIL_FOLDER_DIR
global MAKESPOOL
set output
[
remote_exec host
"
$
MAKESPOOL
\
$
MAIL_SPOOL_SOURCE
$
MAIL_SPOOL_DIR
\
$
MAIL_FOLDER_SOURCE
$
MAIL_FOLDER_DIR"
]
}
proc
mail_cleanup_spools
{}
{
global MAIL_SPOOL_SOURCE
global MAIL_SPOOL_DIR
global MAIL_FOLDER_SOURCE
global MAIL_FOLDER_DIR
global MAKESPOOL
if
{
$MAIL_SPOOL_SOURCE != $MAIL_SPOOL_DIR
}
{
set output
[
remote_exec host
"
$
MAKESPOOL -r
\
$
MAIL_SPOOL_DIR
$
MAIL_FOLDER_DIR"
]
}
}
proc default_mail_version
{}
{
global MAIL
global MAILFLAGS
...
...
@@ -96,6 +133,7 @@ proc default_mail_start {args} {
global expect_out
default_mail_version
mail_prepare_spools
set sw
$args
append sw
" "
...
...
@@ -107,7 +145,7 @@ proc default_mail_start {args} {
}
set mail_cmd
"
$
MAIL
$
MAILFLAGS
$args
"
verbose
"MAILRC is
$srcdir
/etc/mail.rc"
2
verbose
"MAILRC is
$srcdir
/etc/mail.rc"
2
verbose
"Spawning
$mail
_cmd"
set res
[
remote_spawn host
$mail
_cmd
]
...
...
@@ -156,7 +194,7 @@ proc mail_send { string } {
proc
mail_command
{
cmd
}
{
set res
[
mail_send
"
$cmd
\n
"
]
mail_expect 30
{
-ex
"
${cmd}
\r\n
"
{
}
-ex
"
\r\n
"
{
}
default
{
perror
"mail_command for target failed"
;
return -1
...
...
Please
register
or
sign in
to post a comment