tests: Do not require wpaspy installation

Since the scripts must be run from the source directory to
find the tests to run, they can use a relative path to the
wpaspy module instead of requiring it to be installed.

Signed-hostap: Johannes Berg <johannes.berg@intel.com>
This commit is contained in:
Johannes Berg 2013-10-27 18:28:28 +02:00 committed by Jouni Malinen
parent 7ac3616d0f
commit b3e2ce3bae
2 changed files with 4 additions and 5 deletions

View file

@ -60,11 +60,8 @@ wpaspy
------ ------
The python scripts use wpaspy.py to interact with the wpa_supplicant The python scripts use wpaspy.py to interact with the wpa_supplicant
control interface. This needs to be installed in a way that python can control interface, but the run-tests.py script adds the (relative)
find it. For example, with this command: path into the environment so it doesn't need to be installed.
sudo cp ../wpaspy/wpaspy.py /usr/local/lib/python2.7/dist-packages
mac80211_hwsim mac80211_hwsim

View file

@ -16,6 +16,8 @@ from datetime import datetime
import logging import logging
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
sys.path.append('../../wpaspy')
from wpasupplicant import WpaSupplicant from wpasupplicant import WpaSupplicant
from hostapd import HostapdGlobal from hostapd import HostapdGlobal