X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=t%2Finstmany-python.sh;h=dfcf14bf25208800781fca74e1adc4854d8fe21e;hb=0ac06406dcc6cf9c5f1fbeef340764e73cc8eae0;hp=d6dd1189510075346757c71e57593d2007b397aa;hpb=062aeb245e68208dccb3ccc9b28e100a81dbc79b;p=platform%2Fupstream%2Fautomake.git diff --git a/t/instmany-python.sh b/t/instmany-python.sh old mode 100755 new mode 100644 index d6dd118..dfcf14b --- a/t/instmany-python.sh +++ b/t/instmany-python.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2008-2012 Free Software Foundation, Inc. +# Copyright (C) 2008-2013 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -16,36 +16,45 @@ # Installing many files should not exceed the command line length limit. -# This is the python sister test of instmany.test, see there for details. +# This is the python sister test of 'instmany.sh', see there for details. required='python' -. ./defs || Exit 1 +. test-init.sh limit=2500 subdir=long_subdir_name_with_many_characters nfiles=81 list=$(seq_ 1 $nfiles) -sed "s|@limit@|$limit|g" >myinstall.in <<'END' +oPATH=$PATH; export oPATH +nPATH=$(pwd)/x-bin$PATH_SEPARATOR$PATH; export nPATH + +mkdir x-bin + +sed "s|@limit@|$limit|g" >x-bin/my-install <<'END' #! /bin/sh # Fake install script. This doesn't really install # (the INSTALL path below would be wrong outside this directory). limit=@limit@ -INSTALL='@INSTALL@' -len=`expr "$INSTALL $*" : ".*" 2>/dev/null || echo $limit` +PATH=$oPATH; export PATH +if test -z "$orig_INSTALL"; then + echo "$0: \$orig_INSTALL variable not set" >&2 + exit 1 +fi +len=`expr "$orig_INSTALL $*" : ".*" 2>/dev/null || echo $limit` if test $len -ge $limit; then echo "$0: safe command line limit of $limit characters exceeded" >&2 exit 1 fi -exit 0 +exec $orig_INSTALL "$@" +exit 1 END # Creative quoting in the next line to please maintainer-check. -sed "s|@limit@|$limit|g" >'rm' <<'END' +sed "s|@limit@|$limit|g" >x-bin/'rm' <<'END' #! /bin/sh limit=@limit@ -PATH=$save_PATH -export PATH +PATH=$oPATH; export PATH RM='rm -f' len=`expr "$RM $*" : ".*" 2>/dev/null || echo $limit` if test $len -ge $limit; then @@ -56,11 +65,16 @@ exec $RM "$@" exit 1 END -chmod +x rm +# Creative quoting in the next line to please maintainer-check. +chmod +x x-bin/'rm' x-bin/my-install + +cat > setenv.in <<'END' +orig_INSTALL='@INSTALL@'; export orig_INSTALL +END cat >>configure.ac <