diff options
author | Egor Duda <deo@logos-m.ru> | 2001-09-13 23:00:48 +0400 |
---|---|---|
committer | Egor Duda <deo@logos-m.ru> | 2001-09-13 23:00:48 +0400 |
commit | 3900c377d8d9235617544f22f0da59bd0abd2714 (patch) | |
tree | 32b30ffa0a6e2732a6c7f0f0781b7b859b8cfa4d /winsup/testsuite/winsup.api/winsup.exp | |
parent | e9f2bf3049f7dc0dfdeb46f3e5a82f7920dea46c (diff) |
* winsup.api/winsup.exp: Run only selected test if environment
variable CYGWIN_TESTSUITE_TESTS is set. Use its value as regular
expression to filter test names.
* winsup.api/ltp/symlink01.c (creat_path_max): Provide explicit
buffer to getcwd to conform to standards and avoid memory leak.
(do_chdir): Ditto.
Diffstat (limited to 'winsup/testsuite/winsup.api/winsup.exp')
-rw-r--r-- | winsup/testsuite/winsup.api/winsup.exp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/winsup/testsuite/winsup.api/winsup.exp b/winsup/testsuite/winsup.api/winsup.exp index 1f0d9e7d5..6fb566335 100644 --- a/winsup/testsuite/winsup.api/winsup.exp +++ b/winsup/testsuite/winsup.api/winsup.exp @@ -13,6 +13,12 @@ set add_libs "" set ltp_includes "-I$ltp_includes" set ltp_libs "$rootme/libltp.a" +set test_filter "" + +if { [info exists env(CYGWIN_TESTSUITE_TESTS)] } { + set test_filter "$env(CYGWIN_TESTSUITE_TESTS)" +} + proc ws_spawn {cmd args} { global rv verbose "running $cmd\n" @@ -20,7 +26,14 @@ proc ws_spawn {cmd args} { verbose send "catchCode = $rv\n" } +verbose "Filter: $test_filter" + foreach src [glob -nocomplain $srcdir/$subdir/*.c $srcdir/$subdir/*/*.c] { + if { $test_filter != "" && ! [regexp $test_filter $src] } { + verbose -log "Skipping $src" + continue + } + regsub "^$srcdir/$subdir/" $src "" testcase regsub ".c$" $testcase "" base regsub ".*/" $base "" basename |