Commit 3f88df00 3f88df004fd948bba5856993bd1a92981b53ea49 by Sergey Poznyakoff

Fix testsuite to avoid spawning /bin/cp.

* imap4d/testsuite/imap4d.rcin: New file.
* imap4d/testsuite/Makefile.am (EXTRA_DIST): Add imap4d.rcin
* imap4d/testsuite/.cvsignore: Add imap4d.rc
* imap4d/testsuite/lib/imap4d.exp: Use mu_makespool to prepare
mailspools and mu_create_config to create test configuration
file.  Specify the maximum amount of configuration data in the
latter, instead of using command line options.
* mail.local/testsuite/lib/mail.local.exp: Likewise.
* pop3d/testsuite/lib/pop3d.exp: Likewise.

* pop3d/testsuite/pop3d.rcin: New file.
* pop3d/testsuite/Makefile.am (EXTRA_DIST): Add pop3d.rcin
* pop3d/testsuite/.cvsignore: Add pop3d.rc.

* testsuite/etc/passwd.in: Use Tcl variable for expansion.
* testsuite/lib/mailutils.exp (mu_copy_file): New function.
(mu_makespool, mu_create_config): New function.
(mu_init): Remove unused variable MU_MAKESPOOL.
(mu_prepare_spools): Use mu_makespool.
(mu_cleanup_spools): Remove.

