tests: output PATH value in log files

Adjust the PATH variable for the test setup a bit later, i.e., after
'tests/init.sh' has turned on 'set -x', so that the PATH value appears
in the test logfiles.

* init.cfg (fu_path_prepend_): Wrap immediate path_prepend_ call into
this new function.
* tests/find/debug-missing-arg.sh: Use it - right after sourcing in
'tests/init.sh'.
* tests/find/exec-plus-last-file.sh: Likewise.
* tests/find/execdir-fd-leak.sh: Likewise.
* tests/find/many-dir-entries-vs-OOM.sh: Likewise.
* tests/find/name-lbracket-literal.sh: Likewise.
* tests/find/printf_escape_c.sh: Likewise.
* tests/find/printf_escapechars.sh: Likewise.
* tests/find/printf_inode.sh: Likewise.
* tests/find/refuse-noop.sh: Likewise.
* tests/find/type_list.sh: Likewise.
* tests/misc/help-version.sh: Likewise.
* tests/sample-test: Likewise.
* tests/xargs/verbose-quote.sh: Likewise.
This commit is contained in:
2019-09-03 16:35:47 +02:00
parent 617e1392d2
commit 74d0afd581
14 changed files with 17 additions and 14 deletions

View File

@@ -697,6 +697,9 @@ require_gnu_()
}
# Prepend all our source directories to PATH.
path_prepend_ "${srcdir=.}/find" "${srcdir=.}/locate" "${srcdir=.}/xargs"
fu_path_prepend_()
{
path_prepend_ "${srcdir=.}/find" "${srcdir=.}/locate" "${srcdir=.}/xargs"
}
sanitize_path_

View File

@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
# Exercise both find executables.

View File

@@ -20,7 +20,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
# Require seq(1) for this test - which may not be available

View File

@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
# seq is not required by POSIX, so we have manual lists of number here instead.

View File

@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
# Mark as expensive.

View File

@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
# Prepare a file named '['.

View File

@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
echo 'hello^.^world' > exp || framework_failure_

View File

@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
# Check for working od(1).

View File

@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
make_canonical() {

View File

@@ -18,7 +18,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
# Exercise both the previous name of the pseudo-option '-noop',

View File

@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ find oldfind
# This test is in 'all_root_tests' to get better coverage for file types a

View File

@@ -17,7 +17,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
# Terminate any background processes
cleanup_() { kill $pid 2>/dev/null && wait $pid; }

View File

@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ FIXME
# FIXME: skip_if_root_

View File

@@ -16,7 +16,7 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
. "${srcdir=.}/tests/init.sh"
. "${srcdir=.}/tests/init.sh"; fu_path_prepend_
print_ver_ xargs
# Prepare a command with a whitespace in its file name.