diff mbox

[v2] configure: Fix broken conditional example execution

Message ID 1460745365-27158-1-git-send-email-mike.holmes@linaro.org
State Accepted
Commit 4834b40e7840fd23b8481b04dfff50d8fd0e1699
Headers show

Commit Message

Mike Holmes April 15, 2016, 6:36 p.m. UTC
The configure environment was incorrect and the examples always run with
make check

Signed-off-by: Mike Holmes <mike.holmes@linaro.org>
---
v2
   spelling correction - Ricardo

 configure.ac               | 2 ++
 example/m4/configure.m4    | 2 +-
 example/switch/Makefile.am | 6 ++++--
 3 files changed, 7 insertions(+), 3 deletions(-)

Comments

Mike Holmes April 20, 2016, 3:46 p.m. UTC | #1
Hi Ricardo, is this good for you now, any other reviews ?

On 15 April 2016 at 14:36, Mike Holmes <mike.holmes@linaro.org> wrote:

> The configure environment was incorrect and the examples always run with

> make check

>

> Signed-off-by: Mike Holmes <mike.holmes@linaro.org>

> ---

> v2

>    spelling correction - Ricardo

>

>  configure.ac               | 2 ++

>  example/m4/configure.m4    | 2 +-

>  example/switch/Makefile.am | 6 ++++--

>  3 files changed, 7 insertions(+), 3 deletions(-)

>

> diff --git a/configure.ac b/configure.ac

> index 9665d1d..9acc203 100644

> --- a/configure.ac

> +++ b/configure.ac

> @@ -141,6 +141,7 @@ AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ])

>  AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ])

>  AM_CONDITIONAL([test_cpp], [test x$test_cpp = xyes ])

>  AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ])

> +AM_CONDITIONAL([test_example], [test x$test_example = xyes ])

>  AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"])

>  AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])

>  AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])

> @@ -243,5 +244,6 @@ AC_MSG_RESULT([

>         test_perf:              ${test_perf}

>         test_cpp:               ${test_cpp}

>         test_helper:            ${test_helper}

> +       test_example:           ${test_example}

>         user_guides:            ${user_guides}

>  ])

> diff --git a/example/m4/configure.m4 b/example/m4/configure.m4

> index 229fed5..9731d81 100644

> --- a/example/m4/configure.m4

> +++ b/example/m4/configure.m4

> @@ -3,7 +3,7 @@

>  ##########################################################################

>  test_example=no

