]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Do not require wpaspy installation
authorJohannes Berg <johannes.berg@intel.com>
Sun, 27 Oct 2013 16:28:28 +0000 (18:28 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 27 Oct 2013 16:28:28 +0000 (18:28 +0200)
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>

tests/hwsim/README
tests/hwsim/run-tests.py

index 91aa6f90edb0ab41cdb5d789e7c55f139a0b46b6..8195aa40ad5a8ca870976e8447e182cdede2f668 100644 (file)
@@ -60,11 +60,8 @@ wpaspy
 ------
 
 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
-find it. For example, with this command:
-
-sudo cp ../wpaspy/wpaspy.py /usr/local/lib/python2.7/dist-packages
-
+control interface, but the run-tests.py script adds the (relative)
+path into the environment so it doesn't need to be installed.
 
 
 mac80211_hwsim
index 4b1750bb63a183ad1c4cb66ee2907d5e4914dd97..abe26f3593417d4abbab9628c44b78557d1cae0d 100755 (executable)
@@ -16,6 +16,8 @@ from datetime import datetime
 import logging
 logger = logging.getLogger(__name__)
 
+sys.path.append('../../wpaspy')
+
 from wpasupplicant import WpaSupplicant
 from hostapd import HostapdGlobal