[Ns-bugs] [Bug 1325] Python examples get valgrind errors when build subdirectories are specified in waf
code@nsnam.ece.gatech.edu
code at nsnam.ece.gatech.edu
Fri Feb 17 03:10:12 PST 2012
https://www.nsnam.org/bugzilla/show_bug.cgi?id=1325
--- Comment #6 from Gustavo J. A. M. Carneiro <gjcarneiro at gmail.com> 2012-02-17 06:10:11 EST ---
(In reply to comment #5)
> (In reply to comment #4)
> > The problem is here:
> >
> > def run_job_synchronously(shell_command, directory, basedir, valgrind,
> > is_python, build_path=""):
> > (base, build) = os.path.split (NS3_BUILDDIR)
> >
> > This test.py program could really use some refactoring: all the needed paths
> > are in the Job object, this run_job_synchronously should be a method of Job,
> > not a function, to get access to all the attributes.
>
> What exactly is the problem in that function?
With NS3_BUILDDIR=/foo/bar/ns-3-dev/build/debug, the statement:
(base, build) = os.path.split (NS3_BUILDDIR)
gets:
base=/foo/bar/ns-3-dev/build
build=debug
This is why the python script is not found, it is constructed as
<base>/python-script.py.
It is funny because the Job objects defined in test.py already have a base
attribute which is correctly defined as /foo/bar/ns-3-dev. It's just that the
run_job_synchronously is not using the Job attributes, it is reinventing the
wheel.
--
Configure bugmail: https://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the Ns-bugs
mailing list