>  AC_ARG_ENABLE([test-example],

> -    [  --enable-test-example       run basic test aginast examples],

> +    [  --enable-test-example   run basic test against examples],

>      [if test "x$enableval" = "xyes"; then

>          test_example=yes

>       else

> diff --git a/example/switch/Makefile.am b/example/switch/Makefile.am

> index e18c681..20ca3cd 100644

> --- a/example/switch/Makefile.am

> +++ b/example/switch/Makefile.am

> @@ -9,7 +9,9 @@ noinst_HEADERS = \

>

>  dist_odp_switch_SOURCES = odp_switch.c

>

> -if HAVE_PCAP

> -TESTS = switch_run.sh

> +if test_example

> +       if HAVE_PCAP

> +               TESTS = switch_run.sh

> +       endif

>  endif

>  EXTRA_DIST = switch_run.sh udp64.pcap

> --

> 2.5.0

>

>



-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
Maxim Uvarov April 27, 2016, 2:01 p.m. UTC | #2
Merged,

I removed tabs which you added in example/switch/Makefile.am,
to match existence code style. If you think that with tabs code is more
readable you can send separate patch for tabs.

For the latest chunk we have 3 patches in ML, but Mike was first. So that
patch goes in first.

Maxim.

On 04/20/16 18:46, Mike Holmes wrote:
> Hi Ricardo, is this good for you now, any other reviews ?
>
> On 15 April 2016 at 14:36, Mike Holmes <mike.holmes@linaro.org 
> <mailto:mike.holmes@linaro.org>> wrote:
>
>     The configure environment was incorrect and the examples always
>     run with
>     make check
>
>     Signed-off-by: Mike Holmes <mike.holmes@linaro.org
>     <mailto:mike.holmes@linaro.org>>
>     ---
>     v2
>        spelling correction - Ricardo
>
>     configure.ac <http://configure.ac>        | 2 ++
>      example/m4/configure.m4    | 2 +-
>      example/switch/Makefile.am | 6 ++++--
>      3 files changed, 7 insertions(+), 3 deletions(-)
>
>     diff --git a/configure.ac <http://configure.ac> b/configure.ac
>     <http://configure.ac>
>     index 9665d1d..9acc203 100644
>     --- a/configure.ac <http://configure.ac>
>     +++ b/configure.ac <http://configure.ac>
>     @@ -141,6 +141,7 @@ AM_CONDITIONAL([test_vald], [test x$test_vald
>     = xyes ])
>      AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ])
>      AM_CONDITIONAL([test_cpp], [test x$test_cpp = xyes ])
>      AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ])
>     +AM_CONDITIONAL([test_example], [test x$test_example = xyes ])
>      AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"])
>      AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])
>      AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
>     @@ -243,5 +244,6 @@ AC_MSG_RESULT([
>             test_perf:              ${test_perf}
>             test_cpp:               ${test_cpp}
>             test_helper:            ${test_helper}
>     +       test_example:           ${test_example}
>             user_guides:            ${user_guides}
>      ])
>     diff --git a/example/m4/configure.m4 b/example/m4/configure.m4
>     index 229fed5..9731d81 100644
>     --- a/example/m4/configure.m4
>     +++ b/example/m4/configure.m4
>     @@ -3,7 +3,7 @@
>      ##########################################################################
>      test_example=no
>      AC_ARG_ENABLE([test-example],
>     -    [  --enable-test-example       run basic test aginast examples],
>     +    [  --enable-test-example   run basic test against examples],
>          [if test "x$enableval" = "xyes"; then
>              test_example=yes
>           else
>     diff --git a/example/switch/Makefile.am b/example/switch/Makefile.am
>     index e18c681..20ca3cd 100644
>     --- a/example/switch/Makefile.am
>     +++ b/example/switch/Makefile.am
>     @@ -9,7 +9,9 @@ noinst_HEADERS = \
>
>      dist_odp_switch_SOURCES = odp_switch.c
>
>     -if HAVE_PCAP
>     -TESTS = switch_run.sh
>     +if test_example
>     +       if HAVE_PCAP
>     +               TESTS = switch_run.sh
>     +       endif
>      endif
>      EXTRA_DIST = switch_run.sh udp64.pcap
>     --
>     2.5.0
>
>
>
>
> -- 
> Mike Holmes
> Technical Manager - Linaro Networking Group
> Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM SoCs
> "Work should be fun and collaborative, the rest follows"
>
>
>
> _______________________________________________
> lng-odp mailing list
> lng-odp@lists.linaro.org
> https://lists.linaro.org/mailman/listinfo/lng-odp
Mike Holmes April 27, 2016, 2:03 p.m. UTC | #3
On 27 April 2016 at 10:01, Maxim Uvarov <maxim.uvarov@linaro.org> wrote:

> Merged,

>

> I removed tabs which you added in example/switch/Makefile.am,

> to match existence code style. If you think that with tabs code is more

> readable you can send separate patch for tabs.

>


Ack I dont mind


>

> For the latest chunk we have 3 patches in ML, but Mike was first. So that

> patch goes in first.

>

> Maxim.

>

> On 04/20/16 18:46, Mike Holmes wrote:

>

>> Hi Ricardo, is this good for you now, any other reviews ?

>>

>> On 15 April 2016 at 14:36, Mike Holmes <mike.holmes@linaro.org <mailto:

>> mike.holmes@linaro.org>> wrote:

>>

>>     The configure environment was incorrect and the examples always

>>     run with

>>     make check

>>

>>     Signed-off-by: Mike Holmes <mike.holmes@linaro.org

>>     <mailto:mike.holmes@linaro.org>>

>>     ---

>>     v2

>>        spelling correction - Ricardo

>>

>>     configure.ac <http://configure.ac>        | 2 ++

>>      example/m4/configure.m4    | 2 +-

>>      example/switch/Makefile.am | 6 ++++--

>>      3 files changed, 7 insertions(+), 3 deletions(-)

>>

>>     diff --git a/configure.ac <http://configure.ac> b/configure.ac

>>     <http://configure.ac>

>>     index 9665d1d..9acc203 100644

>>     --- a/configure.ac <http://configure.ac>

>>     +++ b/configure.ac <http://configure.ac>

>>

>>     @@ -141,6 +141,7 @@ AM_CONDITIONAL([test_vald], [test x$test_vald

>>     = xyes ])

>>      AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ])

>>      AM_CONDITIONAL([test_cpp], [test x$test_cpp = xyes ])

>>      AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ])

>>     +AM_CONDITIONAL([test_example], [test x$test_example = xyes ])

>>      AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"])

>>      AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])

>>      AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])

