summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-connectivity
diff options
context:
space:
mode:
authorAnkit Navik <ankit.tarot@gmail.com>2018-12-27 14:02:55 +0530
committerKhem Raj <raj.khem@gmail.com>2018-12-27 09:18:09 -0800
commitfd6b867701fd96c80ecb5a48509001b0695d59f9 (patch)
tree53beec4e450bd74912ce4a3c04ec7e6eeee75164 /meta-oe/recipes-connectivity
parent039f5243b1cacdf70d83483bf321f102cfc83fc6 (diff)
downloadmeta-openembedded-fd6b867701fd96c80ecb5a48509001b0695d59f9.tar.gz
wifi-test-suite: Initial recipe for wifi test suite.
Add generic recipe for wifi test suite from wifi alliance. Suite is to support certification program development and device certification. Signed-off-by: Ankit Navik <ankit.tarot@gmail.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe/recipes-connectivity')
-rw-r--r--meta-oe/recipes-connectivity/wifi-test-suite/files/0001-Use-toolchain-from-environment-variables.patch92
-rw-r--r--meta-oe/recipes-connectivity/wifi-test-suite/files/0002-Add-missing-include-removes-unnedded-stuff-and-add-n.patch45
-rw-r--r--meta-oe/recipes-connectivity/wifi-test-suite/files/0003-fix-path-to-usr-sbin-for-script-and-make-script-for-.patch58
-rw-r--r--meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb37
4 files changed, 232 insertions, 0 deletions
diff --git a/meta-oe/recipes-connectivity/wifi-test-suite/files/0001-Use-toolchain-from-environment-variables.patch b/meta-oe/recipes-connectivity/wifi-test-suite/files/0001-Use-toolchain-from-environment-variables.patch
new file mode 100644
index 000000000..9ee4a51f9
--- /dev/null
+++ b/meta-oe/recipes-connectivity/wifi-test-suite/files/0001-Use-toolchain-from-environment-variables.patch
@@ -0,0 +1,92 @@
1From 6b822b36739222d0c864249992b5d28e3ff4d948 Mon Sep 17 00:00:00 2001
2From: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
3Date: Mon, 3 Sep 2018 17:58:27 +0200
4Subject: [PATCH] Use toolchain from environment variables
5
6Upstream-Status: Submitted [https://github.com/Wi-FiTestSuite/Wi-FiTestSuite-Linux-DUT/pull/42]
7Signed-off-by: Adrian Friedli <adrian.friedli@husqvarnagroup.com>
8Signed-off-by: Ankit Navik <ankit.tarot@gmail.com>
9---
10 Makefile.inc | 7 ++++---
11 WTGService/Makefile | 2 +-
12 console_src/Makefile | 2 +-
13 lib/Makefile | 6 +++---
14 4 files changed, 9 insertions(+), 8 deletions(-)
15
16diff --git a/Makefile.inc b/Makefile.inc
17index b0edf5a..0094bdf 100644
18--- a/Makefile.inc
19+++ b/Makefile.inc
20@@ -13,14 +13,15 @@
21 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
22 # USE OR PERFORMANCE OF THIS SOFTWARE.
23 #
24-CC = gcc
25+CC ?= gcc
26+AR ?= ar
27 LIB=lib
28 DUT=dut
29 CA=ca
30 UCC=ucc
31 CON=console_src
32 WTG=WTGService
33-MAKE=make
34+MAKE?=make
35
36 # This is for WMM-PS
37 #for Ext TG
38@@ -46,7 +47,7 @@ CFLAGS = -g -O2 -D_REENTRANT -Wall -I../inc
39
40 DUTLIBS = ../lib/libwfa_dut.a -lpthread
41 CALIBS = ../lib/libwfa_ca.a -lpthread
42-RANLIB = ranlib
43+RANLIB ?= ranlib
44
45 LIBWFA_NAME_DUT = libwfa_dut.a
46 LIBWFA_NAME_CA = libwfa_ca.a
47diff --git a/WTGService/Makefile b/WTGService/Makefile
48index 5312eb6..4855771 100644
49--- a/WTGService/Makefile
50+++ b/WTGService/Makefile
51@@ -13,7 +13,7 @@
52 # NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
53 # USE OR PERFORMANCE OF THIS SOFTWARE.
54 #
55-CC=gcc
56+CC?=gcc
57 CFLAGS= -Wall
58 LIB=-lpthread
59
60diff --git a/console_src/Makefile b/console_src/Makefile
61index 8282283..d1098eb 100644
62--- a/console_src/Makefile
63+++ b/console_src/Makefile
64@@ -14,7 +14,7 @@
65 # USE OR PERFORMANCE OF THIS SOFTWARE.
66 #
67
68-CC = gcc
69+CC ?= gcc
70 CFLAGS = -g -DWFA_DEBUG -pthread
71
72 TARGETS = wfa_con
73diff --git a/lib/Makefile b/lib/Makefile
74index ffcef94..299b8d6 100644
75--- a/lib/Makefile
76+++ b/lib/Makefile
77@@ -17,9 +17,9 @@
78 include ../Makefile.inc
79
80 all: ${LIB_OBJS}
81- ar crv ${LIBWFA_NAME} $?
82- ar crv ${LIBWFA_NAME_DUT} ${LIB_OBJS_DUT}
83- ar crv ${LIBWFA_NAME_CA} ${LIB_OBJS_CA}
84+ $(AR) crv ${LIBWFA_NAME} $?
85+ $(AR) crv ${LIBWFA_NAME_DUT} ${LIB_OBJS_DUT}
86+ $(AR) crv ${LIBWFA_NAME_CA} ${LIB_OBJS_CA}
87 ${RANLIB} ${LIBWFA_NAME} ${LIBWFA_NAME_DUT} ${LIBWFA_NAME_CA}
88
89 wfa_tg.o: wfa_tg.c ../inc/wfa_agt.h ../inc/wfa_types.h ../inc/wfa_rsp.h ../inc/wfa_tlv.h ../inc/wfa_tg.h
90--
912.7.4
92
diff --git a/meta-oe/recipes-connectivity/wifi-test-suite/files/0002-Add-missing-include-removes-unnedded-stuff-and-add-n.patch b/meta-oe/recipes-connectivity/wifi-test-suite/files/0002-Add-missing-include-removes-unnedded-stuff-and-add-n.patch
new file mode 100644
index 000000000..20fb6473f
--- /dev/null
+++ b/meta-oe/recipes-connectivity/wifi-test-suite/files/0002-Add-missing-include-removes-unnedded-stuff-and-add-n.patch
@@ -0,0 +1,45 @@
1From 451b162c903a1ef070a75dc18171620f3beef7b3 Mon Sep 17 00:00:00 2001
2From: Ankit Navik <ankit.tarot@gmail.com>
3Date: Tue, 25 Dec 2018 00:36:59 +0530
4Subject: [PATCH 2/3] Add missing include, removes unnedded stuff and add non
5 glibc rpc
6
7Upstream-Status: Inappropriate [embedded specific]
8
9Signed-off-by: Reto Schneider <code@reto-schneider.ch>
10Signed-off-by: Ankit Navik <ankit.tarot@gmail.com>
11---
12 Makefile | 2 +-
13 inc/wfa_tg.h | 3 +++
14 2 files changed, 4 insertions(+), 1 deletion(-)
15
16diff --git a/Makefile b/Makefile
17index 2c41a17..5c4ad8c 100644
18--- a/Makefile
19+++ b/Makefile
20@@ -15,7 +15,7 @@
21 #
22 include Makefile.inc
23
24-DIRS= ${LIB} ${DUT} ${CA} ${TC} ${WTG} ${CON}
25+DIRS= ${LIB} ${DUT} ${CA} ${TC}
26
27 all:
28 for i in ${DIRS}; do \
29diff --git a/inc/wfa_tg.h b/inc/wfa_tg.h
30index 799bf9f..a1804dd 100644
31--- a/inc/wfa_tg.h
32+++ b/inc/wfa_tg.h
33@@ -24,6 +24,9 @@
34 #ifndef _WFA_TG_H
35 #define _WFA_TG_H
36
37+#ifndef _WINDOWS
38+#include <pthread.h>
39+#endif
40 #include <sys/time.h>
41
42 /* maximum number of streams to support */
43--
442.7.4
45
diff --git a/meta-oe/recipes-connectivity/wifi-test-suite/files/0003-fix-path-to-usr-sbin-for-script-and-make-script-for-.patch b/meta-oe/recipes-connectivity/wifi-test-suite/files/0003-fix-path-to-usr-sbin-for-script-and-make-script-for-.patch
new file mode 100644
index 000000000..a51302a0c
--- /dev/null
+++ b/meta-oe/recipes-connectivity/wifi-test-suite/files/0003-fix-path-to-usr-sbin-for-script-and-make-script-for-.patch
@@ -0,0 +1,58 @@
1From fc7b7106dd0d8d123f20cbd8d408637fbc315e17 Mon Sep 17 00:00:00 2001
2From: Ankit Navik <ankit.tarot@gmail.com>
3Date: Tue, 25 Dec 2018 01:12:32 +0530
4Subject: [PATCH 3/3] fix path to /usr/sbin for script and make script for
5 generic shell
6
7Signed-off-by: Ankit Navik <ankit.tarot@gmail.com>
8---
9 lib/wfa_cs.c | 4 ++--
10 scripts/dev_send_frame | 2 +-
11 scripts/sta_reset_parm | 2 +-
12 3 files changed, 4 insertions(+), 4 deletions(-)
13
14diff --git a/lib/wfa_cs.c b/lib/wfa_cs.c
15index 6b1f5a2..2a18533 100644
16--- a/lib/wfa_cs.c
17+++ b/lib/wfa_cs.c
18@@ -319,7 +319,7 @@ int wfaStaGetIpConfig(int len, BYTE *caCmdBuf, int *respLen, BYTE *respBuf)
19 /*
20 * check a script file (the current implementation specific)
21 */
22- ret = access("/usr/local/sbin/getipconfig.sh", F_OK);
23+ ret = access("/usr/sbin/getipconfig.sh", F_OK);
24 if(ret == -1)
25 {
26 ipconfigResp->status = STATUS_ERROR;
27@@ -2115,7 +2115,7 @@ int wfaStaPresetParams(int len, BYTE *caCmdBuf, int *respLen, BYTE *respBuf)
28 st = remove("/tmp/processid.txt");
29 }
30
31- sprintf(cmdStr, "/usr/local/sbin/findprocess.sh %s /tmp/processid.txt\n", "wpa_supplicant");
32+ sprintf(cmdStr, "/usr/sbin/findprocess.sh %s /tmp/processid.txt\n", "wpa_supplicant");
33 st = system(cmdStr);
34
35 tmpfd = fopen("/tmp/processid.txt", "r+");
36diff --git a/scripts/dev_send_frame b/scripts/dev_send_frame
37index 9e6afd3..3c37d61 100644
38--- a/scripts/dev_send_frame
39+++ b/scripts/dev_send_frame
40@@ -1,4 +1,4 @@
41-#!/bin/bash
42+#!/usr/bin/env sh
43
44 #
45 # Copyright (c) 2016 Wi-Fi Alliance
46diff --git a/scripts/sta_reset_parm b/scripts/sta_reset_parm
47index 2aff1f1..2c1c31e 100644
48--- a/scripts/sta_reset_parm
49+++ b/scripts/sta_reset_parm
50@@ -1,4 +1,4 @@
51-#!/bin/bash
52+#!/usr/bin/env sh
53
54 #
55 # Copyright (c) 2016 Wi-Fi Alliance
56--
572.7.4
58
diff --git a/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb b/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb
new file mode 100644
index 000000000..b866c55b3
--- /dev/null
+++ b/meta-oe/recipes-connectivity/wifi-test-suite/wifi-test-suite_git.bb
@@ -0,0 +1,37 @@
1SUMMARY = "Wi-Fi Test Suite Linux Control Agent"
2DESCRIPTION = "Wi-Fi Test Suite is a software platform originally developed \
3by Wi-Fi Alliance, the global non-profit industry association that brings you \
4Wi-Fi, to support certification program development and device certification."
5HOMEPAGE = "https://www.wi-fi.org/certification/wi-fi-test-suite"
6LICENSE = "ISC"
7LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=0542427ed5c315ca34aa09ae7a85ed32"
8SECTION = "test"
9
10S = "${WORKDIR}/git"
11SRCREV = "f7a8d7ef7d1a831c1bb47de21fa083536ea2f3a9"
12SRC_URI = "git://github.com/Wi-FiTestSuite/Wi-FiTestSuite-Linux-DUT.git \
13 file://0001-Use-toolchain-from-environment-variables.patch \
14 file://0002-Add-missing-include-removes-unnedded-stuff-and-add-n.patch \
15 file://0003-fix-path-to-usr-sbin-for-script-and-make-script-for-.patch \
16"
17
18# to avoid host path QA error
19CFLAGS += "-I${STAGING_INCDIR}/tirpc"
20# Fix GNU HASH error
21TARGET_CC_ARCH += "${LDFLAGS}"
22
23do_install () {
24 install -d ${D}${libdir}
25 install -m 0644 ${S}/lib/libwfa.a ${D}${libdir}
26 install -m 0644 ${S}/lib/libwfa_ca.a ${D}${libdir}
27 install -m 0644 ${S}/lib/libwfa_dut.a ${D}${libdir}
28 install -d ${D}${sbindir}
29 install -m 0755 ${S}/dut/wfa_dut ${D}${sbindir}
30 install -m 0755 ${S}/ca/wfa_ca ${D}${sbindir}
31 install -m 0755 ${S}/scripts/*.sh ${D}${sbindir}
32 install -m 0755 ${S}/scripts/arp_neigh_loop ${D}${sbindir}
33 install -m 0755 ${S}/scripts/dev_send_frame ${D}${sbindir}
34 install -m 0755 ${S}/scripts/sta_reset_parm ${D}${sbindir}
35}
36
37RDEPENDS_${PN} = "wpa-supplicant"