From patchwork Mon Jul 14 17:45:16 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Holmes X-Patchwork-Id: 33624 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f197.google.com (mail-ob0-f197.google.com [209.85.214.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 41B6020CAD for ; Mon, 14 Jul 2014 17:46:07 +0000 (UTC) Received: by mail-ob0-f197.google.com with SMTP id vb8sf16343918obc.0 for ; Mon, 14 Jul 2014 10:46:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:errors-to:sender :x-original-sender:x-original-authentication-results:mailing-list :content-type:content-transfer-encoding; bh=lAMideTBI4PmQay1OS016A0u1qnYgviuU04WH70U9JE=; b=SzdCHMrAHcNtq/J2AmFnrLDWzOZsLXhvp1Org2eFU7i+wdD9QA+bbjDlEMDGjbGISL xIqQ3D0rbbgyliN2C69kP4R98zWBDiK7AXLjcw1NaVQr5Dozz/UotgUx2p7CEmv63tl0 QBlCxZkc0Y3qa0GVyUCLaWTzwxb85/7d/+m0XLEVEmj3RIqHh1/B4FVy2Hmv/T7POD10 XhYXBQnKr75MS83dRYBh6OvjZnZfqfk4BnBMhI61pn4BGLn2tM9WrJx2P3Wyeqolwq4M 99mrRpR8W4kU+Qcr45Bl0nDT/3M/IhSrEYISb1dWAB1KozRV7bYtLKkjsZviNHnecNNQ tBGw== X-Gm-Message-State: ALoCoQlNCn83ejXr/wc6kV3z7OO4xtqEpNLc5opL8tRysU72dbJXtOxbnPuJ0ECR5pOMlmDmrTsB X-Received: by 10.182.105.230 with SMTP id gp6mr8994634obb.18.1405359966324; Mon, 14 Jul 2014 10:46:06 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.87.207 with SMTP id r73ls1114075qgd.44.gmail; Mon, 14 Jul 2014 10:46:06 -0700 (PDT) X-Received: by 10.52.13.98 with SMTP id g2mr1167492vdc.46.1405359966228; Mon, 14 Jul 2014 10:46:06 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id te2si5598591vcb.101.2014.07.14.10.46.06 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 14 Jul 2014 10:46:06 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) client-ip=209.85.220.178; Received: by mail-vc0-f178.google.com with SMTP id la4so1205656vcb.23 for ; Mon, 14 Jul 2014 10:46:06 -0700 (PDT) X-Received: by 10.52.244.81 with SMTP id xe17mr14511882vdc.24.1405359966057; Mon, 14 Jul 2014 10:46:06 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp153188vcb; Mon, 14 Jul 2014 10:46:05 -0700 (PDT) X-Received: by 10.140.107.73 with SMTP id g67mr25988500qgf.100.1405359965579; Mon, 14 Jul 2014 10:46:05 -0700 (PDT) Received: from ip-10-141-164-156.ec2.internal (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTPS id d7si16264319qag.107.2014.07.14.10.45.35 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 14 Jul 2014 10:46:05 -0700 (PDT) Received-SPF: none (google.com: lng-odp-bounces@lists.linaro.org does not designate permitted sender hosts) client-ip=54.225.227.206; Received: from localhost ([127.0.0.1] helo=ip-10-141-164-156.ec2.internal) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X6kHP-0006G0-O1; Mon, 14 Jul 2014 17:43:11 +0000 Received: from mail-qc0-f170.google.com ([209.85.216.170]) by ip-10-141-164-156.ec2.internal with esmtp (Exim 4.76) (envelope-from ) id 1X6kHK-0006Fv-2I for lng-odp@lists.linaro.org; Mon, 14 Jul 2014 17:43:06 +0000 Received: by mail-qc0-f170.google.com with SMTP id c9so3994838qcz.1 for ; Mon, 14 Jul 2014 10:45:24 -0700 (PDT) X-Received: by 10.140.39.164 with SMTP id v33mr25304761qgv.99.1405359924400; Mon, 14 Jul 2014 10:45:24 -0700 (PDT) Received: from fedora1.holmesfamily.ws (c-98-221-136-245.hsd1.nj.comcast.net. [98.221.136.245]) by mx.google.com with ESMTPSA id d5sm21433427qar.38.2014.07.14.10.45.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 14 Jul 2014 10:45:23 -0700 (PDT) From: Mike Holmes To: lng-odp@lists.linaro.org Date: Mon, 14 Jul 2014 13:45:16 -0400 Message-Id: <1405359916-42352-1-git-send-email-mike.holmes@linaro.org> X-Mailer: git-send-email 1.9.1 X-Topics: patch Subject: [lng-odp] [PATCH] Move ODP examples from under tests X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: lng-odp-bounces@lists.linaro.org Sender: lng-odp-bounces@lists.linaro.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: mike.holmes@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.178 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 The expectations of example code vs testing code is significantly different. This difference is more easily managed if tests and examples have their own root directory especially as the number of validation tests is increased for the ODP 1.0 release. For example test cases may be significantly more complex than a good example might be expected to be. In addition tests are not expected to have Doxygen documentation and tests will not be expected to be coherent, they will test isolated APIs and to do so may perform illegal combinations of calls making them poor examples. Signed-off-by: Mike Holmes --- .gitignore | 15 ++++++++------- Makefile.am | 2 +- configure.ac | 13 +++++++------ doxygen.cfg | 4 ++-- example/Makefile.am | 1 + example/Makefile.inc | 10 ++++++++++ example/README | 3 +++ {test => example}/generator/Makefile.am | 0 {test => example}/generator/odp_generator.c | 0 {test => example}/l2fwd/Makefile.am | 0 {test => example}/l2fwd/odp_l2fwd.c | 2 +- {test/example => example/odp_example}/Makefile.am | 0 {test/example => example/odp_example}/odp_example.c | 0 {test => example}/packet/Makefile.am | 0 {test => example}/packet/odp_pktio.c | 2 +- {test => example}/packet_netmap/Makefile.am | 0 {test => example}/packet_netmap/odp_pktio_netmap.c | 0 {test => example}/timer/Makefile.am | 0 {test => example}/timer/odp_timer_test.c | 0 test/Makefile.am | 2 +- test/README | 2 ++ 21 files changed, 37 insertions(+), 19 deletions(-) create mode 100644 example/Makefile.am create mode 100644 example/Makefile.inc create mode 100644 example/README rename {test => example}/generator/Makefile.am (100%) rename {test => example}/generator/odp_generator.c (100%) rename {test => example}/l2fwd/Makefile.am (100%) rename {test => example}/l2fwd/odp_l2fwd.c (99%) rename {test/example => example/odp_example}/Makefile.am (100%) rename {test/example => example/odp_example}/odp_example.c (100%) rename {test => example}/packet/Makefile.am (100%) rename {test => example}/packet/odp_pktio.c (99%) rename {test => example}/packet_netmap/Makefile.am (100%) rename {test => example}/packet_netmap/odp_pktio_netmap.c (100%) rename {test => example}/timer/Makefile.am (100%) rename {test => example}/timer/odp_timer_test.c (100%) create mode 100644 test/README diff --git a/.gitignore b/.gitignore index 5742907..1de7c5c 100644 --- a/.gitignore +++ b/.gitignore @@ -32,14 +32,15 @@ tags lib/ obj/ build/ -test/example/odp_example -test/packet/odp_packet -test/packet_netmap/odp_packet_netmap +example/odp_example/odp_example +example/packet/odp_packet +example/packet_netmap/odp_packet_netmap test/api_test/odp_atomic test/api_test/odp_shm test/api_test/odp_ring test/api_test/odp_timer -test/packet/odp_pktio -test/timer/odp_timer_test -test/generator/odp_generator -test/l2fwd/odp_l2fwd +example/packet/odp_pktio +example/timer/odp_timer_test +example/generator/odp_generator +example/l2fwd/odp_l2fwd +doxygen-doc diff --git a/Makefile.am b/Makefile.am index 36d5c23..4bb3758 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,7 +1,7 @@ ACLOCAL_AMFLAGS=-I m4 AUTOMAKE_OPTIONS = foreign -SUBDIRS = platform test +SUBDIRS = platform test example include $(top_srcdir)/aminclude.am diff --git a/configure.ac b/configure.ac index 873ea9e..1c20feb 100644 --- a/configure.ac +++ b/configure.ac @@ -113,12 +113,13 @@ AC_CONFIG_FILES([Makefile platform/linux-keystone2/Makefile test/Makefile test/api_test/Makefile - test/example/Makefile - test/generator/Makefile - test/l2fwd/Makefile - test/packet/Makefile - test/packet_netmap/Makefile - test/timer/Makefile + example/Makefile + example/odp_example/Makefile + example/generator/Makefile + example/l2fwd/Makefile + example/packet/Makefile + example/packet_netmap/Makefile + example/timer/Makefile pkgconfig/libodp.pc]) AC_SEARCH_LIBS([timer_create],[rt posix4]) diff --git a/doxygen.cfg b/doxygen.cfg index 6c78712..86fe92a 100644 --- a/doxygen.cfg +++ b/doxygen.cfg @@ -9,7 +9,7 @@ TYPEDEF_HIDES_STRUCT = YES EXTRACT_STATIC = YES SORT_MEMBER_DOCS = NO WARN_NO_PARAMDOC = YES -INPUT = $(SRCDIR)/doc $(SRCDIR)/include $(SRCDIR)/test +INPUT = $(SRCDIR)/doc $(SRCDIR)/include $(SRCDIR)/example FILE_PATTERNS = odp*.h odp*.c *.dox RECURSIVE = YES SOURCE_BROWSER = YES @@ -23,7 +23,7 @@ CLASS_DIAGRAMS = NO HAVE_DOT = YES CALL_GRAPH = YES DOT_MULTI_TARGETS = NO -EXAMPLE_PATH = $(SRCDIR)/test +EXAMPLE_PATH = $(SRCDIR)/example EXAMPLE_PATTERNS = *.c EXAMPLE_RECURSIVE = YES IMAGE_PATH = $(SRCDIR)/doc/images diff --git a/example/Makefile.am b/example/Makefile.am new file mode 100644 index 0000000..1bd515e --- /dev/null +++ b/example/Makefile.am @@ -0,0 +1 @@ +SUBDIRS = odp_example generator l2fwd packet packet_netmap timer diff --git a/example/Makefile.inc b/example/Makefile.inc new file mode 100644 index 0000000..b549001 --- /dev/null +++ b/example/Makefile.inc @@ -0,0 +1,10 @@ +include $(top_srcdir)/Makefile.inc +LIB = $(top_builddir)/lib +LDADD = $(LIB)/libodp.la +AM_CFLAGS += \ + -I$(srcdir) \ + -I$(top_srcdir)/platform/@with_platform@/include/api \ + -I$(top_srcdir)/platform/linux-generic/include/api \ + -I$(top_srcdir)/include + +AM_LDFLAGS += -L$(LIB) diff --git a/example/README b/example/README new file mode 100644 index 0000000..3f85969 --- /dev/null +++ b/example/README @@ -0,0 +1,3 @@ +Files in this directory are intended to be part of the ODP documentation. +They should not introduce any Doxygen warnings or errors and will be +part of the generated documentation. diff --git a/test/generator/Makefile.am b/example/generator/Makefile.am similarity index 100% rename from test/generator/Makefile.am rename to example/generator/Makefile.am diff --git a/test/generator/odp_generator.c b/example/generator/odp_generator.c similarity index 100% rename from test/generator/odp_generator.c rename to example/generator/odp_generator.c diff --git a/test/l2fwd/Makefile.am b/example/l2fwd/Makefile.am similarity index 100% rename from test/l2fwd/Makefile.am rename to example/l2fwd/Makefile.am diff --git a/test/l2fwd/odp_l2fwd.c b/example/l2fwd/odp_l2fwd.c similarity index 99% rename from test/l2fwd/odp_l2fwd.c rename to example/l2fwd/odp_l2fwd.c index 035f710..e331ff2 100644 --- a/test/l2fwd/odp_l2fwd.c +++ b/example/l2fwd/odp_l2fwd.c @@ -7,7 +7,7 @@ /** * @file * - * @example l2fwd.c ODP basic forwarding application + * @example odp_l2fwd.c ODP basic forwarding application */ #include diff --git a/test/example/Makefile.am b/example/odp_example/Makefile.am similarity index 100% rename from test/example/Makefile.am rename to example/odp_example/Makefile.am diff --git a/test/example/odp_example.c b/example/odp_example/odp_example.c similarity index 100% rename from test/example/odp_example.c rename to example/odp_example/odp_example.c diff --git a/test/packet/Makefile.am b/example/packet/Makefile.am similarity index 100% rename from test/packet/Makefile.am rename to example/packet/Makefile.am diff --git a/test/packet/odp_pktio.c b/example/packet/odp_pktio.c similarity index 99% rename from test/packet/odp_pktio.c rename to example/packet/odp_pktio.c index 91aa6d1..edf8cfd 100644 --- a/test/packet/odp_pktio.c +++ b/example/packet/odp_pktio.c @@ -7,7 +7,7 @@ /** * @file * - * @example odp_example_pktio.c ODP basic packet IO loopback test application + * @example odp_pktio.c ODP basic packet IO loopback test application */ #include diff --git a/test/packet_netmap/Makefile.am b/example/packet_netmap/Makefile.am similarity index 100% rename from test/packet_netmap/Makefile.am rename to example/packet_netmap/Makefile.am diff --git a/test/packet_netmap/odp_pktio_netmap.c b/example/packet_netmap/odp_pktio_netmap.c similarity index 100% rename from test/packet_netmap/odp_pktio_netmap.c rename to example/packet_netmap/odp_pktio_netmap.c diff --git a/test/timer/Makefile.am b/example/timer/Makefile.am similarity index 100% rename from test/timer/Makefile.am rename to example/timer/Makefile.am diff --git a/test/timer/odp_timer_test.c b/example/timer/odp_timer_test.c similarity index 100% rename from test/timer/odp_timer_test.c rename to example/timer/odp_timer_test.c diff --git a/test/Makefile.am b/test/Makefile.am index bae381e..9bd7db1 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -1 +1 @@ -SUBDIRS = api_test example generator l2fwd packet packet_netmap timer +SUBDIRS = api_test diff --git a/test/README b/test/README new file mode 100644 index 0000000..045f88b --- /dev/null +++ b/test/README @@ -0,0 +1,2 @@ +Files in this directory are intended to be terse checks that help ensure +that the ODP API Implementations all perform identically and to specification.