Imported Upstream version 2.4.2
[platform/upstream/libtool.git] / tests / cmdline_wrap.at
1 # cmdline_wrap.at -- run tests with low max_cmd_len           -*- Autotest -*-
2
3 #   Copyright (C) 2007, 2009 Free Software Foundation, Inc.
4 #   Written by Ralf Wildenhues, 2007
5 #
6 #   This file is part of GNU Libtool.
7 #
8 # GNU Libtool is free software; you can redistribute it and/or
9 # modify it under the terms of the GNU General Public License as
10 # published by the Free Software Foundation; either version 2 of
11 # the License, or (at your option) any later version.
12 #
13 # GNU Libtool is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 # GNU General Public License for more details.
17 #
18 # You should have received a copy of the GNU General Public License
19 # along with GNU Libtool; see the file COPYING.  If not, a copy
20 # can be downloaded from  http://www.gnu.org/licenses/gpl.html,
21 # or obtained by writing to the Free Software Foundation, Inc.,
22 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 ####
24
25 # Make sure libtool works when it needs to wrap command lines.
26 # We simulate this by setting max_cmd_len very low.
27
28 AT_SETUP([Run tests with low max_cmd_len])
29 AT_KEYWORDS([recursive])
30 m4_ifdef([AT_CAPTURE_FILE],
31 [AT_CAPTURE_FILE([testsuite.log])])
32
33 sed 's,max_cmd_len=.*,max_cmd_len="24",' < $LIBTOOL > libtool
34 chmod +x libtool
35 LIBTOOL=`pwd`/libtool
36 export LIBTOOL
37 # run the suite in a subdirectory, otherwise the two suites will compete
38 # for the output file `testsuite.log'.
39 mkdir tests
40 cd tests
41 INNER_TESTSUITEFLAGS="$INNER_TESTSUITEFLAGS abs_top_srcdir=$abs_top_srcdir \
42   abs_builddir=$abs_builddir"
43 AT_CHECK([$CONFIG_SHELL $abs_srcdir/testsuite -k libtool$INNER_TESTSUITEFLAGS],
44          [], [ignore], [ignore])
45
46 AT_CLEANUP