From c18b3db8a7251c0f5e532332ba5eaebf6d8b9644 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 1 Jan 2013 02:24:21 -0800 Subject: [PATCH] tools: Add skeleton for management interface tester --- .gitignore | 1 + Makefile.tools | 13 ++++++++++++- tools/mgmt-tester.c | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 tools/mgmt-tester.c diff --git a/.gitignore b/.gitignore index bd88d3e90..ff2d6d45f 100644 --- a/.gitignore +++ b/.gitignore @@ -64,6 +64,7 @@ unit/test-eir unit/test-uuid unit/test-textfile unit/test-gdbus-client +tools/mgmt-tester tools/gap-tester tools/btattach tools/btmgmt diff --git a/Makefile.tools b/Makefile.tools index a19cabccb..1375b9595 100644 --- a/Makefile.tools +++ b/Makefile.tools @@ -26,7 +26,8 @@ monitor_btmon_LDADD = lib/libbluetooth-private.la endif if EXPERIMENTAL -noinst_PROGRAMS += emulator/btvirt emulator/b1ee tools/gap-tester +noinst_PROGRAMS += emulator/btvirt emulator/b1ee \ + tools/mgmt-tester tools/gap-tester emulator_btvirt_SOURCES = emulator/main.c monitor/bt.h \ monitor/mainloop.h monitor/mainloop.c \ @@ -37,6 +38,16 @@ emulator_btvirt_SOURCES = emulator/main.c monitor/bt.h \ emulator_b1ee_SOURCES = emulator/b1ee.c monitor/mainloop.h monitor/mainloop.c +tools_mgmt_tester_SOURCES = tools/mgmt-tester.c \ + monitor/bt.h \ + emulator/btdev.h emulator/btdev.c \ + emulator/bthost.h emulator/bthost.c \ + tools/hciemu.h tools/hciemu.c \ + src/shared/util.h src/shared/util.c \ + src/shared/mgmt.h src/shared/mgmt.c \ + src/shared/tester.h src/shared/tester.c +tools_mgmt_tester_LDADD = @GLIB_LIBS@ + tools_gap_tester_SOURCES = $(gdbus_sources) \ tools/gap-tester.c \ tools/hciemu.h tools/hciemu.c \ diff --git a/tools/mgmt-tester.c b/tools/mgmt-tester.c new file mode 100644 index 000000000..b792f29d5 --- /dev/null +++ b/tools/mgmt-tester.c @@ -0,0 +1,37 @@ +/* + * + * BlueZ - Bluetooth protocol stack for Linux + * + * Copyright (C) 2012 Intel Corporation. All rights reserved. + * + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "src/shared/tester.h" +#include "src/shared/mgmt.h" +#include "tools/hciemu.h" + +int main(int argc, char *argv[]) +{ + tester_init(&argc, &argv); + + return tester_run(); +} -- 2.47.3