X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=t%2Ftest-driver-is-distributed.sh;h=d870bd9c3248d9e95742f2844759248d60065134;hb=436d6f6f75f08f77f26f857c9b883d64c5061898;hp=fb4e540aff9a16f532c3ea1ae855e0c1fd33d48c;hpb=119d65e9e06ffc6e8997d3ba386429db6cc2ef27;p=platform%2Fupstream%2Fautomake.git diff --git a/t/test-driver-is-distributed.sh b/t/test-driver-is-distributed.sh index fb4e540..d870bd9 100755 --- a/t/test-driver-is-distributed.sh +++ b/t/test-driver-is-distributed.sh @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2011-2012 Free Software Foundation, Inc. +# Copyright (C) 2011-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 @@ -19,36 +19,29 @@ # defined in a subdir Makefile am_create_testdir=empty -am_parallel_tests=yes -. ./defs || Exit 1 +. test-init.sh -ocwd=`pwd` || fatal_ "getting current working directory" +ocwd=$(pwd) || fatal_ "getting current working directory" -do_check () -{ - whereopts=$1 auxdir=$2 - case $#,$whereopts in - 2,ac) ac_opts=parallel-tests am_code= ;; - 2,am) am_opts=parallel-tests ac_code= ;; - *) fatal_ "do_check: bad usage";; - esac - mkdir $whereopts - cd $whereopts +for i in 1 2; do + mkdir D$i + cd D$i + if test $i -eq 1; then + auxdir=. + test_driver=test-driver + else + auxdir=build-aux + test_driver=$auxdir/test-driver + mkdir $auxdir + fi mkdir tests unindent > configure.ac << END AC_INIT([$me], [1.0]) AC_CONFIG_AUX_DIR([$auxdir]) - AM_INIT_AUTOMAKE([$ac_opts]) + AM_INIT_AUTOMAKE AC_CONFIG_FILES([Makefile tests/Makefile]) AC_OUTPUT END - if test $auxdir = .; then - test_driver=test-driver - else - mkdir $auxdir - test_driver=$auxdir/test-driver - fi - # No 'AUTOMAKE_OPTIONS' in here -- purposely. unindent > Makefile.am << END SUBDIRS = tests check-local: test-top @@ -58,7 +51,6 @@ END .PHONY: test-top END unindent > tests/Makefile.am << END - AUTOMAKE_OPTIONS = $am_opts check-local: test-sub test-sub: echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver ' @@ -85,10 +77,7 @@ END $AUTOMAKE diff Makefile.in Makefile.sav diff tests/Makefile.in tests/Makefile.sav - : -} - -do_check ac . -do_check am build-aux + cd "$ocwd" || fatal_ "cannot chdir back to '$ocwd'" +done :