diff mbox

[PATCHv2] Move ODP examples from under tests

Message ID 1406062951-61861-1-git-send-email-mike.holmes@linaro.org
State Rejected
Headers show

Commit Message

Mike Holmes July 22, 2014, 9:02 p.m. UTC
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 <mike.holmes@linaro.org>
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
---
 .gitignore                                         | 26 +++++++++++-----------
 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            |  2 +-
 {test => example}/generator/odp_generator.c        |  0
 {test => example}/l2fwd/Makefile.am                |  2 +-
 {test => example}/l2fwd/odp_l2fwd.c                |  2 +-
 {test/example => example/odp_example}/Makefile.am  |  2 +-
 .../example => example/odp_example}/odp_example.c  |  0
 {test => example}/packet/Makefile.am               |  2 +-
 {test => example}/packet/odp_pktio.c               |  2 +-
 {test => example}/packet_netmap/Makefile.am        |  2 +-
 {test => example}/packet_netmap/odp_pktio_netmap.c |  0
 {test => example}/timer/Makefile.am                |  2 +-
 {test => example}/timer/odp_timer_test.c           |  0
 test/Makefile.am                                   |  2 +-
 test/README                                        |  2 ++
 21 files changed, 48 insertions(+), 31 deletions(-)
 create mode 100644 example/Makefile.am
 create mode 100644 example/Makefile.inc
 create mode 100644 example/README
 rename {test => example}/generator/Makefile.am (63%)
 rename {test => example}/generator/odp_generator.c (100%)
 rename {test => example}/l2fwd/Makefile.am (59%)
 rename {test => example}/l2fwd/odp_l2fwd.c (99%)
 rename {test/example => example/odp_example}/Makefile.am (61%)
 rename {test/example => example/odp_example}/odp_example.c (100%)
 rename {test => example}/packet/Makefile.am (59%)
 rename {test => example}/packet/odp_pktio.c (99%)
 rename {test => example}/packet_netmap/Makefile.am (72%)
 rename {test => example}/packet_netmap/odp_pktio_netmap.c (100%)
 rename {test => example}/timer/Makefile.am (64%)
 rename {test => example}/timer/odp_timer_test.c (100%)
 create mode 100644 test/README

Comments

Ciprian Barbu July 23, 2014, 9:55 a.m. UTC | #1
On Wed, Jul 23, 2014 at 12:02 AM, Mike Holmes <mike.holmes@linaro.org> wrote:
>
> 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 <mike.holmes@linaro.org>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>


Reviewed-and-Tested-by: Ciprian Barbu <ciprian.barbu@linaro.org>

