mirror of
https://git.savannah.gnu.org/git/coreutils.git
synced 2026-10-24 02:08:57 +03:00
tests: misc: skip a test if the absolute top build dir is unsafe
Without this change, this test would fail during 'make distcheck', for example. * tests/misc/exec-bad-unicode.sh: Skip the test if $abs_top_builddir has spaces or special characters. * cfg.mk (_tb_misc): Also match tests/misc/exec-bad-unicode.sh. Reported by Bruno Haible.
This commit is contained in:
2
cfg.mk
2
cfg.mk
@@ -988,7 +988,7 @@ exclude_file_name_regexp--sc_prohibit_continued_string_alpha_in_column_1 = \
|
||||
^src/(system\.h|od\.c|printf\.c|getlimits\.c)$$
|
||||
|
||||
_cksum = ^tests/cksum/cksum-base64\.pl$$
|
||||
_tb_misc = misc/(stdbuf|responsive)
|
||||
_tb_misc = misc/(exec-bad-unicode|stdbuf|responsive)
|
||||
exclude_file_name_regexp--sc_prohibit_test_backticks = \
|
||||
^tests/(local\.mk|(init|$(_tb_misc)|factor/create-test)\.sh)$$|$(_cksum)
|
||||
|
||||
|
||||
@@ -19,6 +19,15 @@
|
||||
|
||||
. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src
|
||||
|
||||
# stdbuf fails when the absolute top build dir name contains e.g.,
|
||||
# space, TAB, NL
|
||||
lf='
|
||||
'
|
||||
case $abs_top_builddir in
|
||||
*[\\\"\#\$\&\'\`$lf\ \ ]*)
|
||||
skip_ "unsafe absolute build directory name: $abs_top_builddir";;
|
||||
esac
|
||||
|
||||
script="$(bad_unicode)"
|
||||
|
||||
# Create a program with invalid Unicode in its name.
|
||||
|
||||
Reference in New Issue
Block a user