On Fri, 2013-07-26 at 21:36 +0200, Dirk Bächle wrote:
[…]
> If you call the runtest.py for external tests, you have to specify the 
> "-e" option as well.

OK the -e has helped. Now I am back with:

1/1 (100.00%) /usr/bin/python -tt test/sconstest-issue_1.py
scons returned 2
STDOUT =========================================================================
scons: Reading SConscript files ...

STDERR =========================================================================
EnvironmentError: No tool named 'protoc': not a Zip file:
  File "/tmp/testcmd.11722.rpNatN/SConstruct", line 2:
    tools=['protoc'],
  File "/usr/lib/scons/SCons/Environment.py", line 1002:
    apply_tools(self, tools, toolpath)
  File "/usr/lib/scons/SCons/Environment.py", line 106:
    env.Tool(tool)
  File "/usr/lib/scons/SCons/Environment.py", line 1785:
    tool = SCons.Tool.Tool(tool, toolpath, **kw)
  File "/usr/lib/scons/SCons/Tool/__init__.py", line 97:
    module = self._tool_module()
  File "/usr/lib/scons/SCons/Tool/__init__.py", line 157:
    raise SCons.Errors.EnvironmentError(m)

FAILED test of scons
        at line 598 of 
/home/users/russel/Repositories/Mercurial/Masters/SCons_D_Tooling/QMTest/TestCommon.py
 (_complete)
        from line 701 of 
/home/users/russel/Repositories/Mercurial/Masters/SCons_D_Tooling/QMTest/TestCommon.py
 (run)
        from line 392 of 
/home/users/russel/Repositories/Mercurial/Masters/SCons_D_Tooling/QMTest/TestSCons.py
 (run)
        from line 43 of test/sconstest-issue_1.py


So back where I was with the SCons_Testing_Framework. I'll now delete my
fork of that.

So the question is how to get the test to have the tool available.  The
SCons_Protobuf project looks like:

.
├── __init__.py
├── protoc.py
├── README.rst
└── test
    ├── Image
    │   └── SConstruct
    └── sconstest-issue_1.py

and sconstest-issue_1.py is:

        import TestSCons
        from os.path import abspath, dirname, isfile
        test = TestSCons.TestSCons()
        test.file_fixture('../protoc.py')
        if not test.where_is('protoc'):
            test.skip_test('Required executable, protoc, not found,
        skipping test.')
        test.dir_fixture('Image')
        test.run()
        test.pass_test()

The '../protoc.py' is being found by the test framework, but is not
being made available to the SConstruct:

        environment = Environment(
            tools=['protoc'],
        )
        
        proto_files = environment.Protoc(
            [],
            Glob('build/protobuf/*.proto'),
            PROTOCPROTOPATH=['build/protobuf',],
            PROTOCPYTHONOUTDIR='build/protobuf', # set to None to not generate 
python
            PROTOCOUTDIR = 'build/protobuf', # defaults to same directory as 
.proto
            # PROTOCCPPOUTFLAGS = "dllexport_decl=PROTOCONFIG_EXPORT:", too
        )


Sorry to be a pain getting this working. All help gratefully accepted.
-- 
Russel.
=============================================================================
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:[email protected]
41 Buckmaster Road    m: +44 7770 465 077   xmpp: [email protected]
London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev

Reply via email to