* libcfg/init.c (mu_parse_config_files): Minor change.
* mailbox/cfg_lexer.l (mu_get_config): Fix return value.
1 parent 734eac29
1 2008-08-24 Sergey Poznyakoff <gray@gnu.org.ua>
2
3 Fix testsuite to avoid spawning /bin/cp.
4 * imap4d/testsuite/imap4d.rcin: New file.
5 * imap4d/testsuite/Makefile.am (EXTRA_DIST): Add imap4d.rcin
6 * imap4d/testsuite/.cvsignore: Add imap4d.rc
7 * imap4d/testsuite/lib/imap4d.exp: Use mu_makespool to prepare
8 mailspools and mu_create_config to create test configuration
9 file. Specify the maximum amount of configuration data in the
10 latter, instead of using command line options.
11 * mail.local/testsuite/lib/mail.local.exp: Likewise.
12 * pop3d/testsuite/lib/pop3d.exp: Likewise.
13
14 * pop3d/testsuite/pop3d.rcin: New file.
15 * pop3d/testsuite/Makefile.am (EXTRA_DIST): Add pop3d.rcin
16 * pop3d/testsuite/.cvsignore: Add pop3d.rc.
17
18 * testsuite/etc/passwd.in: Use Tcl variable for expansion.
19 * testsuite/lib/mailutils.exp (mu_copy_file): New function.
20 (mu_makespool, mu_create_config): New function.
21 (mu_init): Remove unused variable MU_MAKESPOOL.
22 (mu_prepare_spools): Use mu_makespool.
23 (mu_cleanup_spools): Remove.
24
25 * libcfg/init.c (mu_parse_config_files): Minor change.
26 * mailbox/cfg_lexer.l (mu_get_config): Fix return value.
27
1 2008-08-21 Sergey Poznyakoff <gray@gnu.org.ua> 28 2008-08-21 Sergey Poznyakoff <gray@gnu.org.ua>
2 29
3 * include/mailutils/mutil.h, mailbox/mutil.c (mu_normalize_path): 30 * include/mailutils/mutil.h, mailbox/mutil.c (mu_normalize_path):
......
...@@ -2,6 +2,7 @@ Makefile ...@@ -2,6 +2,7 @@ Makefile
2 Makefile.in 2 Makefile.in
3 *.log 3 *.log
4 *.sum 4 *.sum
5 imap4d.rc
5 site.exp 6 site.exp
6 remote.exp 7 remote.exp
7 data 8 data
......
1 ## Process this file with GNU Automake to create Makefile.in 1 ## Process this file with GNU Automake to create Makefile.in
2 2
3 ## Copyright (C) 2002, 2007 Free Software Foundation, Inc. 3 ## Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc.
4 ## 4 ##
5 ## GNU Mailutils is free software; you can redistribute it and/or 5 ## GNU Mailutils is free software; you can redistribute it and/or
6 ## modify it under the terms of the GNU General Public License as 6 ## modify it under the terms of the GNU General Public License as
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
20 AUTOMAKE_OPTIONS = dejagnu 20 AUTOMAKE_OPTIONS = dejagnu
21 DEJATOOL = imap4d 21 DEJATOOL = imap4d
22 RUNTESTFLAGS = 22 RUNTESTFLAGS =
23 CLEANFILES = *.log 23 CLEANFILES = *.log imap4d.rc
24 EXTRA_DIST = imap4d.rcin
24 test_dirs = lib imap4d config 25 test_dirs = lib imap4d config
25 26
26 dist-hook: 27 dist-hook:
......
1 # Configuration file for Mailutils Imap4d testsuite.
2 # Copyright (C) 2008 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # GNU Mailutils is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16
17 mailbox {
18 mail-spool "$objdir/data/spool";
19 mailbox-pattern "$objdir/data/spool/INBOX";
20 }
21
22 auth {
23 authentication generic;
24 authorization virtdomain;
25 }
26
27 virtdomain {
28 passwd-dir "$objdir/data/etc";
29 }
30
31 shared-namespace "$objdir/data";
1 # -*- tcl -*- 1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite. 2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2005, 2007 Free Software Foundation 3 # Copyright (C) 2002, 2005, 2007, 2008 Free Software Foundation
4 # 4 #
5 # This program is free software; you can redistribute it and/or modify 5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by 6 # it under the terms of the GNU General Public License as published by
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
19 19
20 source $top_srcdir/testsuite/lib/mailutils.exp 20 source $top_srcdir/testsuite/lib/mailutils.exp
21 21
22 mu_init "--authentication generic --authorization virtdomain" 22 mu_init "--rcfile=$objdir/imap4d.rc"
23 mu_version 23 mu_version
24 if ![mu_check_capability ENABLE_VIRTUAL_DOMAINS] { 24 if ![mu_check_capability ENABLE_VIRTUAL_DOMAINS] {
25 clone_output "WARNING: Support for virtual domains not compiled in" 25 clone_output "WARNING: Support for virtual domains not compiled in"
...@@ -29,15 +29,8 @@ if ![mu_check_capability ENABLE_VIRTUAL_DOMAINS] { ...@@ -29,15 +29,8 @@ if ![mu_check_capability ENABLE_VIRTUAL_DOMAINS] {
29 29
30 set IMAP4D_ETC_DIR "$MU_DATA_DIR/etc" 30 set IMAP4D_ETC_DIR "$MU_DATA_DIR/etc"
31 31
32 set output [remote_exec host "$MU_MAKESPOOL \ 32 mu_makespool "$MU_RC_DIR" "$IMAP4D_ETC_DIR"
33 -subst \"s,@MU_SPOOL_DIR@,$MU_SPOOL_DIR,\" \ 33 mu_create_config imap4d
34 $MU_RC_DIR $IMAP4D_ETC_DIR" ]
35 if [lindex $output 0] {
36 perror "Cannot create $IMAP4D_ETC_DIR: [lindex $output 1]"
37 exit 1
38 }
39 append MU_TOOL_FLAGS " --virtual-passwd-dir $IMAP4D_ETC_DIR \
40 --shared-namespace $MU_DATA_DIR"
41 34
42 set IMAP4D_TAG 0 35 set IMAP4D_TAG 0
43 36
...@@ -76,12 +69,6 @@ proc default_imap4d_start {args} { ...@@ -76,12 +69,6 @@ proc default_imap4d_start {args} {
76 append sw $args 69 append sw $args
77 } 70 }
78 71
79 if [info exists host_board] {
80 if [board_info $host_board exists top_srcdir] {
81 append sw " --mail-spool [board_info $host_board top_srcdir]/mail/testsuite/spool"
82 }
83 }
84
85 set imap4d_cmd "$MU_TOOL $sw" 72 set imap4d_cmd "$MU_TOOL $sw"
86 verbose "Spawning $imap4d_cmd" 73 verbose "Spawning $imap4d_cmd"
87 74
...@@ -92,7 +79,7 @@ proc default_imap4d_start {args} { ...@@ -92,7 +79,7 @@ proc default_imap4d_start {args} {
92 } 79 }
93 80
94 mu_expect 360 { 81 mu_expect 360 {
95 -re "\\* OK IMAP4rev1 Debugging mode.*\r\n" { 82 -re "\\* (OK)|(PREAUTH) IMAP4rev1 Debugging mode.*\r\n" {
96 verbose "imap4d initialized." 83 verbose "imap4d initialized."
97 } 84 }
98 default { 85 default {
...@@ -111,6 +98,7 @@ proc default_imap4d_stop {} { ...@@ -111,6 +98,7 @@ proc default_imap4d_stop {} {
111 perror "LOGOUT failed" 98 perror "LOGOUT failed"
112 exit 1 99 exit 1
113 } 100 }
101 remote_close host;
114 return 0 102 return 0
115 } 103 }
116 104
...@@ -131,12 +119,7 @@ proc imap4d_start {args} { ...@@ -131,12 +119,7 @@ proc imap4d_start {args} {
131 119
132 if {$reuse_spool == 0} { 120 if {$reuse_spool == 0} {
133 mu_prepare_spools 121 mu_prepare_spools
134 set output [remote_exec host \ 122 mu_copy_file $MU_SPOOL_DIR/teaparty.mbox $MU_SPOOL_DIR/INBOX
135 "cp $MU_SPOOL_DIR/teaparty.mbox $MU_SPOOL_DIR/INBOX"]
136 if [lindex $output 0] {
137 perror "Cannot create $MU_SPOOL_DIR/INBOX: [lindex $output 1]"
138 exit 1
139 }
140 } 123 }
141 return [default_imap4d_start [concat [lrange $args $i end]]] 124 return [default_imap4d_start [concat [lrange $args $i end]]]
142 } 125 }
......
...@@ -132,7 +132,7 @@ mu_parse_config_files (struct mu_cfg_param *param, void *target) ...@@ -132,7 +132,7 @@ mu_parse_config_files (struct mu_cfg_param *param, void *target)
132 flags, target); 132 flags, target);
133 if (rc) 133 if (rc)
134 { 134 {
135 mu_error (_("Cannot open file %s: %s"), mu_load_rcfile, 135 mu_error (_("Errors parsing file %s: %s"), mu_load_rcfile,
136 mu_strerror (rc)); 136 mu_strerror (rc));
137 return rc; 137 return rc;
138 } 138 }
......
1 # -*- tcl -*- 1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite. 2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2007 Free Software Foundation 3 # Copyright (C) 2002, 2007, 2008 Free Software Foundation
4 # 4 #
5 # This program is free software; you can redistribute it and/or modify 5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by 6 # it under the terms of the GNU General Public License as published by
...@@ -31,13 +31,7 @@ mu_prepare_spools ...@@ -31,13 +31,7 @@ mu_prepare_spools
31 31
32 set ETC_DIR "$MU_DATA_DIR/etc" 32 set ETC_DIR "$MU_DATA_DIR/etc"
33 33
34 set output [remote_exec host "$MU_MAKESPOOL \ 34 mu_makespool "$MU_RC_DIR" "$ETC_DIR"
35 -subst \"s,@MU_SPOOL_DIR@,$MU_SPOOL_DIR,\" \
36 $MU_RC_DIR $ETC_DIR" ]
37 if [lindex $output 0] {
38 perror "Cannot create ETC_DIR: [lindex $output 1]"
39 exit 1
40 }
41 append MU_TOOL_FLAGS " --virtual-passwd-dir $ETC_DIR" 35 append MU_TOOL_FLAGS " --virtual-passwd-dir $ETC_DIR"
42 36
43 set mu_filename "$MU_SPOOL_DIR/INBOX" 37 set mu_filename "$MU_SPOOL_DIR/INBOX"
......
...@@ -304,14 +304,14 @@ mu_get_config (const char *file, const char *progname, ...@@ -304,14 +304,14 @@ mu_get_config (const char *file, const char *progname,
304 { 304 {
305 if (errno != ENOENT) 305 if (errno != ENOENT)
306 mu_error (_("cannot stat `%s': %s"), file, mu_strerror (errno)); 306 mu_error (_("cannot stat `%s': %s"), file, mu_strerror (errno));
307 return -1; 307 return ENOENT;
308 } 308 }
309 fp = fopen (file, "r"); 309 fp = fopen (file, "r");
310 if (!fp) 310 if (!fp)
311 { 311 {
312 mu_error (_("cannot open config file `%s': %s"), file, 312 mu_error (_("cannot open config file `%s': %s"), file,
313 mu_strerror (errno)); 313 mu_strerror (errno));
314 return -1; 314 return errno;
315 } 315 }
316 316
317 if (flags & MU_PARSE_CONFIG_VERBOSE) 317 if (flags & MU_PARSE_CONFIG_VERBOSE)
...@@ -334,7 +334,7 @@ mu_get_config (const char *file, const char *progname, ...@@ -334,7 +334,7 @@ mu_get_config (const char *file, const char *progname,
334 if (flags & MU_PARSE_CONFIG_VERBOSE) 334 if (flags & MU_PARSE_CONFIG_VERBOSE)
335 mu_error (_("Info: finished parsing file `%s'"), file); 335 mu_error (_("Info: finished parsing file `%s'"), file);
336 336
337 return rc; 337 return rc == 0 ? 0 : MU_ERR_FAILURE;
338 } 338 }
339 339
340 mu_opool_t 340 mu_opool_t
......
...@@ -2,6 +2,7 @@ Makefile ...@@ -2,6 +2,7 @@ Makefile
2 Makefile.in 2 Makefile.in
3 *.log 3 *.log
4 *.sum 4 *.sum
5 pop3d.rc
5 site.exp 6 site.exp
6 remote.exp 7 remote.exp
7 data 8 data
......
1 ## Process this file with GNU Automake to create Makefile.in 1 ## Process this file with GNU Automake to create Makefile.in
2 2
3 ## Copyright (C) 2002, 2007 Free Software Foundation, Inc. 3 ## Copyright (C) 2002, 2007, 2008 Free Software Foundation, Inc.
4 ## 4 ##
5 ## GNU Mailutils is free software; you can redistribute it and/or 5 ## GNU Mailutils is free software; you can redistribute it and/or
6 ## modify it under the terms of the GNU General Public License as 6 ## modify it under the terms of the GNU General Public License as
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
20 AUTOMAKE_OPTIONS = dejagnu 20 AUTOMAKE_OPTIONS = dejagnu
21 DEJATOOL = pop3d 21 DEJATOOL = pop3d
22 RUNTESTFLAGS = 22 RUNTESTFLAGS =
23 CLEANFILES = *.log 23 CLEANFILES = *.log pop3d.rc
24 EXTRA_DIST = pop3d.rcin
24 test_dirs = config lib pop3d 25 test_dirs = config lib pop3d
25 26
26 dist-hook: 27 dist-hook:
......
1 # -*- tcl -*- 1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite. 2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2007 Free Software Foundation 3 # Copyright (C) 2002, 2007, 2008 Free Software Foundation
4 # 4 #
5 # This program is free software; you can redistribute it and/or modify 5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by 6 # it under the terms of the GNU General Public License as published by
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
20 source $top_srcdir/testsuite/lib/mailutils.exp 20 source $top_srcdir/testsuite/lib/mailutils.exp
21 21
22 22
23 mu_init "--authentication generic --authorization virtdomain" 23 mu_init "--rcfile=$objdir/pop3d.rc"
24 mu_version 24 mu_version
25 if ![mu_check_capability ENABLE_VIRTUAL_DOMAINS] { 25 if ![mu_check_capability ENABLE_VIRTUAL_DOMAINS] {
26 clone_output "WARNING: Support for virtual domains not compiled in" 26 clone_output "WARNING: Support for virtual domains not compiled in"
...@@ -29,15 +29,8 @@ if ![mu_check_capability ENABLE_VIRTUAL_DOMAINS] { ...@@ -29,15 +29,8 @@ if ![mu_check_capability ENABLE_VIRTUAL_DOMAINS] {
29 } 29 }
30 30
31 set POP3D_ETC_DIR "$MU_DATA_DIR/etc" 31 set POP3D_ETC_DIR "$MU_DATA_DIR/etc"
32 32 mu_makespool "$MU_RC_DIR" "$POP3D_ETC_DIR"
33 set output [remote_exec host "$MU_MAKESPOOL \ 33 mu_create_config pop3d
34 -subst \"s,@MU_SPOOL_DIR@,$MU_SPOOL_DIR,\" \
35 $MU_RC_DIR $POP3D_ETC_DIR" ]
36 if [lindex $output 0] {
37 perror "Cannot create $POP3D_ETC_DIR: [lindex $output 1]"
38 exit 1
39 }
40 append MU_TOOL_FLAGS " --virtual-passwd-dir $POP3D_ETC_DIR"
41 34
42 ### Only procedures should come after this point. 35 ### Only procedures should come after this point.
43 36
...@@ -74,12 +67,6 @@ proc default_pop3d_start {args} { ...@@ -74,12 +67,6 @@ proc default_pop3d_start {args} {
74 append sw $args 67 append sw $args
75 } 68 }
76 69
77 if [info exists host_board] {
78 if [board_info $host_board exists top_srcdir] {
79 append sw " --mail-spool [board_info $host_board top_srcdir]/mail/testsuite/spool"
80 }
81 }
82
83 set pop3d_cmd "$MU_TOOL $sw" 70 set pop3d_cmd "$MU_TOOL $sw"
84 verbose "Spawning $pop3d_cmd" 71 verbose "Spawning $pop3d_cmd"
85 72
...@@ -131,12 +118,7 @@ proc pop3d_start {args} { ...@@ -131,12 +118,7 @@ proc pop3d_start {args} {
131 118
132 if {$reuse_spool == 0} { 119 if {$reuse_spool == 0} {
133 mu_prepare_spools 120 mu_prepare_spools
134 set output [remote_exec host \ 121 mu_copy_file $MU_SPOOL_DIR/teaparty.mbox $MU_SPOOL_DIR/INBOX
135 "cp $MU_SPOOL_DIR/teaparty.mbox $MU_SPOOL_DIR/INBOX"]
136 if [lindex $output 0] {
137 perror "Cannot create $MU_SPOOL_DIR/INBOX: [lindex $output 1]"
138 exit 1
139 }
140 } 122 }
141 return [default_pop3d_start [concat [lrange $args $i end]]] 123 return [default_pop3d_start [concat [lrange $args $i end]]]
142 } 124 }
......
1 # Configuration file for Mailutils Imap4d testsuite.
2 # Copyright (C) 2008 Free Software Foundation, Inc.
3 #
4 # GNU Mailutils is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 3, or (at
7 # your option) any later version.
8 #
9 # GNU Mailutils is distributed in the hope that it will be useful, but
10 # WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with GNU Mailutils. If not, see <http://www.gnu.org/licenses/>.
16
17 mailbox {
18 mail-spool "$objdir/data/spool";
19 mailbox-pattern "$objdir/data/spool/INBOX";
20 }
21
22 auth {
23 authentication generic;
24 authorization virtdomain;
25 }
26
27 virtdomain {
28 passwd-dir "$objdir/data/etc";
29 }
1 user:abld/G2Q2Le2w:1000:1000:Test User:@MU_SPOOL_DIR@:/bin/sh 1 user:abld/G2Q2Le2w:1000:1000:Test User:$MU_SPOOL_DIR:/bin/sh
......
1 # -*- tcl -*- 1 # -*- tcl -*-
2 # This file is part of Mailutils testsuite. 2 # This file is part of Mailutils testsuite.
3 # Copyright (C) 2002, 2005, 2007 Free Software Foundation 3 # Copyright (C) 2002, 2005, 2007, 2008 Free Software Foundation
4 # 4 #
5 # This program is free software; you can redistribute it and/or modify 5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by 6 # it under the terms of the GNU General Public License as published by
...@@ -23,6 +23,80 @@ verbose "STARTED" 1 ...@@ -23,6 +23,80 @@ verbose "STARTED" 1
23 set env(LC_ALL) "C" 23 set env(LC_ALL) "C"
24 set env(MU_CONFIG_FLAVOR) "none" 24 set env(MU_CONFIG_FLAVOR) "none"
25 25
26 proc mu_copy_file {src dst} {
27 global tool
28 global top_srcdir
29 global srcdir
30 global objdir
31 global host_alias
32 global host_triplet
33 global target_alias
34 global target_triplet
35 global build_alias
36 global build_triplet
37 global MU_TOOL
38 global MU_SPOOL_SOURCE
39 global MU_FOLDER_SOURCE
40 global MU_SPOOL_DIR
41 global MU_FOLDER_DIR
42 global MU_RC_DIR
43 global MU_DATA_DIR
44
45 set input [open $src r]
46 set output [open $dst w]
47 for {gets $input line} {![eof $input]} {gets $input line} {
48 puts $output [subst -nobackslashes $line]
49 }
50 close $input
51 close $output
52 }
53
54 proc mu_makespool args {
55 for {set i 0} {$i < [llength $args]} {incr i} {
56 set src [lindex $args $i]
57 if {![file isdirectory $src]} {
58 perror "$src is not a directory"
59 exit 1
60 }
61 incr i
62 set dst [lindex $args $i]
63 verbose "MU_MAKESPOOL $src => $dst"
64 if [file exists $dst] {
65 if {![file isdirectory $dst]} {
66 perror "$dst exists but is not a directory"
67 exit 1
68 }
69 file delete -force "$dst"
70 }
71 file mkdir "$dst"
72
73 file attributes "$dst" -permissions "u=rwx"
74 set input [open $src/DISTFILES r]
75 for {gets $input line} {![eof $input]} {gets $input line} {
76 switch -regexp -- "$line" {
77 "^#.*" { }
78 "^\$" { }
79 ".*\\.in" {
80 regexp "(.*)\\.in" $line dummy name
81 verbose "copying $src/$line => $dst/$name #(with edits)"
82 mu_copy_file "$src/$line" "$dst/$name"
83 }
84 default {
85 verbose "copying $src/$line => $dst/$line"
86 file copy -force -- "$src/$line" "$dst/$line"
87 file attributes "$dst/$line" -permissions "u=rw"
88 }
89 }
90 }
91 close $input
92 }
93 }
94
95 proc mu_create_config {name} {
96 global objdir
97 mu_copy_file $objdir/$name.rcin $objdir/$name.rc
98 }
99
26 proc mu_init {args} { 100 proc mu_init {args} {
27 global TOOL_EXECUTABLE 101 global TOOL_EXECUTABLE
28 global MU_TOOL 102 global MU_TOOL
...@@ -31,7 +105,6 @@ proc mu_init {args} { ...@@ -31,7 +105,6 @@ proc mu_init {args} {
31 global MU_SPOOL_DIR 105 global MU_SPOOL_DIR
32 global MU_FOLDER_DIR 106 global MU_FOLDER_DIR
33 global MU_RC_DIR 107 global MU_RC_DIR
34 global MU_MAKESPOOL
35 global tool 108 global tool
36 global MU_TOOL_FLAGS 109 global MU_TOOL_FLAGS
37 global MU_DATA_DIR 110 global MU_DATA_DIR
...@@ -51,7 +124,6 @@ proc mu_init {args} { ...@@ -51,7 +124,6 @@ proc mu_init {args} {
51 set MU_FOLDER_SOURCE "$top_srcdir/testsuite/folder" 124 set MU_FOLDER_SOURCE "$top_srcdir/testsuite/folder"
52 set MU_DATA_DIR "$objdir/data" 125 set MU_DATA_DIR "$objdir/data"
53 set MU_RC_DIR "$top_srcdir/testsuite/etc" 126 set MU_RC_DIR "$top_srcdir/testsuite/etc"
54 set MU_MAKESPOOL "$top_srcdir/testsuite/makespool"
55 } else { 127 } else {
56 if [info exists host_board] { 128 if [info exists host_board] {
57 if [board_info $host_board exists top_builddir] { 129 if [board_info $host_board exists top_builddir] {
...@@ -71,7 +143,6 @@ proc mu_init {args} { ...@@ -71,7 +143,6 @@ proc mu_init {args} {
71 set MU_SPOOL_SOURCE "[board_info $host_board top_srcdir]/spool" 143 set MU_SPOOL_SOURCE "[board_info $host_board top_srcdir]/spool"
72 set MU_FOLDER_SOURCE "[board_info $host_board top_srcdir]/folder" 144 set MU_FOLDER_SOURCE "[board_info $host_board top_srcdir]/folder"
73 set MU_DATA_DIR "[board_info $host_board objdir]/data" 145 set MU_DATA_DIR "[board_info $host_board objdir]/data"
74 set MU_MAKESPOOL "[board_info $host_board top_srcdir]/testsuite/makespool"
75 } 146 }
76 147
77 set MU_SPOOL_DIR "$MU_DATA_DIR/spool" 148 set MU_SPOOL_DIR "$MU_DATA_DIR/spool"
...@@ -279,30 +350,15 @@ proc mu_exec {args} { ...@@ -279,30 +350,15 @@ proc mu_exec {args} {
279 ### Only procedures should come after this point. 350 ### Only procedures should come after this point.
280 351
281 proc mu_prepare_spools {} { 352 proc mu_prepare_spools {} {
282 global MU_SPOOL_SOURCE 353 global MU_SPOOL_SOURCE
283 global MU_SPOOL_DIR 354 global MU_SPOOL_DIR
284 global MU_FOLDER_SOURCE 355 global MU_FOLDER_SOURCE
285 global MU_FOLDER_DIR 356 global MU_FOLDER_DIR
286 global MU_MAKESPOOL 357
287 358 mu_makespool $MU_SPOOL_SOURCE $MU_SPOOL_DIR\
288 set output [remote_exec host "$MU_MAKESPOOL \ 359 $MU_FOLDER_SOURCE $MU_FOLDER_DIR
289 $MU_SPOOL_SOURCE $MU_SPOOL_DIR\
290 $MU_FOLDER_SOURCE $MU_FOLDER_DIR"]
291 } 360 }
292 361
293 proc mu_cleanup_spools {} {
294 global MU_SPOOL_SOURCE
295 global MU_SPOOL_DIR
296 global MU_FOLDER_SOURCE
297 global MU_FOLDER_DIR
298 global MU_MAKESPOOL
299
300 if { $MU_SPOOL_SOURCE != $MU_SPOOL_DIR } {
301 set output [remote_exec host "$MU_MAKESPOOL -r \
302 $MU_SPOOL_DIR $MU_FOLDER_DIR"]
303 }
304 }
305
306 proc mu_version {} { 362 proc mu_version {} {
307 global MU_TOOL 363 global MU_TOOL
308 global MU_TOOL_FLAGS 364 global MU_TOOL_FLAGS
......