4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-15 19:09:58 +08:00
Thomas Fitzsimmons eaa75b70e3 * Makefile.am (check-DEJAGNU): New target.
(site.exp): Likewise.
	* acinclude.m4 (NEWLIB_CONFIGURE): Replace AC_CANONICAL_HOST
	with AC_CANONICAL_SYSTEM.  Remove AC_CANONICAL_BUILD.
	* libc/locale/locale.c (_setlocale_r): Add UTF-8 support.
	* libc/stdlib/mbtowc_r.c (_mbtowc_r): Likewise.
	* libc/stdlib/wctomb_r.c (_wctomb_r): Likewise.
	* testsuite: New directory.
	* testsuite/config: Likewise.
	* testsuite/lib: Likewise.
	* testsuite/newlib.locale: Likewise.
	* testsuite/newlib.string: Likewise.
	* testsuite/config/default.exp: New file.
	* testsuite/lib/checkoutput.exp: New file.
	* testsuite/lib/newlib.exp: New file.
	* testsuite/lib/passfail.exp: New file.
	* testsuite/newlib.locale/UTF-8.c: New file.
	* testsuite/newlib.locale/UTF-8.exp: New file.
	* testsuite/newlib.locale/locale.exp: New file.
	* testsuite/newlib.string/string.exp: New file.
	* testsuite/newlib.string/tstring.c: New file.
2002-04-24 20:53:30 +00:00

40 lines
1.2 KiB
Plaintext

# 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 compiles and runs all the source files in the test
# directory that are not included in the check_output_tests list.
# check_output_tests lists the sources' basenames.
proc newlib_pass_fail { check_output_tests } {
global srcdir objdir subdir runtests
foreach testcase [glob -nocomplain $srcdir/$subdir/*.c] {
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $testcase] then {
continue
}
# Exclude tests which require their output to be checked
if {[lsearch $check_output_tests "[file tail $testcase]"] != -1} then {
continue
}
set test_driver "$objdir/testsuite/[file tail [file rootname $testcase].x]"
set comp_output [newlib_target_compile "$testcase" "$test_driver" "executable" ""]
if { $comp_output != "" } {
fail "Failed to compile $testcase.\n"
fail "$testcase"
} else {
pass "Compiled $testcase.\n"
set result [newlib_load $test_driver ""]
set status [lindex $result 0]
$status "$testcase"
}
}
}