From patchwork Sat Oct 26 15:18:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Johannes Berg X-Patchwork-Id: 286290 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from maxx.maxx.shmoo.com (maxx.shmoo.com [205.134.188.171]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "maxx.shmoo.com", Issuer "CA Cert Signing Authority" (not verified)) by ozlabs.org (Postfix) with ESMTPS id 2A8892C0332 for ; Sun, 27 Oct 2013 02:18:40 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 6E6A09C2E4; Sat, 26 Oct 2013 11:18:38 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iNrKvn9RCNXx; Sat, 26 Oct 2013 11:18:38 -0400 (EDT) Received: from maxx.shmoo.com (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 1D6A09C2E5; Sat, 26 Oct 2013 11:18:34 -0400 (EDT) X-Original-To: mailman-post+hostap@maxx.shmoo.com Delivered-To: mailman-post+hostap@maxx.shmoo.com Received: from localhost (localhost [127.0.0.1]) by maxx.maxx.shmoo.com (Postfix) with ESMTP id 8E23C9C2E5 for ; Sat, 26 Oct 2013 11:18:32 -0400 (EDT) X-Virus-Scanned: amavisd-new at maxx.shmoo.com Received: from maxx.maxx.shmoo.com ([127.0.0.1]) by localhost (maxx.shmoo.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X4HgVzmXQ+fu for ; Sat, 26 Oct 2013 11:18:28 -0400 (EDT) Received: from sipsolutions.net (s3.sipsolutions.net [144.76.43.152]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by maxx.maxx.shmoo.com (Postfix) with ESMTPS id 20A029C2E4 for ; Sat, 26 Oct 2013 11:18:28 -0400 (EDT) Received: by sipsolutions.net with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Va5dB-0003oP-PO; Sat, 26 Oct 2013 17:18:26 +0200 From: Johannes Berg To: hostap@lists.shmoo.com Subject: [PATCH] tests: don't require wpaspy installation Date: Sat, 26 Oct 2013 17:18:20 +0200 Message-Id: <1382800700-5522-1-git-send-email-johannes@sipsolutions.net> X-Mailer: git-send-email 1.8.4.rc3 Cc: Johannes Berg X-BeenThere: hostap@lists.shmoo.com X-Mailman-Version: 2.1.11 Precedence: list List-Id: HostAP Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: hostap-bounces@lists.shmoo.com Errors-To: hostap-bounces@lists.shmoo.com From: Johannes Berg 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 --- tests/hwsim/README | 7 ++----- tests/hwsim/run-tests.py | 2 ++ 2 files changed, 4 insertions(+), 5 deletions(-) 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