Commit cc2cc3be by Rainer Orth Committed by Rainer Orth

Tabify all D *.exp files

	libphobos:
	* testsuite/lib/libphobos-dg.exp: Tabify.
	* testsuite/lib/libphobos.exp: Likewise.
	* testsuite/libphobos.cycles/cycles.exp: Likewise.
	* testsuite/libphobos.shared/shared.exp: Likewise.
	* testsuite/libphobos.unittests/unittests.exp: Likewise.

	gcc/testsuite:
	* gdc.dg/dg.exp: Tabify.
	* gdc.dg/lto/lto.exp: Likewise.
	* gdc.test/gdc-test.exp: Likewise.
	* lib/gdc-dg.exp: Likewise.
	* lib/gdc.exp: Likewise.

From-SVN: r268987
parent c4149197
2019-02-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* gdc.dg/dg.exp: Tabify.
* gdc.dg/lto/lto.exp: Likewise.
* gdc.test/gdc-test.exp: Likewise.
* lib/gdc-dg.exp: Likewise.
* lib/gdc.exp: Likewise.
2019-02-18 Richard Biener <rguenther@suse.de>
PR tree-optimization/89296
......
......@@ -24,12 +24,12 @@ load_lib gdc-dg.exp
if ![info exists TORTURE_OPTIONS] {
set TORTURE_OPTIONS [list \
{ -O0 } { -O1 } { -O2 } { -O3 } { -Os } \
{ -O0 -frelease } { -O0 -g } { -O0 -frelease -g } \
{ -O1 -frelease } { -O1 -g } { -O1 -frelease -g } \
{ -O2 -frelease } { -O2 -g } { -O2 -frelease -g } \
{ -O3 -frelease } { -O3 -g } { -O3 -frelease -g } \
{ -Os -frelease } { -Os -g } { -Os -frelease -g }]
{ -O0 } { -O1 } { -O2 } { -O3 } { -Os } \
{ -O0 -frelease } { -O0 -g } { -O0 -frelease -g } \
{ -O1 -frelease } { -O1 -g } { -O1 -frelease -g } \
{ -O2 -frelease } { -O2 -g } { -O2 -frelease -g } \
{ -O3 -frelease } { -O3 -g } { -O3 -frelease -g } \
{ -Os -frelease } { -Os -g } { -Os -frelease -g }]
}
# Initialize `dg'.
......
......@@ -51,7 +51,7 @@ set sid "d_lto"
foreach src [lsort [find $srcdir/$subdir *_0.d]] {
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $src] then {
continue
continue
}
lto-execute $src $sid
......
......@@ -37,7 +37,7 @@ proc gdc-dg-test { prog do_what extra_tool_flags } {
set prog [dg-trim-dirname gdc.test $prog]
set result \
[gcc-dg-test-1 gdc_target_compile $prog $do_what $extra_tool_flags]
[gcc-dg-test-1 gdc_target_compile $prog $do_what $extra_tool_flags]
set comp_output [lindex $result 0]
set output_file [lindex $result 1]
......@@ -60,26 +60,26 @@ proc gdc-dg-runtest { testcases flags default-extra-flags } {
global runtests
foreach test $testcases {
# If we're only testing specific files and this isn't one of
# them, skip it.
if ![runtest_file_p $runtests $test] {
continue
}
# Use TORTURE_OPTIONS to cycle through an option list.
if [torture-options-exist] then {
global torture_with_loops
set option_list $torture_with_loops
} else {
set option_list { "" }
}
set nshort [file tail [file dirname $test]]/[file tail $test]
foreach flags_t $option_list {
verbose "Testing $nshort, $flags $flags_t" 1
dg-test $test "$flags $flags_t" ${default-extra-flags}
}
# If we're only testing specific files and this isn't one of
# them, skip it.
if ![runtest_file_p $runtests $test] {
continue
}
# Use TORTURE_OPTIONS to cycle through an option list.
if [torture-options-exist] then {
global torture_with_loops
set option_list $torture_with_loops
} else {
set option_list { "" }
}
set nshort [file tail [file dirname $test]]/[file tail $test]
foreach flags_t $option_list {
verbose "Testing $nshort, $flags $flags_t" 1
dg-test $test "$flags $flags_t" ${default-extra-flags}
}
}
}
......@@ -93,13 +93,13 @@ if { [info procs gdc_load] != [list] \
rename gdc_load prev_gdc_load
proc gdc_load { program args } {
global GDC_EXECUTE_ARGS
if [info exists GDC_EXECUTE_ARGS] then {
set args [concat "{$GDC_EXECUTE_ARGS}"]
}
#print "Running: $program [lindex $args 0]"
set result [eval [list prev_gdc_load $program] $args ]
return $result
global GDC_EXECUTE_ARGS
if [info exists GDC_EXECUTE_ARGS] then {
set args [concat "{$GDC_EXECUTE_ARGS}"]
}
#print "Running: $program [lindex $args 0]"
set result [eval [list prev_gdc_load $program] $args ]
return $result
}
}
2019-02-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* testsuite/lib/libphobos-dg.exp: Tabify.
* testsuite/lib/libphobos.exp: Likewise.
* testsuite/libphobos.cycles/cycles.exp: Likewise.
* testsuite/libphobos.shared/shared.exp: Likewise.
* testsuite/libphobos.unittests/unittests.exp: Likewise.
2019-02-14 Maya Rashish <coypu@sdf.org>
* configure.tgt: Add netbsd/x86 as supported target.
......
......@@ -42,11 +42,11 @@ if { [info procs libphobos_load] != [list] \
rename libphobos_load prev_libphobos_load
proc libphobos_load { program args } {
global libphobos_run_args
if { $libphobos_run_args != "" } {
set args [concat "{$libphobos_run_args}"]
}
set result [eval [list prev_libphobos_load $program] $args ]
return $result
global libphobos_run_args
if { $libphobos_run_args != "" } {
set args [concat "{$libphobos_run_args}"]
}
set result [eval [list prev_libphobos_load $program] $args ]
return $result
}
}
......@@ -48,30 +48,30 @@ proc libphobos-dg-test { prog do_what extra_tool_flags } {
# Set up the compiler flags, based on what we're going to do.
switch $do_what {
"run" {
set compile_type "executable"
# FIXME: "./" is to cope with "." not being in $PATH.
# Should this be handled elsewhere?
# YES.
set output_file "./[file rootname [file tail $prog]].exe"
# This is the only place where we care if an executable was
# created or not. If it was, dg.exp will try to run it.
catch { remote_file build delete $output_file }
}
"link" {
set compile_type "executable"
set output_file "./[file rootname [file tail $prog]].exe"
}
default {
perror "$do_what: not a valid dg-do keyword"
return ""
}
"run" {
set compile_type "executable"
# FIXME: "./" is to cope with "." not being in $PATH.
# Should this be handled elsewhere?
# YES.
set output_file "./[file rootname [file tail $prog]].exe"
# This is the only place where we care if an executable was
# created or not. If it was, dg.exp will try to run it.
catch { remote_file build delete $output_file }
}
"link" {
set compile_type "executable"
set output_file "./[file rootname [file tail $prog]].exe"
}
default {
perror "$do_what: not a valid dg-do keyword"
return ""
}
}
set select_compile "libphobos_target_compile"
set options ""
if { $extra_tool_flags != "" } {
lappend options "additional_flags=$extra_tool_flags"
lappend options "additional_flags=$extra_tool_flags"
}
set comp_output [$select_compile "$prog" "$output_file" "$compile_type" $options]
......@@ -95,15 +95,15 @@ proc libphobos_init { args } {
# If a testcase doesn't have special options, use these.
if ![info exists DEFAULT_DFLAGS] then {
set DEFAULT_DFLAGS ""
set DEFAULT_DFLAGS ""
}
# By default, we assume we want to run program images.
global dg-do-what-default
if [isnative] {
set dg-do-what-default "run"
set dg-do-what-default "run"
} else {
set dg-do-what-default "link"
set dg-do-what-default "link"
}
# What arguments to pass to run program images.
......@@ -121,15 +121,15 @@ proc libphobos_init { args } {
set gdcldflags ""
if { [file exists $flags_file] } {
set gdc [exec sh $flags_file --gdc]
set gdcflags [exec sh $flags_file --gdcflags]
set gdcpaths [exec sh $flags_file --gdcpaths]
set gdcldflags [exec sh $flags_file --gdcldflags]
set gdc [exec sh $flags_file --gdc]
set gdcflags [exec sh $flags_file --gdcflags]
set gdcpaths [exec sh $flags_file --gdcpaths]
set gdcldflags [exec sh $flags_file --gdcldflags]
}
set exeext ""
if [info exists env(EXEEXT)] {
set exeext $env(EXEEXT)
set exeext $env(EXEEXT)
}
# Compute what needs to be added to the existing LD_LIBRARY_PATH.
......@@ -137,16 +137,16 @@ proc libphobos_init { args } {
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
if {$gccdir != ""} {
set gccdir [file dirname $gccdir]
append ld_library_path ":${gccdir}"
set gccdir [file dirname $gccdir]
append ld_library_path ":${gccdir}"
}
if { [file exists "${blddir}/libdruntime/.libs/libgdruntime.${shlib_ext}"] } {
append ld_library_path ":${blddir}/libdruntime/.libs"
append ld_library_path ":${blddir}/libdruntime/.libs"
}
if { [file exists "${blddir}/src/.libs/libgphobos.${shlib_ext}"] } {
append ld_library_path ":${blddir}/src/.libs"
append ld_library_path ":${blddir}/src/.libs"
}
set_ld_library_path_env_vars
......@@ -166,21 +166,21 @@ proc libphobos_target_compile { source dest type options } {
lappend options "additional_flags=-fno-diagnostics-show-caret -fdiagnostics-color=never"
if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
lappend options "libs=${gluefile}"
lappend options "ldflags=${wrap_flags}"
lappend options "libs=${gluefile}"
lappend options "ldflags=${wrap_flags}"
}
# Flag setting based on type argument.
if { $type == "executable" } {
# Link the support objects into executables.
lappend options "additional_flags=$gdcldflags"
# Link the support objects into executables.
lappend options "additional_flags=$gdcldflags"
}
# Set the compiler, only add D flags and paths if building D sources.
set gdc_final $gdc
if [regexp ".*\.d\$" $source] {
set gdc_final [concat $gdc_final $gdcflags]
set gdc_final [concat $gdc_final $gdcpaths]
set gdc_final [concat $gdc_final $gdcflags]
set gdc_final [concat $gdc_final $gdcpaths]
}
lappend options "compiler=$gdc_final"
......
......@@ -20,7 +20,7 @@ set dg-output-text [list]
# Arguments to pass to the test program, expected output, and return code.
set cycle_test_list [list \
{ ignore "" 0 } \
{ ignore "" 0 } \
{ abort "object.Error@.*: Cyclic dependency between module mod. and mod." 1 } \
{ print "Cyclic dependency between module mod. and mod." 0 } \
{ deprecate "Deprecation 16211 warning:" 0 } \
......@@ -41,8 +41,8 @@ foreach cycle_test $cycle_test_list {
set expected_fail [lindex $cycle_test 2]
foreach test $tests {
set shouldfail $expected_fail
dg-test $test "" $DEFAULT_DFLAGS
set shouldfail $expected_fail
dg-test $test "" $DEFAULT_DFLAGS
}
set shouldfail 0
......
......@@ -39,9 +39,9 @@ proc shared_library { source destfile options } {
set comp_output [libphobos_target_compile "$source" "$destfile" "executable" $options]
if ![ string match "" $comp_output ] {
fail "libphobos.shared/[file tail $source]"
verbose -log $comp_output
return 1
fail "libphobos.shared/[file tail $source]"
verbose -log $comp_output
return 1
}
lappend all_libraries $destfile
......@@ -52,7 +52,7 @@ shared_library "$srcdir/$subdir/lib.d" "lib.so" ""
# liblinkdep.so
shared_library "$srcdir/$subdir/liblinkdep.d" "liblinkdep.so" \
[list "additional_flags=-I$srcdir/$subdir lib.so"]
[list "additional_flags=-I$srcdir/$subdir lib.so"]
# libloaddep.so
shared_library "$srcdir/$subdir/libloaddep.d" "libloaddep.so" ""
......@@ -69,14 +69,14 @@ dg-init
# Main loop.
dg-test "$srcdir/$subdir/link.d" "-I$srcdir/$subdir lib.so -shared-libphobos" \
"$DEFAULT_DFLAGS"
"$DEFAULT_DFLAGS"
dg-test "$srcdir/$subdir/link_linkdep.d" \
"-I$srcdir/$subdir liblinkdep.so lib.so -shared-libphobos" \
"$DEFAULT_DFLAGS"
"-I$srcdir/$subdir liblinkdep.so lib.so -shared-libphobos" \
"$DEFAULT_DFLAGS"
dg-test "$srcdir/$subdir/link_loaddep.d" \
"-I$srcdir/$subdir libloaddep.so -shared-libphobos" "$DEFAULT_DFLAGS"
"-I$srcdir/$subdir libloaddep.so -shared-libphobos" "$DEFAULT_DFLAGS"
# dlopen() tests.
if [is-effective-target dlopen] {
......
......@@ -29,15 +29,15 @@ proc unittest_list_modules { prog } {
# Runs all unittests for each module compiled into the test program.
proc unittest_run_tests { name prog } {
foreach module [unittest_list_modules $prog] {
set result [libphobos_load "$prog" "$module" ""]
set status [lindex $result 0]
$status "libphobos.unittests/$name/$module"
set result [libphobos_load "$prog" "$module" ""]
set status [lindex $result 0]
$status "libphobos.unittests/$name/$module"
}
}
proc unittester { name prog } {
if [file exists $prog] {
unittest_run_tests $name $prog
unittest_run_tests $name $prog
}
}
......
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