Hi Russel,
so far I always used the fixture methods from the testing framework with
a relative path, like this:
test.file_fixture('../../../__init__.py','site_scons/site_tools/qt4/__init__.py')
(example from the qt4 Tool tests). Doesn't this work for you?
There is also TestCmd::workpath(...), which returns an absolute path
with the working directory of the current test as prefix.
Best regards,
Dirk
On 26.07.2013 19:07, Russel Winder wrote:
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?
_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev
_______________________________________________
Scons-dev mailing list
[email protected]
http://two.pairlist.net/mailman/listinfo/scons-dev