From e7a2580b96370da03c4d3553ccdf4ee66a14c6a4 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Sun, 1 Jan 2017 22:38:02 +0000 Subject: maint: update all copyright year number ranges Run "make update-copyright" and then... * gnulib: Update to latest with copyright year adjusted. * tests/init.sh: Sync with gnulib to pick up copyright year. * bootstrap: Likewise. * tests/sample-test: Adjust to use the single most recent year. --- tests/init.sh | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'tests/init.sh') diff --git a/tests/init.sh b/tests/init.sh index da743c2ab..584194f0e 100755 --- a/tests/init.sh +++ b/tests/init.sh @@ -1,6 +1,6 @@ # source this file; set up for tests -# Copyright (C) 2009-2016 Free Software Foundation, Inc. +# Copyright (C) 2009-2017 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 @@ -45,6 +45,9 @@ # Running a single test, with verbose output: # $ make check TESTS=test-foo.sh VERBOSE=yes # +# Running a single test, keeping the temporary directory: +# $ make check TESTS=test-foo.sh KEEP=yes +# # Running a single test, with single-stepping: # 1. Go into a sub-shell: # $ bash @@ -349,11 +352,15 @@ remove_tmp_ () { __st=$? cleanup_ - # cd out of the directory we're about to remove - cd "$initial_cwd_" || cd / || cd /tmp - chmod -R u+rwx "$test_dir_" - # If removal fails and exit status was to be 0, then change it to 1. - rm -rf "$test_dir_" || { test $__st = 0 && __st=1; } + if test "$KEEP" = yes; then + echo "Not removing temporary directory $test_dir_" + else + # cd out of the directory we're about to remove + cd "$initial_cwd_" || cd / || cd /tmp + chmod -R u+rwx "$test_dir_" + # If removal fails and exit status was to be 0, then change it to 1. + rm -rf "$test_dir_" || { test $__st = 0 && __st=1; } + fi exit $__st } -- cgit v1.2.3-54-g00ecf