diff mbox

tests: don't require wpaspy installation

Message ID 1382800700-5522-1-git-send-email-johannes@sipsolutions.net
State Accepted
Commit b3e2ce3baeea742338003daf83657fa8a0c17e87
Headers show

Commit Message

Johannes Berg Oct. 26, 2013, 3:18 p.m. UTC
From: Johannes Berg <johannes.berg@intel.com>

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       | 7 ++-----
 tests/hwsim/run-tests.py | 2 ++
 2 files changed, 4 insertions(+), 5 deletions(-)

Comments

Jouni Malinen Oct. 27, 2013, 4:56 p.m. UTC | #1
On Sat, Oct 26, 2013 at 05:18:20PM +0200, Johannes Berg wrote:
> 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.

Thanks, applied.
diff mbox

Patch

diff --git a/tests/hwsim/README b/tests/hwsim/README
index 90782d9..7d6d1d5 100644
--- a/tests/hwsim/README
+++ b/tests/hwsim/README
@@ -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
diff --git a/tests/hwsim/run-tests.py b/tests/hwsim/run-tests.py
index 8a4c9f0..c98c607 100755
--- a/tests/hwsim/run-tests.py
+++ b/tests/hwsim/run-tests.py
@@ -15,6 +15,8 @@  from datetime import datetime
 import logging
 logger = logging.getLogger(__name__)
 
+sys.path.append('../../wpaspy')
+
 from wpasupplicant import WpaSupplicant
 from hostapd import HostapdGlobal