Skip to content
Commit 79937804 authored by Alan Modra's avatar Alan Modra
Browse files

Don't trim trailing newline in run_host_cmd

Testcases like ld-elf/pr19719a.c that
    printf ("PASS\n");
on success ought to see the whole output for "string match".
Similarly, the ld-pe/ pdb*.d files shouldn't need to remove the last
newline to match.  For most of the testsuite it doesn't matter whether
the trailing newline is present or not, and there are only a few cases
where we need to remove it.

	* testsuite/lib/ld-lib.exp (run_host_cmd): Don't regsub away
	output trailing newline.  Do string trim for gcc/ld version checks.
	* testsuite/config/default.exp (plug_so): Do string trim output of
	run_host_cmd.
	* testsuite/ld-elf/shared.exp (mix_pic_and_non_pic): Adjust
	string match to include trailing newline.
	* testsuite/ld-i386/i386.exp (undefined_weak): Likewise.
	* testsuite/ld-x86-64/x86-64.exp (undefined_weak): Likewise.
	* testsuite/ld-plugin/libdep.exp (run_test): Likewise.
	* testsuite/ld-plugin/lto.exp (PR ld/28138 run): Likewise.
	* testsuite/ld-pe/pdb-strings.d,
	* testsuite/ld-pe/pdb-syms1-globals.d,
	* testsuite/ld-pe/pdb-syms1-records.d,
	* testsuite/ld-pe/pdb-syms1-symbols1.d,
	* testsuite/ld-pe/pdb-syms1-symbols2.d,
	* testsuite/ld-pe/pdb-syms2-symbols1.d,
	* testsuite/ld-pe/pdb-types1-hashlist.d,
	* testsuite/ld-pe/pdb-types1-skiplist.d,
	* testsuite/ld-pe/pdb-types1-typelist.d,
	* testsuite/ld-pe/pdb-types2-hashlist.d,
	* testsuite/ld-pe/pdb-types2-skiplist.d,
	* testsuite/ld-pe/pdb-types2-typelist.d,
	* testsuite/ld-pe/pdb-types3-hashlist.d,
	* testsuite/ld-pe/pdb-types3-skiplist.d,
	* testsuite/ld-pe/pdb-types3-typelist.d,
	* testsuite/ld-pe/pdb1-publics.d,
	* testsuite/ld-pe/pdb1-sym-record.d,
	* testsuite/ld-pe/pdb2-section-contrib.d,
	* testsuite/ld-pe/pdb3-c13-info1.d,
	* testsuite/ld-pe/pdb3-c13-info2.d,
	* testsuite/ld-pe/pdb3-source-info.d: Add trailing newline.
parent 7d24d987
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment