summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-08-14 06:00:06 (GMT)
committerSteven Knight <knight@baldmt.com>2005-08-14 06:00:06 (GMT)
commit1923dc337f9f98c3e08b95654dea4b34084c6302 (patch)
tree359dd0ea59c350586d639773ea945ad98dd0ce7d /test
parenta941b68612df943f6addacc59cd1ff3aa47b5907 (diff)
downloadSCons-1923dc337f9f98c3e08b95654dea4b34084c6302.zip
SCons-1923dc337f9f98c3e08b95654dea4b34084c6302.tar.gz
SCons-1923dc337f9f98c3e08b95654dea4b34084c6302.tar.bz2
Update more tests to use the new skip_test() method. Replace a CHANGES.txt comment inadvertently deleted.
Diffstat (limited to 'test')
-rw-r--r--test/BitKeeper/BitKeeper.py3
-rw-r--r--test/CVS.py3
-rw-r--r--test/DMD.py3
-rw-r--r--test/Java/RMIC.py3
-rw-r--r--test/Perforce/Perforce.py3
-rw-r--r--test/QT/installed.py24
-rw-r--r--test/RCS/diskcheck.py6
-rw-r--r--test/RCS/explicit.py6
-rw-r--r--test/RCS/implicit.py9
-rw-r--r--test/RCS/transparent.py6
-rw-r--r--test/SCCS/diskcheck.py3
-rw-r--r--test/SCCS/explicit.py3
-rw-r--r--test/SCCS/implicit.py3
-rw-r--r--test/SCCS/transparent.py3
-rw-r--r--test/Subversion.py6
-rw-r--r--test/option/debug-count.py5
-rw-r--r--test/option/debug-memory.py5
-rw-r--r--test/option/debug-objects.py5
18 files changed, 47 insertions, 52 deletions
diff --git a/test/BitKeeper/BitKeeper.py b/test/BitKeeper/BitKeeper.py
index 6db48f4..2fa3921 100644
--- a/test/BitKeeper/BitKeeper.py
+++ b/test/BitKeeper/BitKeeper.py
@@ -36,8 +36,7 @@ test = TestSCons.TestSCons()
bk = test.where_is('bk')
if not bk:
- print "Could not find BitKeeper, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'bk'; skipping test(s).\n")
try:
login = os.getlogin()
diff --git a/test/CVS.py b/test/CVS.py
index abdffe2..79257df 100644
--- a/test/CVS.py
+++ b/test/CVS.py
@@ -37,8 +37,7 @@ test = TestSCons.TestSCons()
cvs = test.where_is('cvs')
if not cvs:
- print "Could not find CVS, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'cvs'; skipping test(s).\n")
test.subdir('CVS', 'import', ['import', 'sub'], 'work1', 'work2')
diff --git a/test/DMD.py b/test/DMD.py
index 9bad5f4..8b443f8 100644
--- a/test/DMD.py
+++ b/test/DMD.py
@@ -34,8 +34,7 @@ test = TestSCons.TestSCons()
dmd = test.where_is('dmd')
if not dmd:
- print "dmd not found, skipping test"
- test.pass_test(1)
+ test.skip_test("Could not find 'dmd'; skipping test.\n")
test.write('SConstruct', """\
import os
diff --git a/test/Java/RMIC.py b/test/Java/RMIC.py
index 8f3623c..3ce3dec 100644
--- a/test/Java/RMIC.py
+++ b/test/Java/RMIC.py
@@ -94,8 +94,7 @@ line 3
if not os.path.exists('/usr/local/j2sdk1.3.1/bin/rmic'):
- print "Could not find Java, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find Java; skipping non-simulated test(s).\n")
diff --git a/test/Perforce/Perforce.py b/test/Perforce/Perforce.py
index 5808b23..891acc3 100644
--- a/test/Perforce/Perforce.py
+++ b/test/Perforce/Perforce.py
@@ -41,8 +41,7 @@ test = TestSCons.TestSCons()
p4 = test.where_is('p4')
if not p4:
- print "Could not find Perforce, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'p4'; skipping test(s).\n")
user = os.environ.get('USER')
if not user:
diff --git a/test/QT/installed.py b/test/QT/installed.py
index 14aad26..6b06d37 100644
--- a/test/QT/installed.py
+++ b/test/QT/installed.py
@@ -31,14 +31,15 @@ Look if qt is installed, and try out all builders.
import os
import re
import string
+import sys
import TestSCons
test = TestSCons.TestSCons()
if not os.environ.get('QTDIR', None):
- print "Could not find QT, skipping test(s)."
- test.no_result(1)
+ x ="External environment variable $QTDIR not set; skipping test(s).\n"
+ test.skip_test(x)
test.Qt_dummy_installation()
@@ -175,8 +176,24 @@ int main(int argc, char **argv) {
test.run(arguments="bld/test_realqt" + TestSCons._exe)
+
test.run(program=test.workpath("bld", "test_realqt"),
- stdout="Hello World\n")
+ stdout=None,
+ status=None,
+ stderr=None)
+
+if test.stdout() != "Hello World\n" or test.stderr() != '' or test.status:
+ sys.stdout.write(test.stdout())
+ sys.stderr.write(test.stderr())
+ # The test might be run on a system that doesn't have an X server
+ # running, or may be run by an ID that can't connect to the server.
+ # If so, then print whatever it showed us (which is in and of itself
+ # an indication that it built correctly) but don't fail the test.
+ expect = 'cannot connect to X server'
+ test.fail_test(test.stdout() != '' or
+ string.find(test.stderr(), expect) == -1 or \
+ (test.status>>8) != 1)
+
QTDIR = os.environ['QTDIR']
PATH = os.environ['PATH']
@@ -191,4 +208,5 @@ expect2 = "scons: warning: Could not detect qt, using moc executable as a hint"
test.fail_test(string.find(test.stderr(), expect1) == -1 and
string.find(test.stderr(), expect2) == -1)
+
test.pass_test()
diff --git a/test/RCS/diskcheck.py b/test/RCS/diskcheck.py
index c1d5cca..4a93edf 100644
--- a/test/RCS/diskcheck.py
+++ b/test/RCS/diskcheck.py
@@ -36,13 +36,11 @@ test = TestSCons.TestSCons()
rcs = test.where_is('rcs')
if not rcs:
- print "Could not find RCS, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'rcs'; skipping test(s).\n")
ci = test.where_is('ci')
if not ci:
- print "Could not find `ci' command, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'ci'; skipping test(s).\n")
diff --git a/test/RCS/explicit.py b/test/RCS/explicit.py
index 39ea834..d3d5d87 100644
--- a/test/RCS/explicit.py
+++ b/test/RCS/explicit.py
@@ -36,13 +36,11 @@ test = TestSCons.TestSCons()
rcs = test.where_is('rcs')
if not rcs:
- print "Could not find RCS, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'rcs'; skipping test(s).\n")
ci = test.where_is('ci')
if not ci:
- print "Could not find `ci' command, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find `ci' command, skipping test(s).\n")
diff --git a/test/RCS/implicit.py b/test/RCS/implicit.py
index 2289258..362f15a 100644
--- a/test/RCS/implicit.py
+++ b/test/RCS/implicit.py
@@ -34,18 +34,15 @@ test = TestSCons.TestSCons()
rcs = test.where_is('rcs')
if not rcs:
- print "Could not find RCS, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'rcs'; skipping test(s).\n")
ci = test.where_is('ci')
if not ci:
- print "Could not find `ci' command, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'ci'; skipping test(s).\n")
co = test.where_is('co')
if not co:
- print "Could not find `co' command, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'co'; skipping test(s).\n")
diff --git a/test/RCS/transparent.py b/test/RCS/transparent.py
index 63475c8..28dc558 100644
--- a/test/RCS/transparent.py
+++ b/test/RCS/transparent.py
@@ -36,13 +36,11 @@ test = TestSCons.TestSCons()
rcs = test.where_is('rcs')
if not rcs:
- print "Could not find RCS, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'rcs'; skipping test(s).\n")
ci = test.where_is('ci')
if not ci:
- print "Could not find `ci' command, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'ci'; skipping test(s).\n")
diff --git a/test/SCCS/diskcheck.py b/test/SCCS/diskcheck.py
index 691f09c..532ad9c 100644
--- a/test/SCCS/diskcheck.py
+++ b/test/SCCS/diskcheck.py
@@ -36,8 +36,7 @@ test = TestSCons.TestSCons()
sccs = test.where_is('sccs')
if not sccs:
- print "Could not find SCCS, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'sccs'; skipping test(s).\n")
diff --git a/test/SCCS/explicit.py b/test/SCCS/explicit.py
index 23bb6eb..0a52ace 100644
--- a/test/SCCS/explicit.py
+++ b/test/SCCS/explicit.py
@@ -36,8 +36,7 @@ test = TestSCons.TestSCons()
sccs = test.where_is('sccs')
if not sccs:
- print "Could not find SCCS, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'sccs'; skipping test(s).\n")
diff --git a/test/SCCS/implicit.py b/test/SCCS/implicit.py
index 3c3676e..eca8e0c 100644
--- a/test/SCCS/implicit.py
+++ b/test/SCCS/implicit.py
@@ -36,8 +36,7 @@ test = TestSCons.TestSCons()
sccs = test.where_is('sccs')
if not sccs:
- print "Could not find SCCS, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'sccs'; skipping test(s).\n")
diff --git a/test/SCCS/transparent.py b/test/SCCS/transparent.py
index ba614cd..384e27c 100644
--- a/test/SCCS/transparent.py
+++ b/test/SCCS/transparent.py
@@ -36,8 +36,7 @@ test = TestSCons.TestSCons()
sccs = test.where_is('sccs')
if not sccs:
- print "Could not find SCCS, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'sccs'; skipping test(s).\n")
diff --git a/test/Subversion.py b/test/Subversion.py
index 54e9942..74ff86c 100644
--- a/test/Subversion.py
+++ b/test/Subversion.py
@@ -34,13 +34,11 @@ test = TestSCons.TestSCons()
svn = test.where_is('svn')
if not svn:
- print "Could not find Subversion, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'svn'; skipping test(s).\n")
svnadmin = test.where_is('svnadmin')
if not svn:
- print "Could not find Subversion, skipping test(s)."
- test.pass_test(1)
+ test.skip_test("Could not find 'svnadmin'; skipping test(s).\n")
print "Short-circuiting this test until we support Subversion"
test.pass_test()
diff --git a/test/option/debug-count.py b/test/option/debug-count.py
index 3cb924b..3a0fbb0 100644
--- a/test/option/debug-count.py
+++ b/test/option/debug-count.py
@@ -39,9 +39,8 @@ test = TestSCons.TestSCons()
try:
import weakref
except ImportError:
- print "Python version has no `weakref' module;"
- print "skipping tests of --debug=count."
- test.pass_test()
+ x = "Python version has no 'weakref' module; skipping tests.\n"
+ test.skip_test(x)
diff --git a/test/option/debug-memory.py b/test/option/debug-memory.py
index 2812f50..0a2875f 100644
--- a/test/option/debug-memory.py
+++ b/test/option/debug-memory.py
@@ -39,9 +39,8 @@ test = TestSCons.TestSCons()
try:
import resource
except ImportError:
- print "Python version has no `resource' module;"
- print "skipping test of --debug=memory."
- test.pass_test()
+ x = "Python version has no 'resource' module; skipping tests.\n"
+ test.skip_test(x)
diff --git a/test/option/debug-objects.py b/test/option/debug-objects.py
index 324585e..33ec59d 100644
--- a/test/option/debug-objects.py
+++ b/test/option/debug-objects.py
@@ -39,9 +39,8 @@ test = TestSCons.TestSCons()
try:
import weakref
except ImportError:
- print "Python version has no `weakref' module;"
- print "skipping tests of --debug=objects."
- test.pass_test()
+ x = "Python version has no 'weakref' module; skipping tests.\n"
+ test.skip_test(x)