[Scons-dev] Testing non-core tools

Russel Winder russel at winder.org.uk
Fri Jul 26 13:07:45 EDT 2013


I think I am missing something, or something has changed and I failed to
notice.

I am trying to test a tool that is not in the SCons tree. The test needs
to put the tool into the fixture list so that the SConstruct of the
project under test can find it. First guess seems to be something like:

toolPath = abspath(dirname(__file__) + '/../tool.py')

I am fairly sure something like this used to work, but I have no
admissible evidence. The problem I am seeing is that __file__ is
relative to os.getcwd() and the test framework has already switched
to /tmp/somegobbledegooklocation and the source of the tool being tested
is not copied across and so nothing of the test source is findable.

As far as I know there is no way of getting a truly absolute path in
Python since everything is always assumed to be relative to os.getcwd().
Does the test framework provide a special symbol which is the absolute
path of the source under test?

Or am I just being stupid this afternoon?

--
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/0d751095/attachment.pgp>


More information about the Scons-dev mailing list