summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiguel Sofer <miguel.sofer@gmail.com>2008-07-16 00:44:38 (GMT)
committerMiguel Sofer <miguel.sofer@gmail.com>2008-07-16 00:44:38 (GMT)
commit98c0b4df207d373b44cdb132ffa4f3404b245e57 (patch)
tree3b276b0f4ffb851c065d19760f1a101f63601254
parenta47e05b2688ec13628b7ae14686f7119b6f21010 (diff)
downloadtcl-98c0b4df207d373b44cdb132ffa4f3404b245e57.zip
tcl-98c0b4df207d373b44cdb132ffa4f3404b245e57.tar.gz
tcl-98c0b4df207d373b44cdb132ffa4f3404b245e57.tar.bz2
* tests/NRE.test: better constraint for testing the
* tests/stack.test: existence of teststacklimit, to insure that the testsuite runs under tclsh.
-rw-r--r--ChangeLog4
-rw-r--r--tests/NRE.test11
-rw-r--r--tests/stack.test10
3 files changed, 18 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index b3bea30..d6e41b4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2008-07-15 Miguel Sofer <msofer@users.sf.net>
+ * tests/NRE.test: better constraint for testing the
+ * tests/stack.test: existence of teststacklimit, to insure that
+ the testsuite runs under tclsh.
+
* generic/tclParse.c: fixing incomplete reversion of "fix" for
[Bug 2017583], missing TclResetCancellation call.
diff --git a/tests/NRE.test b/tests/NRE.test
index e0ec9eb..a4007a2 100644
--- a/tests/NRE.test
+++ b/tests/NRE.test
@@ -8,14 +8,17 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: NRE.test,v 1.1 2008/07/13 09:04:54 msofer Exp $
+# RCS: @(#) $Id: NRE.test,v 1.2 2008/07/16 00:44:44 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest
namespace import -force ::tcltest::*
}
-if {[testConstraint unix]} {
+testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]]
+testConstraint teststacklimit [llength [info commands teststacklimit]]
+
+if {[testConstraint teststacklimit]} {
#
# Workaround for gnu-make bug http://savannah.gnu.org/bugs/?18396
#
@@ -27,8 +30,6 @@ if {[testConstraint unix]} {
}
-testConstraint tailcall [llength [info commands ::tcl::unsupported::tailcall]]
-
#
# The first few tests will blow the C stack if the NR machinery is not working
# properly: all these calls should execute within the same instance of TEBC,
@@ -300,7 +301,7 @@ test NRE-T.6 {tailcall does remove callframes} {tailcall} {
# cleanup
::tcltest::cleanupTests
-if {[testConstraint unix]} {
+if {[testConstraint teststacklimit]} {
teststacklimit $oldLimit
}
diff --git a/tests/stack.test b/tests/stack.test
index 4a349fa..7d7f816 100644
--- a/tests/stack.test
+++ b/tests/stack.test
@@ -9,7 +9,7 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
#
-# RCS: @(#) $Id: stack.test,v 1.23 2008/07/13 09:03:36 msofer Exp $
+# RCS: @(#) $Id: stack.test,v 1.24 2008/07/16 00:44:44 msofer Exp $
if {[lsearch [namespace children] ::tcltest] == -1} {
package require tcltest 2
@@ -24,8 +24,14 @@ if {[lsearch [namespace children] ::tcltest] == -1} {
# can still squeak through. A core check is really needed. -- JH
testConstraint minStack2400 1
+testConstraint teststacklimit [llength [info commands teststacklimit]]
+
if {[testConstraint unix]} {
- set stackSize [teststacklimit]
+ if {[testConstraint teststacklimit]} {
+ set stackSize [teststacklimit]
+ } else {
+ set stackSize [exec /bin/sh -c "ulimit -s"]
+ }
if {($stackSize > -1) && ($stackSize < 2400)} {
puts stderr "WARNING: the default application stacksize of $stackSize\
may cause Tcl to\ncrash due to stack overflow before the\