> ---
>  .gitignore                                         | 26 +++++++++++-----------
>  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            |  2 +-
>  {test => example}/generator/odp_generator.c        |  0
>  {test => example}/l2fwd/Makefile.am                |  2 +-
>  {test => example}/l2fwd/odp_l2fwd.c                |  2 +-
>  {test/example => example/odp_example}/Makefile.am  |  2 +-
>  .../example => example/odp_example}/odp_example.c  |  0
>  {test => example}/packet/Makefile.am               |  2 +-
>  {test => example}/packet/odp_pktio.c               |  2 +-
>  {test => example}/packet_netmap/Makefile.am        |  2 +-
>  {test => example}/packet_netmap/odp_pktio_netmap.c |  0
>  {test => example}/timer/Makefile.am                |  2 +-
>  {test => example}/timer/odp_timer_test.c           |  0
>  test/Makefile.am                                   |  2 +-
>  test/README                                        |  2 ++
>  21 files changed, 48 insertions(+), 31 deletions(-)
>  create mode 100644 example/Makefile.am
>  create mode 100644 example/Makefile.inc
>  create mode 100644 example/README
>  rename {test => example}/generator/Makefile.am (63%)
>  rename {test => example}/generator/odp_generator.c (100%)
>  rename {test => example}/l2fwd/Makefile.am (59%)
>  rename {test => example}/l2fwd/odp_l2fwd.c (99%)
>  rename {test/example => example/odp_example}/Makefile.am (61%)
>  rename {test/example => example/odp_example}/odp_example.c (100%)
>  rename {test => example}/packet/Makefile.am (59%)
>  rename {test => example}/packet/odp_pktio.c (99%)
>  rename {test => example}/packet_netmap/Makefile.am (72%)
>  rename {test => example}/packet_netmap/odp_pktio_netmap.c (100%)
>  rename {test => example}/timer/Makefile.am (64%)
>  rename {test => example}/timer/odp_timer_test.c (100%)
>  create mode 100644 test/README
>
> diff --git a/.gitignore b/.gitignore
> index 5742907..ca9e716 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -25,21 +25,21 @@ include/config.h
>  include/stamp-h1
>  libtool
>  pkgconfig/libodp.pc
> -platform/*/.deps/
> -test/*/.deps/
> +.deps/
>  cscope.out
>  tags
>  lib/
>  obj/
>  build/
> -test/example/odp_example
> -test/packet/odp_packet
> -test/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
> +odp_example
> +odp_packet
> +odp_packet_netmap
> +odp_atomic
> +odp_shm
> +odp_ring
> +odp_timer
> +odp_pktio
> +odp_timer_test
> +odp_generator
> +odp_l2fwd
> +doxygen-doc
> diff --git a/Makefile.am b/Makefile.am
> index 36d5c23..21f1b11 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,7 +1,7 @@
>  ACLOCAL_AMFLAGS=-I m4
>  AUTOMAKE_OPTIONS = foreign
>
> -SUBDIRS = platform test
> +SUBDIRS = platform example test
>
>  include $(top_srcdir)/aminclude.am
>
> diff --git a/configure.ac b/configure.ac
> index 873ea9e..447a6a0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -111,14 +111,15 @@ AC_CONFIG_FILES([Makefile
>                  platform/Makefile
>                  platform/linux-generic/Makefile
>                  platform/linux-keystone2/Makefile
> +                example/Makefile
> +                example/generator/Makefile
> +                example/l2fwd/Makefile
> +                example/odp_example/Makefile
> +                example/packet/Makefile
> +                example/packet_netmap/Makefile
> +                example/timer/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
>                  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..01a3305
> --- /dev/null
> +++ b/example/Makefile.am
> @@ -0,0 +1 @@
> +SUBDIRS = generator l2fwd odp_example 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 63%
> rename from test/generator/Makefile.am
> rename to example/generator/Makefile.am
> index bd6f200..d3bd5bf 100644
> --- a/test/generator/Makefile.am
> +++ b/example/generator/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>
>  bin_PROGRAMS = odp_generator
>
> 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 59%
> rename from test/l2fwd/Makefile.am
> rename to example/l2fwd/Makefile.am
> index 2637a2c..9b5a7ef 100644
> --- a/test/l2fwd/Makefile.am
> +++ b/example/l2fwd/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>
>  bin_PROGRAMS = odp_l2fwd
>
> 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 <stdlib.h>
> diff --git a/test/example/Makefile.am b/example/odp_example/Makefile.am
> similarity index 61%
> rename from test/example/Makefile.am
> rename to example/odp_example/Makefile.am
> index aeee0e9..c1b4ed3 100644
> --- a/test/example/Makefile.am
> +++ b/example/odp_example/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>
>  bin_PROGRAMS = odp_example
>
> 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 59%
> rename from test/packet/Makefile.am
> rename to example/packet/Makefile.am
> index 0a800fc..2d778dd 100644
> --- a/test/packet/Makefile.am
> +++ b/example/packet/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>
>  bin_PROGRAMS = odp_pktio
>
> 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 <stdlib.h>
> diff --git a/test/packet_netmap/Makefile.am b/example/packet_netmap/Makefile.am
> similarity index 72%
> rename from test/packet_netmap/Makefile.am
> rename to example/packet_netmap/Makefile.am
> index 50e7f85..6db0f98 100644
> --- a/test/packet_netmap/Makefile.am
> +++ b/example/packet_netmap/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>
>  if ODP_NETMAP_ENABLED
>  bin_PROGRAMS = odp_pktio_netmap
> 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 64%
> rename from test/timer/Makefile.am
> rename to example/timer/Makefile.am
> index 096ff49..09253a6 100644
> --- a/test/timer/Makefile.am
> +++ b/example/timer/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>
>  bin_PROGRAMS = odp_timer_test
>
> 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.
> --
> 1.9.1
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> http://lists.linaro.org/mailman/listinfo/lng-odp
Mike Holmes July 24, 2014, 8 p.m. UTC | #2
ping


On 23 July 2014 05:55, Ciprian Barbu <ciprian.barbu@linaro.org> wrote:

> On Wed, Jul 23, 2014 at 12:02 AM, Mike Holmes <mike.holmes@linaro.org>
> wrote:
> >
> > 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 <mike.holmes@linaro.org>
> > Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
>
>
> Reviewed-and-Tested-by: Ciprian Barbu <ciprian.barbu@linaro.org>
>
> > ---
> >  .gitignore                                         | 26
> +++++++++++-----------
> >  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            |  2 +-
> >  {test => example}/generator/odp_generator.c        |  0
> >  {test => example}/l2fwd/Makefile.am                |  2 +-
> >  {test => example}/l2fwd/odp_l2fwd.c                |  2 +-
> >  {test/example => example/odp_example}/Makefile.am  |  2 +-
> >  .../example => example/odp_example}/odp_example.c  |  0
> >  {test => example}/packet/Makefile.am               |  2 +-
> >  {test => example}/packet/odp_pktio.c               |  2 +-
> >  {test => example}/packet_netmap/Makefile.am        |  2 +-
> >  {test => example}/packet_netmap/odp_pktio_netmap.c |  0
> >  {test => example}/timer/Makefile.am                |  2 +-
> >  {test => example}/timer/odp_timer_test.c           |  0
> >  test/Makefile.am                                   |  2 +-
> >  test/README                                        |  2 ++
> >  21 files changed, 48 insertions(+), 31 deletions(-)
> >  create mode 100644 example/Makefile.am
> >  create mode 100644 example/Makefile.inc
> >  create mode 100644 example/README
> >  rename {test => example}/generator/Makefile.am (63%)
> >  rename {test => example}/generator/odp_generator.c (100%)
> >  rename {test => example}/l2fwd/Makefile.am (59%)
> >  rename {test => example}/l2fwd/odp_l2fwd.c (99%)
> >  rename {test/example => example/odp_example}/Makefile.am (61%)
> >  rename {test/example => example/odp_example}/odp_example.c (100%)
> >  rename {test => example}/packet/Makefile.am (59%)
> >  rename {test => example}/packet/odp_pktio.c (99%)
> >  rename {test => example}/packet_netmap/Makefile.am (72%)
> >  rename {test => example}/packet_netmap/odp_pktio_netmap.c (100%)
> >  rename {test => example}/timer/Makefile.am (64%)
> >  rename {test => example}/timer/odp_timer_test.c (100%)
> >  create mode 100644 test/README
> >
> > diff --git a/.gitignore b/.gitignore
> > index 5742907..ca9e716 100644
> > --- a/.gitignore
> > +++ b/.gitignore
> > @@ -25,21 +25,21 @@ include/config.h
> >  include/stamp-h1
> >  libtool
> >  pkgconfig/libodp.pc
> > -platform/*/.deps/
> > -test/*/.deps/
> > +.deps/
> >  cscope.out
> >  tags
> >  lib/
> >  obj/
> >  build/
> > -test/example/odp_example
> > -test/packet/odp_packet
> > -test/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
> > +odp_example
> > +odp_packet
> > +odp_packet_netmap
> > +odp_atomic
> > +odp_shm
> > +odp_ring
> > +odp_timer
> > +odp_pktio
> > +odp_timer_test
> > +odp_generator
> > +odp_l2fwd
> > +doxygen-doc
> > diff --git a/Makefile.am b/Makefile.am
> > index 36d5c23..21f1b11 100644
> > --- a/Makefile.am
> > +++ b/Makefile.am
> > @@ -1,7 +1,7 @@
> >  ACLOCAL_AMFLAGS=-I m4
> >  AUTOMAKE_OPTIONS = foreign
> >
> > -SUBDIRS = platform test
> > +SUBDIRS = platform example test
> >
> >  include $(top_srcdir)/aminclude.am
> >
> > diff --git a/configure.ac b/configure.ac
> > index 873ea9e..447a6a0 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -111,14 +111,15 @@ AC_CONFIG_FILES([Makefile
> >                  platform/Makefile
> >                  platform/linux-generic/Makefile
> >                  platform/linux-keystone2/Makefile
> > +                example/Makefile
> > +                example/generator/Makefile
> > +                example/l2fwd/Makefile
> > +                example/odp_example/Makefile
> > +                example/packet/Makefile
> > +                example/packet_netmap/Makefile
> > +                example/timer/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
> >                  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..01a3305
> > --- /dev/null
> > +++ b/example/Makefile.am
> > @@ -0,0 +1 @@
> > +SUBDIRS = generator l2fwd odp_example 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 63%
> > rename from test/generator/Makefile.am
> > rename to example/generator/Makefile.am
> > index bd6f200..d3bd5bf 100644
> > --- a/test/generator/Makefile.am
> > +++ b/example/generator/Makefile.am
> > @@ -1,4 +1,4 @@
> > -include $(top_srcdir)/test/Makefile.inc
> > +include $(top_srcdir)/example/Makefile.inc
> >
> >  bin_PROGRAMS = odp_generator
> >
> > 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 59%
> > rename from test/l2fwd/Makefile.am
> > rename to example/l2fwd/Makefile.am
> > index 2637a2c..9b5a7ef 100644
> > --- a/test/l2fwd/Makefile.am
> > +++ b/example/l2fwd/Makefile.am
> > @@ -1,4 +1,4 @@
> > -include $(top_srcdir)/test/Makefile.inc
> > +include $(top_srcdir)/example/Makefile.inc
> >
> >  bin_PROGRAMS = odp_l2fwd
> >
> > 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 <stdlib.h>
> > diff --git a/test/example/Makefile.am b/example/odp_example/Makefile.am
> > similarity index 61%
> > rename from test/example/Makefile.am
> > rename to example/odp_example/Makefile.am
> > index aeee0e9..c1b4ed3 100644
> > --- a/test/example/Makefile.am
> > +++ b/example/odp_example/Makefile.am
> > @@ -1,4 +1,4 @@
> > -include $(top_srcdir)/test/Makefile.inc
> > +include $(top_srcdir)/example/Makefile.inc
> >
> >  bin_PROGRAMS = odp_example
> >
> > 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 59%
> > rename from test/packet/Makefile.am
> > rename to example/packet/Makefile.am
> > index 0a800fc..2d778dd 100644
> > --- a/test/packet/Makefile.am
> > +++ b/example/packet/Makefile.am
> > @@ -1,4 +1,4 @@
> > -include $(top_srcdir)/test/Makefile.inc
> > +include $(top_srcdir)/example/Makefile.inc
> >
> >  bin_PROGRAMS = odp_pktio
> >
> > 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 <stdlib.h>
> > diff --git a/test/packet_netmap/Makefile.am
> b/example/packet_netmap/Makefile.am
> > similarity index 72%
> > rename from test/packet_netmap/Makefile.am
> > rename to example/packet_netmap/Makefile.am
> > index 50e7f85..6db0f98 100644
> > --- a/test/packet_netmap/Makefile.am
> > +++ b/example/packet_netmap/Makefile.am
> > @@ -1,4 +1,4 @@
> > -include $(top_srcdir)/test/Makefile.inc
> > +include $(top_srcdir)/example/Makefile.inc
> >
> >  if ODP_NETMAP_ENABLED
> >  bin_PROGRAMS = odp_pktio_netmap
> > 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 64%
> > rename from test/timer/Makefile.am
> > rename to example/timer/Makefile.am
> > index 096ff49..09253a6 100644
> > --- a/test/timer/Makefile.am
> > +++ b/example/timer/Makefile.am
> > @@ -1,4 +1,4 @@
> > -include $(top_srcdir)/test/Makefile.inc
> > +include $(top_srcdir)/example/Makefile.inc
> >
> >  bin_PROGRAMS = odp_timer_test
> >
> > 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.
> > --
> > 1.9.1
> >
> >
> > _______________________________________________
> > lng-odp mailing list
> > lng-odp@lists.linaro.org
> > http://lists.linaro.org/mailman/listinfo/lng-odp
>
Maxim Uvarov July 25, 2014, 6:19 a.m. UTC | #3
Merged!

Thanks,
Maxim.

On 07/23/2014 01:02 AM, Mike Holmes wrote:
> 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 <mike.holmes@linaro.org>
> Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
> ---
>   .gitignore                                         | 26 +++++++++++-----------
>   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            |  2 +-
>   {test => example}/generator/odp_generator.c        |  0
>   {test => example}/l2fwd/Makefile.am                |  2 +-
>   {test => example}/l2fwd/odp_l2fwd.c                |  2 +-
>   {test/example => example/odp_example}/Makefile.am  |  2 +-
>   .../example => example/odp_example}/odp_example.c  |  0
>   {test => example}/packet/Makefile.am               |  2 +-
>   {test => example}/packet/odp_pktio.c               |  2 +-
>   {test => example}/packet_netmap/Makefile.am        |  2 +-
>   {test => example}/packet_netmap/odp_pktio_netmap.c |  0
>   {test => example}/timer/Makefile.am                |  2 +-
>   {test => example}/timer/odp_timer_test.c           |  0
>   test/Makefile.am                                   |  2 +-
>   test/README                                        |  2 ++
>   21 files changed, 48 insertions(+), 31 deletions(-)
>   create mode 100644 example/Makefile.am
>   create mode 100644 example/Makefile.inc
>   create mode 100644 example/README
>   rename {test => example}/generator/Makefile.am (63%)
>   rename {test => example}/generator/odp_generator.c (100%)
>   rename {test => example}/l2fwd/Makefile.am (59%)
>   rename {test => example}/l2fwd/odp_l2fwd.c (99%)
>   rename {test/example => example/odp_example}/Makefile.am (61%)
>   rename {test/example => example/odp_example}/odp_example.c (100%)
>   rename {test => example}/packet/Makefile.am (59%)
>   rename {test => example}/packet/odp_pktio.c (99%)
>   rename {test => example}/packet_netmap/Makefile.am (72%)
>   rename {test => example}/packet_netmap/odp_pktio_netmap.c (100%)
>   rename {test => example}/timer/Makefile.am (64%)
>   rename {test => example}/timer/odp_timer_test.c (100%)
>   create mode 100644 test/README
>
> diff --git a/.gitignore b/.gitignore
> index 5742907..ca9e716 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -25,21 +25,21 @@ include/config.h
>   include/stamp-h1
>   libtool
>   pkgconfig/libodp.pc
> -platform/*/.deps/
> -test/*/.deps/
> +.deps/
>   cscope.out
>   tags
>   lib/
>   obj/
>   build/
> -test/example/odp_example
> -test/packet/odp_packet
> -test/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
> +odp_example
> +odp_packet
> +odp_packet_netmap
> +odp_atomic
> +odp_shm
> +odp_ring
> +odp_timer
> +odp_pktio
> +odp_timer_test
> +odp_generator
> +odp_l2fwd
> +doxygen-doc
> diff --git a/Makefile.am b/Makefile.am
> index 36d5c23..21f1b11 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,7 +1,7 @@
>   ACLOCAL_AMFLAGS=-I m4
>   AUTOMAKE_OPTIONS = foreign
>   
> -SUBDIRS = platform test
> +SUBDIRS = platform example test
>   
>   include $(top_srcdir)/aminclude.am
>   
> diff --git a/configure.ac b/configure.ac
> index 873ea9e..447a6a0 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -111,14 +111,15 @@ AC_CONFIG_FILES([Makefile
>   		 platform/Makefile
>   		 platform/linux-generic/Makefile
>   		 platform/linux-keystone2/Makefile
> +		 example/Makefile
> +		 example/generator/Makefile
> +		 example/l2fwd/Makefile
> +		 example/odp_example/Makefile
> +		 example/packet/Makefile
> +		 example/packet_netmap/Makefile
> +		 example/timer/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
>   		 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..01a3305
> --- /dev/null
> +++ b/example/Makefile.am
> @@ -0,0 +1 @@
> +SUBDIRS = generator l2fwd odp_example 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 63%
> rename from test/generator/Makefile.am
> rename to example/generator/Makefile.am
> index bd6f200..d3bd5bf 100644
> --- a/test/generator/Makefile.am
> +++ b/example/generator/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>   
>   bin_PROGRAMS = odp_generator
>   
> 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 59%
> rename from test/l2fwd/Makefile.am
> rename to example/l2fwd/Makefile.am
> index 2637a2c..9b5a7ef 100644
> --- a/test/l2fwd/Makefile.am
> +++ b/example/l2fwd/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>   
>   bin_PROGRAMS = odp_l2fwd
>   
> 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 <stdlib.h>
> diff --git a/test/example/Makefile.am b/example/odp_example/Makefile.am
> similarity index 61%
> rename from test/example/Makefile.am
> rename to example/odp_example/Makefile.am
> index aeee0e9..c1b4ed3 100644
> --- a/test/example/Makefile.am
> +++ b/example/odp_example/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>   
>   bin_PROGRAMS = odp_example
>   
> 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 59%
> rename from test/packet/Makefile.am
> rename to example/packet/Makefile.am
> index 0a800fc..2d778dd 100644
> --- a/test/packet/Makefile.am
> +++ b/example/packet/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>   
>   bin_PROGRAMS = odp_pktio
>   
> 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 <stdlib.h>
> diff --git a/test/packet_netmap/Makefile.am b/example/packet_netmap/Makefile.am
> similarity index 72%
> rename from test/packet_netmap/Makefile.am
> rename to example/packet_netmap/Makefile.am
> index 50e7f85..6db0f98 100644
> --- a/test/packet_netmap/Makefile.am
> +++ b/example/packet_netmap/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>   
>   if ODP_NETMAP_ENABLED
>   bin_PROGRAMS = odp_pktio_netmap
> 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 64%
> rename from test/timer/Makefile.am
> rename to example/timer/Makefile.am
> index 096ff49..09253a6 100644
> --- a/test/timer/Makefile.am
> +++ b/example/timer/Makefile.am
> @@ -1,4 +1,4 @@
> -include $(top_srcdir)/test/Makefile.inc
> +include $(top_srcdir)/example/Makefile.inc
>   
>   bin_PROGRAMS = odp_timer_test
>   
> 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.
diff mbox

Patch

diff --git a/.gitignore b/.gitignore
index 5742907..ca9e716 100644
--- a/.gitignore
+++ b/.gitignore
@@ -25,21 +25,21 @@  include/config.h
 include/stamp-h1
 libtool
 pkgconfig/libodp.pc
-platform/*/.deps/
-test/*/.deps/
+.deps/
 cscope.out
 tags
 lib/
 obj/
 build/
-test/example/odp_example
-test/packet/odp_packet
-test/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
+odp_example
+odp_packet
+odp_packet_netmap
+odp_atomic
+odp_shm
+odp_ring
+odp_timer
+odp_pktio
+odp_timer_test
+odp_generator
+odp_l2fwd
+doxygen-doc
diff --git a/Makefile.am b/Makefile.am
index 36d5c23..21f1b11 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,7 +1,7 @@ 
 ACLOCAL_AMFLAGS=-I m4
 AUTOMAKE_OPTIONS = foreign
 
-SUBDIRS = platform test
+SUBDIRS = platform example test
 
 include $(top_srcdir)/aminclude.am
 
diff --git a/configure.ac b/configure.ac
index 873ea9e..447a6a0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -111,14 +111,15 @@  AC_CONFIG_FILES([Makefile
 		 platform/Makefile
 		 platform/linux-generic/Makefile
 		 platform/linux-keystone2/Makefile
+		 example/Makefile
+		 example/generator/Makefile
+		 example/l2fwd/Makefile
+		 example/odp_example/Makefile
+		 example/packet/Makefile
+		 example/packet_netmap/Makefile
+		 example/timer/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
 		 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..01a3305
--- /dev/null
+++ b/example/Makefile.am
@@ -0,0 +1 @@ 
+SUBDIRS = generator l2fwd odp_example 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 63%
rename from test/generator/Makefile.am
rename to example/generator/Makefile.am
index bd6f200..d3bd5bf 100644
--- a/test/generator/Makefile.am
+++ b/example/generator/Makefile.am
@@ -1,4 +1,4 @@ 
-include $(top_srcdir)/test/Makefile.inc
+include $(top_srcdir)/example/Makefile.inc
 
 bin_PROGRAMS = odp_generator
 
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 59%
rename from test/l2fwd/Makefile.am
rename to example/l2fwd/Makefile.am
index 2637a2c..9b5a7ef 100644
--- a/test/l2fwd/Makefile.am
+++ b/example/l2fwd/Makefile.am
@@ -1,4 +1,4 @@ 
-include $(top_srcdir)/test/Makefile.inc
+include $(top_srcdir)/example/Makefile.inc
 
 bin_PROGRAMS = odp_l2fwd
 
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 <stdlib.h>
diff --git a/test/example/Makefile.am b/example/odp_example/Makefile.am
similarity index 61%
rename from test/example/Makefile.am
rename to example/odp_example/Makefile.am
index aeee0e9..c1b4ed3 100644
--- a/test/example/Makefile.am
+++ b/example/odp_example/Makefile.am
@@ -1,4 +1,4 @@ 
-include $(top_srcdir)/test/Makefile.inc
+include $(top_srcdir)/example/Makefile.inc
 
 bin_PROGRAMS = odp_example
 
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 59%
rename from test/packet/Makefile.am
rename to example/packet/Makefile.am
index 0a800fc..2d778dd 100644
--- a/test/packet/Makefile.am
+++ b/example/packet/Makefile.am
@@ -1,4 +1,4 @@ 
-include $(top_srcdir)/test/Makefile.inc
+include $(top_srcdir)/example/Makefile.inc
 
 bin_PROGRAMS = odp_pktio
 
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 <stdlib.h>
diff --git a/test/packet_netmap/Makefile.am b/example/packet_netmap/Makefile.am
similarity index 72%
rename from test/packet_netmap/Makefile.am
rename to example/packet_netmap/Makefile.am
index 50e7f85..6db0f98 100644
--- a/test/packet_netmap/Makefile.am
+++ b/example/packet_netmap/Makefile.am
@@ -1,4 +1,4 @@ 
-include $(top_srcdir)/test/Makefile.inc
+include $(top_srcdir)/example/Makefile.inc
 
 if ODP_NETMAP_ENABLED
 bin_PROGRAMS = odp_pktio_netmap
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 64%
rename from test/timer/Makefile.am
rename to example/timer/Makefile.am
index 096ff49..09253a6 100644
--- a/test/timer/Makefile.am
+++ b/example/timer/Makefile.am
@@ -1,4 +1,4 @@ 
-include $(top_srcdir)/test/Makefile.inc
+include $(top_srcdir)/example/Makefile.inc
 
 bin_PROGRAMS = odp_timer_test
 
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.