Commit ce9b5c09 by Christophe Lyon

testsuite: Handle --save-temps in schedule-cleanups

Some tests use --save-temps, but schedule-cleanups strictly matches
-save-temps, so we leave many temporary files after validation.
Instead of fixing every offending testcase, it's simpler and
future-proof to make schedule-cleanups handle both --save-temps and
-save-temps.

2020-04-22  Christophe Lyon  <christophe.lyon@linaro.org>

	gcc/testsuite/
	* lib/gcc-dg.exp (schedule-cleanups): Accept --save-temps.
parent aedd04ca
2020-04-22 Christophe Lyon <christophe.lyon@linaro.org>
* lib/gcc-dg.exp (schedule-cleanups): Accept --save-temps.
2020-04-22 Martin Sebor <msebor@redhat.com>
PR c++/94510
......
......@@ -171,7 +171,7 @@ proc schedule-cleanups { opts } {
verbose "dg-keep-saved-temps ${keep_saved_temps_suffixes}" 2
}
# -save-temps -> cleanup-saved-temps()
if [regexp -- {(^|\s+)-save-temps(\s+|$)} $opts] {
if [regexp -- {(^|\s+)-?-save-temps(\s+|$)} $opts] {
verbose "Cleanup -save-temps seen" 4
if [info exists keep_saved_temps_suffixes] {
append finalcode "cleanup-saved-temps ${keep_saved_temps_suffixes}\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment