diff mbox series

[ndctl,1/2] configure: add checking jq command

Message ID 20210301172540.1511-1-qi.fuli@fujitsu.com (mailing list archive)
State New
Headers show
Series [ndctl,1/2] configure: add checking jq command | expand

Commit Message

QI Fuli March 1, 2021, 5:25 p.m. UTC
Add checking jq command since it is needed to validate tests

Cc: Santosh Sivaraj <santosh@fossix.org>
Signed-off-by: QI Fuli <qi.fuli@fujitsu.com>
Link: https://github.com/pmem/ndctl/issues/141
---
 configure.ac | 6 ++++++
 1 file changed, 6 insertions(+)

--
2.29.2

Comments

Santosh Sivaraj March 2, 2021, 5:15 a.m. UTC | #1
Hi Qi,

QI Fuli <fukuri.sai@gmail.com> writes:

> Add checking jq command since it is needed to validate tests
>
> Cc: Santosh Sivaraj <santosh@fossix.org>
> Signed-off-by: QI Fuli <qi.fuli@fujitsu.com>
> Link: https://github.com/pmem/ndctl/issues/141
> ---
>  configure.ac | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 5ec8d2f..839836b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -65,6 +65,12 @@ fi
>  AC_SUBST([XMLTO])
>  fi
>
> +AC_CHECK_PROG(JQ, [jq], [$(which jq)], [missing])
> +if test "x$JQ" = xmissing; then
> +	AC_MSG_ERROR([jq command needed to validate tests])
> +fi
> +AC_SUBST([JQ])
> +
>  AC_C_TYPEOF
>  AC_DEFINE([HAVE_STATEMENT_EXPR], 1, [Define to 1 if you have statement expressions.])
>
> --
> 2.29.2

Acked-by: Santosh Sivaraj <santosh@fossix.org>

Thanks,
Santosh
Verma, Vishal L March 10, 2021, 9:10 a.m. UTC | #2
On Tue, 2021-03-02 at 02:25 +0900, QI Fuli wrote:
> Add checking jq command since it is needed to validate tests
> 
> Cc: Santosh Sivaraj <santosh@fossix.org>
> Signed-off-by: QI Fuli <qi.fuli@fujitsu.com>
> Link: https://github.com/pmem/ndctl/issues/141
> ---
>  configure.ac | 6 ++++++
>  1 file changed, 6 insertions(+)

Hm, I think I prefer how you did it in v1. i.e. no configure.ac check.
In my view, configure.ac tests are for the core things needed to /run/
ndctl on a system. Development unit tests can just continue to use
check_prereq as you did. So I'll pick up v1 of this for now - if you
want me to do something else please let me know!

> 
> diff --git a/configure.ac b/configure.ac
> index 5ec8d2f..839836b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -65,6 +65,12 @@ fi
>  AC_SUBST([XMLTO])
>  fi
> 
> +AC_CHECK_PROG(JQ, [jq], [$(which jq)], [missing])
> +if test "x$JQ" = xmissing; then
> +	AC_MSG_ERROR([jq command needed to validate tests])
> +fi
> +AC_SUBST([JQ])
> +
>  AC_C_TYPEOF
>  AC_DEFINE([HAVE_STATEMENT_EXPR], 1, [Define to 1 if you have statement expressions.])
> 
> --
> 2.29.2
> _______________________________________________
> Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
> To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
diff mbox series

Patch

diff --git a/configure.ac b/configure.ac
index 5ec8d2f..839836b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -65,6 +65,12 @@  fi
 AC_SUBST([XMLTO])
 fi

+AC_CHECK_PROG(JQ, [jq], [$(which jq)], [missing])
+if test "x$JQ" = xmissing; then
+	AC_MSG_ERROR([jq command needed to validate tests])
+fi
+AC_SUBST([JQ])
+
 AC_C_TYPEOF
 AC_DEFINE([HAVE_STATEMENT_EXPR], 1, [Define to 1 if you have statement expressions.])