Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/testsuite/lib')
-rw-r--r--newlib/testsuite/lib/checkoutput.exp40
-rw-r--r--newlib/testsuite/lib/flags.exp82
-rw-r--r--newlib/testsuite/lib/newlib.exp104
-rw-r--r--newlib/testsuite/lib/passfail.exp50
4 files changed, 0 insertions, 276 deletions
diff --git a/newlib/testsuite/lib/checkoutput.exp b/newlib/testsuite/lib/checkoutput.exp
deleted file mode 100644
index 8cb46925f..000000000
--- a/newlib/testsuite/lib/checkoutput.exp
+++ /dev/null
@@ -1,40 +0,0 @@
-# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
-#
-# Permission to use, copy, modify, and distribute this software
-# is freely granted, provided that this notice is preserved.
-#
-
-# newlib_check_output takes the basename of the test source file, and
-# a list of TCL regular expressions representing the expected output.
-# It assumes one line of output per test.
-
-proc newlib_check_output { srcfile expectlist } {
- global objdir subdir srcdir
-
- set srcfullname "$srcdir/$subdir/$srcfile"
- set test_driver "$objdir/testsuite/[file tail [file rootname $srcfullname].x]"
-
- set comp_output [newlib_target_compile "$srcfullname" "$test_driver" "executable" ""]
-
- if { $comp_output != "" } {
- fail "Failed to compile $srcfile.\n"
- return
- }
-
- set result [newlib_load $test_driver ""]
- set status [lindex $result 0]
- set output [lindex $result 1]
-
- set output_lines [split $output "\n"]
-
- foreach { expectedval } $expectlist {
- set gotval [string trim [lindex $output_lines 0] "\r"]
- if { ! [string match $expectedval $gotval] } {
- fail "$srcfile: Expected: $expectedval Got: $gotval "
- return
- }
- set output_lines [lrange $output_lines 1 end]
- }
-
- pass $srcfile
-}
diff --git a/newlib/testsuite/lib/flags.exp b/newlib/testsuite/lib/flags.exp
deleted file mode 100644
index f6bffde1f..000000000
--- a/newlib/testsuite/lib/flags.exp
+++ /dev/null
@@ -1,82 +0,0 @@
-# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
-#
-# Permission to use, copy, modify, and distribute this software
-# is freely granted, provided that this notice is preserved.
-#
-
-# flags.exp: overrides the dejagnu versions of libgloss_link_flags,
-# newlib_link_flags, and newlib_include_flags.
-
-# These versions of the procedures generate link and include flags
-# by searching for the needed files in the current build and source
-# directories, rather than in the build and source paths of the
-# compiler being used.
-
-proc libgloss_link_flags { args } {
- global target_cpu
- # These values come from the local site.exp.
- global srcdir objdir
- global multibuildtop
-
- verbose "In newlib version of libgloss_link_flags...\n"
-
- if [isnative] {
- return ""
- }
-
- if [is_remote host] {
- return ""
- }
-
- set target_build_path "$objdir/$multibuildtop.."
-
- set gloss_srcdir [lookfor_file ${srcdir} libgloss/$target_cpu]
-
- if { $gloss_srcdir == "" } {
- return ""
- }
-
- if [file exists $target_build_path/libgloss/$target_cpu] {
- verbose "libgloss path is $target_build_path/libgloss/$target_cpu" 2
- return "-B$target_build_path/libgloss/$target_cpu/ -L$target_build_path/libgloss/$target_cpu -L$gloss_srcdir"
- } else {
- verbose -log "No libgloss support for this target." 2
- return ""
- }
-}
-
-proc newlib_link_flags { args } {
- global tool_root_dir
- global srcdir objdir
-
- verbose "In newlib version of newlib_link_flags...\n"
-
- if [is_remote host] {
- return ""
- }
-
- set ld_script_path [lookfor_file ${tool_root_dir} "ld/ldscripts"];
- if { $ld_script_path != "" } {
- set result "-L[file dirname $ld_script_path]"
- } else {
- set result ""
- }
-
- return "$result -B$objdir -L$objdir"
-}
-
-proc newlib_include_flags { args } {
- global srcdir objdir
-
- verbose "In newlib version of newlib_include_flags...\n"
-
- if [is_remote host] {
- return ""
- }
-
- set newlib_dir [lookfor_file ${srcdir} newlib/libc/include/assert.h]
- if { ${newlib_dir} != "" } {
- set newlib_dir [file dirname ${newlib_dir}]
- }
- return " -I$objdir/targ-include -I${newlib_dir}"
-}
diff --git a/newlib/testsuite/lib/newlib.exp b/newlib/testsuite/lib/newlib.exp
deleted file mode 100644
index c53a8a819..000000000
--- a/newlib/testsuite/lib/newlib.exp
+++ /dev/null
@@ -1,104 +0,0 @@
-# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
-#
-# Permission to use, copy, modify, and distribute this software
-# is freely granted, provided that this notice is preserved.
-#
-
-# flags.exp overrides the dejagnu versions of libgloss_link_flags,
-# newlib_link_flags, and newlib_include_flags.
-load_lib flags.exp
-
-proc newlib_version { } {
- global tool_version
-
- verbose "In newlib version...\n"
-
- return $tool_version
-}
-
-set newlib_initialized 0
-
-proc newlib_init { args } {
- global gluefile wrap_flags
- global newlib_initialized
- global target_info
- # These values are initialized in the local site.exp file.
- global srcdir objdir
- global host_triplet target_triplet
- global old_ld_library_path
-
- verbose "In newlib_init...\n"
-
- if { $newlib_initialized == 1 } { return; }
-
- if {[target_info needs_status_wrapper] != "" && \
- [target_info needs_status_wrapper] != "0" && \
- ![info exists gluefile]} {
- set gluefile ${objdir}/testsuite/testglue.o;
- set result [build_wrapper $gluefile];
- if { $result != "" } {
- set gluefile [lindex $result 0];
- set wrap_flags [lindex $result 1];
- } else {
- unset gluefile
- }
- }
-
- if [string match $host_triplet $target_triplet] then {
- if [string match "i686-pc-linux-gnu" $host_triplet] then {
- set old_ld_library_path [getenv LD_LIBRARY_PATH]
- setenv LD_LIBRARY_PATH "$objdir/.libs"
- }
- }
-}
-
-proc newlib_target_compile { source dest type options } {
- global gluefile wrap_flags
- global srcdir objdir
- global host_triplet target_triplet
-
- verbose "In newlib_target_compile...\n"
-
- lappend options "libs=-I$srcdir/include"
- verbose "srcdir is $srcdir"
-
- if {[target_info needs_status_wrapper] != "" && \
- [target_info needs_status_wrapper] != "0" && \
- [info exists gluefile] } {
- lappend options "libs=$gluefile"
- lappend options "ldflags=$wrap_flags"
- }
-
- if [string match $host_triplet $target_triplet] then {
- if [string match "i686-pc-linux-gnu" $host_triplet] then {
- lappend options "libs=$objdir/crt0.o -lc -lgcc"
- lappend options "ldflags=-nostdlib -L$objdir/.libs [newlib_include_flags]"
- }
- }
-
- return [target_compile $source $dest $type $options]
-}
-
-proc newlib_finish { } {
- global old_ld_library_path
- global host_triplet target_triplet
-
- verbose "In newlib_finish...\n"
-
- if [string match $host_triplet $target_triplet] then {
- if [string match "i686-pc-linux-gnu" $host_triplet] then {
- setenv LD_LIBRARY_PATH "$old_ld_library_path"
- }
- }
-}
-
-proc newlib_exit { } {
- global gluefile;
-
- verbose "In newlib_exit...\n"
-
- if [info exists gluefile] {
- file_on_build delete $gluefile;
- unset gluefile;
- }
-}
diff --git a/newlib/testsuite/lib/passfail.exp b/newlib/testsuite/lib/passfail.exp
deleted file mode 100644
index 82dc0093c..000000000
--- a/newlib/testsuite/lib/passfail.exp
+++ /dev/null
@@ -1,50 +0,0 @@
-# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
-#
-# Permission to use, copy, modify, and distribute this software
-# is freely granted, provided that this notice is preserved.
-#
-
-# newlib_pass_fail_all compiles and runs all the source files in the
-# test directory. If flag is -x, then the sources whose basenames are
-# listed in exclude_list are not compiled and run.
-
-proc newlib_pass_fail_all { flag exclude_list } {
- global srcdir objdir subdir runtests
-
- foreach fullsrcfile [glob -nocomplain $srcdir/$subdir/*.c] {
- set srcfile "[file tail $fullsrcfile]"
- # If we're only testing specific files and this isn't one of them, skip it.
- if ![runtest_file_p $runtests $srcfile] then {
- continue
- }
-
- # Exclude tests listed in exclude_list.
- if { $flag == "-x" } then {
- if {[lsearch $exclude_list "$srcfile"] != -1} then {
- continue
- }
- }
- newlib_pass_fail "$srcfile"
- }
-}
-
-# newlib_pass_fail takes the basename of a test source file, which it
-# compiles and runs.
-
-proc newlib_pass_fail { srcfile } {
- global srcdir objdir subdir
-
- set fullsrcfile "$srcdir/$subdir/$srcfile"
-
- set test_driver "$objdir/testsuite/[file rootname $srcfile].x"
-
- set comp_output [newlib_target_compile "$fullsrcfile" "$test_driver" "executable" ""]
-
- if { $comp_output != "" } {
- fail "Failed to compile $fullsrcfile.\n"
- } else {
- set result [newlib_load $test_driver ""]
- set status [lindex $result 0]
- $status "$fullsrcfile"
- }
-}