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