[Scons-dev] Testing non-core tools

Russel Winder russel at winder.org.uk
Fri Jul 26 14:27:27 EDT 2013


On Fri, 2013-07-26 at 20:11 +0200, Dirk Bächle wrote:
[…]

> The runtest.py now detects any *.py file as test script, that's why the

> "sconstest.skip" (or even ".exclude_tests") exists and escapes this

> behaviour where needed.

> You can read a bit about this in the "Finding tests" section of

> "QMTest/test-framework.rst".


I have a test directory in the non-core tool package. If I run

"<path.to.scons.installtion>/runtest.py -a"

I get:

1/1 (100.00%) /usr/bin/python -tt test/sconstest-issue_1.py
Traceback (most recent call last):
File "test/sconstest-issue_1.py", line 34, in <module>
test = TestSCons.TestSCons()
File "/home/users/russel/Repositories/Mercurial/Masters/SCons_D_Tooling/QMTest/TestSCons.py", line 234, in __init__
os.chdir(script_dir)
OSError: [Errno 2] No such file or directory: '/home/users/russel/Repositories/Mercurial/Masters/SCons_Protobuf/src/script'
Exception AttributeError: "'TestSCons' object has no attribute '_dirlist'" in <bound method TestSCons.__del__ of 7f7490833810> ignored

which means it is assuming the SCons installation structure in the
non-core tool package. If I try:


"<path.to.scons.installtion>/runtest.py ./test"

I get:

runtest.py: No tests were found.

which is not the case:


|> tree test

test
├── Image
│ ├── SConstruct
│ └── SConstruct~
├── sconstest-issue_1.py
└── sconstest-issue_1.py~

If I try:

"<path.to.scons.installtion>/runtest.py test"

then I get:

1/1 (100.00%) /usr/bin/python -tt test/sconstest-issue_1.py
Traceback (most recent call last):
File "test/sconstest-issue_1.py", line 34, in <module>
test = TestSCons.TestSCons()
File "/home/users/russel/Repositories/Mercurial/Masters/SCons_D_Tooling/QMTest/TestSCons.py", line 234, in __init__
os.chdir(script_dir)
OSError: [Errno 2] No such file or directory: '/home/users/russel/Repositories/Mercurial/Masters/SCons_Protobuf/src/script'
Exception AttributeError: "'TestSCons' object has no attribute '_dirlist'" in <bound method TestSCons.__del__ of 7f64b291f810> ignored

which is sort of annoying.


--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
Url : <http://two.pairlist.net/pipermail/scons-dev/attachments/20130726/5e3986ec/attachment.pgp>


More information about the Scons-dev mailing list