>>     @@ -243,5 +244,6 @@ AC_MSG_RESULT([

>>             test_perf:              ${test_perf}

>>             test_cpp:               ${test_cpp}

>>             test_helper:            ${test_helper}

>>     +       test_example:           ${test_example}

>>             user_guides:            ${user_guides}

>>      ])

>>     diff --git a/example/m4/configure.m4 b/example/m4/configure.m4

>>     index 229fed5..9731d81 100644

>>     --- a/example/m4/configure.m4

>>     +++ b/example/m4/configure.m4

>>     @@ -3,7 +3,7 @@

>>

>>  ##########################################################################

>>      test_example=no

>>      AC_ARG_ENABLE([test-example],

>>     -    [  --enable-test-example       run basic test aginast examples],

>>     +    [  --enable-test-example   run basic test against examples],

>>          [if test "x$enableval" = "xyes"; then

>>              test_example=yes

>>           else

>>     diff --git a/example/switch/Makefile.am b/example/switch/Makefile.am

>>     index e18c681..20ca3cd 100644

>>     --- a/example/switch/Makefile.am

>>     +++ b/example/switch/Makefile.am

>>     @@ -9,7 +9,9 @@ noinst_HEADERS = \

>>

>>      dist_odp_switch_SOURCES = odp_switch.c

>>

>>     -if HAVE_PCAP

>>     -TESTS = switch_run.sh

>>     +if test_example

>>     +       if HAVE_PCAP

>>     +               TESTS = switch_run.sh

>>     +       endif

>>      endif

>>      EXTRA_DIST = switch_run.sh udp64.pcap

>>     --

>>     2.5.0

>>

>>

>>

>>

>> --

>> Mike Holmes

>> Technical Manager - Linaro Networking Group

>> Linaro.org <http://www.linaro.org/>***│ *Open source software for ARM

>> SoCs

>> "Work should be fun and collaborative, the rest follows"

>>

>>

>>

>> _______________________________________________

>> lng-odp mailing list

>> lng-odp@lists.linaro.org

>> https://lists.linaro.org/mailman/listinfo/lng-odp

>>

>

> _______________________________________________

> lng-odp mailing list

> lng-odp@lists.linaro.org

> https://lists.linaro.org/mailman/listinfo/lng-odp

>




-- 
Mike Holmes
Technical Manager - Linaro Networking Group
Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs
"Work should be fun and collaborative, the rest follows"
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 9665d1d..9acc203 100644
--- a/configure.ac
+++ b/configure.ac
@@ -141,6 +141,7 @@  AM_CONDITIONAL([test_vald], [test x$test_vald = xyes ])
 AM_CONDITIONAL([test_perf], [test x$test_perf = xyes ])
 AM_CONDITIONAL([test_cpp], [test x$test_cpp = xyes ])
 AM_CONDITIONAL([test_helper], [test x$test_helper = xyes ])
+AM_CONDITIONAL([test_example], [test x$test_example = xyes ])
 AM_CONDITIONAL([HAVE_DOXYGEN], [test "x${DOXYGEN}" = "xdoxygen"])
 AM_CONDITIONAL([user_guide], [test "x${user_guides}" = "xyes" ])
 AM_CONDITIONAL([HAVE_MSCGEN], [test "x${MSCGEN}" = "xmscgen"])
@@ -243,5 +244,6 @@  AC_MSG_RESULT([
 	test_perf:		${test_perf}
 	test_cpp:		${test_cpp}
 	test_helper:		${test_helper}
+	test_example:		${test_example}
 	user_guides:		${user_guides}
 ])
diff --git a/example/m4/configure.m4 b/example/m4/configure.m4
index 229fed5..9731d81 100644
--- a/example/m4/configure.m4
+++ b/example/m4/configure.m4
@@ -3,7 +3,7 @@ 
 ##########################################################################
 test_example=no
 AC_ARG_ENABLE([test-example],
-    [  --enable-test-example       run basic test aginast examples],
+    [  --enable-test-example   run basic test against examples],
     [if test "x$enableval" = "xyes"; then
         test_example=yes
      else
diff --git a/example/switch/Makefile.am b/example/switch/Makefile.am
index e18c681..20ca3cd 100644
--- a/example/switch/Makefile.am
+++ b/example/switch/Makefile.am
@@ -9,7 +9,9 @@  noinst_HEADERS = \
 
 dist_odp_switch_SOURCES = odp_switch.c
 
-if HAVE_PCAP
-TESTS = switch_run.sh
+if test_example
+	if HAVE_PCAP
+		TESTS = switch_run.sh
+	endif
 endif
 EXTRA_DIST = switch_run.sh udp64.pcap