CarletonWirelessLab / ANTS

The Automated Networking Test Suite
Other
3 stars 1 forks source link

Path variables in control.py and advanced_gui.py are relative rather than absolute #3

Closed threexc closed 6 years ago

threexc commented 6 years ago

Python 3 code relies on running "python3 ants/ants.py" from the ANTS directory, rather than anywhere on the system. See also #2

threexc commented 6 years ago

Fixed by using os.path commands to replace the self.working_dir usage self.working_dir = os.path.dirname(os.path.abspath(__file__)) in calls to scripts in utils/ and tests/. These new paths are generated by

self.utils_dir = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', 'utils'))
self.utils_dir = self.utils_dir + '/' 

and


self.sim_dir = os.path.abspath(os.path.join(os.path.dirname( __file__ ), '..', 'tests'))
self.sim_dir = self.sim_dir + '/'

respectively. Also added a missing subprocess call for the USRP in start_usrp_iperf_server, which was throwing an error in calling self.usrp_proc.poll() in the monitoring loop.

Tested and appears to be working.

threexc commented 6 years ago

Closing issue.