Commits

Anonymous committed 9613e3c

Update more tests to use the new skip_test() method. Replace a CHANGES.txt comment inadvertently deleted.

  • Participants
  • Parent commits 1820229

Comments (0)

Files changed (19)

File src/CHANGES.txt

 
   - Allow access to both TARGET and SOURCE in $*PATH expansions.
 
+  - Allow SConscript files to modify BUILD_TARGETS.
+
   From Timothee Besset:
 
   - Add support for Objective C/C++ .m and .mm file suffixes (for

File test/BitKeeper/BitKeeper.py

 
 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()
 
 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')
 
 
 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

File test/Java/RMIC.py

 
 
 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")
 
 
 

File test/Perforce/Perforce.py

 
 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:

File test/QT/installed.py

 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()
 
 
 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']
 test.fail_test(string.find(test.stderr(), expect1) == -1 and
                string.find(test.stderr(), expect2) == -1)
 
+
 test.pass_test()

File test/RCS/diskcheck.py

 
 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")
 
 
 

File test/RCS/explicit.py

 
 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")
 
 
 

File test/RCS/implicit.py

 
 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")
 
 
 

File test/RCS/transparent.py

 
 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")
 
 
 

File test/SCCS/diskcheck.py

 
 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")
 
 
 

File test/SCCS/explicit.py

 
 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")
 
 
 

File test/SCCS/implicit.py

 
 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")
 
 
 

File test/SCCS/transparent.py

 
 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")
 
 
 

File test/Subversion.py

 
 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()

File test/option/debug-count.py

 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)
 
 
 

File test/option/debug-memory.py

 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)
 
 
 

File test/option/debug-objects.py

 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)