[gpgme][PATCH] build: tests: avoid build tests if not required

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[gpgme][PATCH] build: tests: avoid build tests if not required

Alon Bar-Lev-3
test enables reducing dependencies for build if tests are not going to
run.

Signed-off-by: Alon Bar-Lev <[hidden email]>
---
 lang/qt/tests/Makefile.am  | 2 +-
 tests/Makefile.am          | 2 +-
 tests/gpg/Makefile.am      | 2 +-
 tests/gpgsm/Makefile.am    | 2 +-
 tests/opassuan/Makefile.am | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lang/qt/tests/Makefile.am b/lang/qt/tests/Makefile.am
index f243a55..c40d75d 100644
--- a/lang/qt/tests/Makefile.am
+++ b/lang/qt/tests/Makefile.am
@@ -62,7 +62,7 @@ nodist_t_keylist_SOURCES = $(moc_files)
 
 BUILT_SOURCES = $(moc_files)
 
-noinst_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \
+check_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \
     run-keyformailboxjob t-wkspublish
 
 CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c71914f..b698e11 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -31,7 +31,7 @@ LDADD = ../src/libgpgme.la @GPG_ERROR_LIBS@
 
 noinst_HEADERS = run-support.h
 
-noinst_PROGRAMS = $(TESTS) run-keylist run-export run-import run-sign \
+check_PROGRAMS = $(TESTS) run-keylist run-export run-import run-sign \
   run-verify run-encrypt run-identify run-decrypt run-genkey \
   run-keysign run-tofu
 
diff --git a/tests/gpg/Makefile.am b/tests/gpg/Makefile.am
index 2538f63..807ca5c 100644
--- a/tests/gpg/Makefile.am
+++ b/tests/gpg/Makefile.am
@@ -71,7 +71,7 @@ if !HAVE_W32_SYSTEM
 tests_skipped += t-cancel
 endif
 
-noinst_PROGRAMS = $(c_tests) $(tests_skipped)
+check_PROGRAMS = $(c_tests) $(tests_skipped)
 
 
 clean-local:
diff --git a/tests/gpgsm/Makefile.am b/tests/gpgsm/Makefile.am
index 41645b6..1bdb712 100644
--- a/tests/gpgsm/Makefile.am
+++ b/tests/gpgsm/Makefile.am
@@ -40,7 +40,7 @@ LDADD = ../../src/libgpgme.la
 
 # We don't run t-genkey in the test suite, because it takes too long
 # and needs a working pinentry.
-noinst_PROGRAMS = $(c_tests) t-genkey cms-keylist cms-decrypt
+check_PROGRAMS = $(c_tests) t-genkey cms-keylist cms-decrypt
 
 key_id = 32100C27173EF6E9C4E9A25D3D69F86D37A4F939
 
diff --git a/tests/opassuan/Makefile.am b/tests/opassuan/Makefile.am
index 31d26ed..608b608 100644
--- a/tests/opassuan/Makefile.am
+++ b/tests/opassuan/Makefile.am
@@ -27,7 +27,7 @@ EXTRA_DIST =
 AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@
 LDADD = ../../src/libgpgme.la
 
-noinst_PROGRAMS = $(TESTS) t-command
+check_PROGRAMS = $(TESTS) t-command
 
 DISTCLEANFILES =
 
--
2.7.3


_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gpgme][PATCH] build: tests: avoid build tests if not required

Alon Bar-Lev-3
Hi,
Any comment?
Thanks!

On 23 September 2016 at 23:38, Alon Bar-Lev <[hidden email]> wrote:
test enables reducing dependencies for build if tests are not going to
run.

Signed-off-by: Alon Bar-Lev <[hidden email]>
---
 lang/qt/tests/Makefile.am  | 2 +-
 tests/Makefile.am          | 2 +-
 tests/gpg/Makefile.am      | 2 +-
 tests/gpgsm/Makefile.am    | 2 +-
 tests/opassuan/Makefile.am | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/lang/qt/tests/Makefile.am b/lang/qt/tests/Makefile.am
index f243a55..c40d75d 100644
--- a/lang/qt/tests/Makefile.am
+++ b/lang/qt/tests/Makefile.am
@@ -62,7 +62,7 @@ nodist_t_keylist_SOURCES = $(moc_files)

 BUILT_SOURCES = $(moc_files)

-noinst_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \
+check_PROGRAMS = t-keylist t-keylocate t-ownertrust t-tofuinfo t-encrypt \
     run-keyformailboxjob t-wkspublish

 CLEANFILES = secring.gpg pubring.gpg pubring.kbx trustdb.gpg dirmngr.conf \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index c71914f..b698e11 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -31,7 +31,7 @@ LDADD = ../src/libgpgme.la @GPG_ERROR_LIBS@

 noinst_HEADERS = run-support.h

-noinst_PROGRAMS = $(TESTS) run-keylist run-export run-import run-sign \
+check_PROGRAMS = $(TESTS) run-keylist run-export run-import run-sign \
                  run-verify run-encrypt run-identify run-decrypt run-genkey \
                  run-keysign run-tofu

diff --git a/tests/gpg/Makefile.am b/tests/gpg/Makefile.am
index 2538f63..807ca5c 100644
--- a/tests/gpg/Makefile.am
+++ b/tests/gpg/Makefile.am
@@ -71,7 +71,7 @@ if !HAVE_W32_SYSTEM
 tests_skipped += t-cancel
 endif

-noinst_PROGRAMS = $(c_tests) $(tests_skipped)
+check_PROGRAMS = $(c_tests) $(tests_skipped)


 clean-local:
diff --git a/tests/gpgsm/Makefile.am b/tests/gpgsm/Makefile.am
index 41645b6..1bdb712 100644
--- a/tests/gpgsm/Makefile.am
+++ b/tests/gpgsm/Makefile.am
@@ -40,7 +40,7 @@ LDADD = ../../src/libgpgme.la

 # We don't run t-genkey in the test suite, because it takes too long
 # and needs a working pinentry.
-noinst_PROGRAMS = $(c_tests) t-genkey cms-keylist cms-decrypt
+check_PROGRAMS = $(c_tests) t-genkey cms-keylist cms-decrypt

 key_id = 32100C27173EF6E9C4E9A25D3D69F86D37A4F939

diff --git a/tests/opassuan/Makefile.am b/tests/opassuan/Makefile.am
index 31d26ed..608b608 100644
--- a/tests/opassuan/Makefile.am
+++ b/tests/opassuan/Makefile.am
@@ -27,7 +27,7 @@ EXTRA_DIST =
 AM_CPPFLAGS = -I$(top_builddir)/src @GPG_ERROR_CFLAGS@
 LDADD = ../../src/libgpgme.la

-noinst_PROGRAMS = $(TESTS) t-command
+check_PROGRAMS = $(TESTS) t-command

 DISTCLEANFILES =

--
2.7.3



_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gpgme][PATCH] build: tests: avoid build tests if not required

Andre Heinecke
Hi,

On Thursday 29 September 2016 20:53:40 Alon Bar-Lev wrote:
> Hi,
> Any comment?

Werner: I think thats a question for you. For the Qt test I think this patch
is acceptable but as the patch is global for all the tests you should decide.

Regards,
Andre

--
Andre Heinecke |  ++49-541-335083-262  | http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

signature.asc (643 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gpgme][PATCH] build: tests: avoid build tests if not required

Justus Winter
Andre Heinecke <[hidden email]> writes:

> [ Unknown signature status ]
> Hi,
>
> On Thursday 29 September 2016 20:53:40 Alon Bar-Lev wrote:
>> Hi,
>> Any comment?
>
> Werner: I think thats a question for you. For the Qt test I think this patch
> is acceptable but as the patch is global for all the tests you should decide.

I know Werner shot down a similar patch for GnuPG, arguing that 'make'
is run more often than 'make check'.

I agree with the proposed change, but not with the motivation.  Does
that mean that on Gentoo the test are not being executed when building
packages!?

Cheers,
Justus

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

signature.asc (463 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gpgme][PATCH] build: tests: avoid build tests if not required

Alon Bar-Lev-3
On 30 September 2016 at 15:29, Justus Winter <[hidden email]> wrote:

>
> Andre Heinecke <[hidden email]> writes:
>
> > [ Unknown signature status ]
> > Hi,
> >
> > On Thursday 29 September 2016 20:53:40 Alon Bar-Lev wrote:
> >> Hi,
> >> Any comment?
> >
> > Werner: I think thats a question for you. For the Qt test I think this patch
> > is acceptable but as the patch is global for all the tests you should decide.
>
> I know Werner shot down a similar patch for GnuPG, arguing that 'make'
> is run more often than 'make check'.
>
> I agree with the proposed change, but not with the motivation.  Does
> that mean that on Gentoo the test are not being executed when building
> packages!?

Your question is actually:
Does that means that on "Automake" the test are not being executed
when build packages (aka make all)?
It has nothing to do with Gentoo...

Executing tests is optional in Automake, Gentoo and manual sequence as
there is no point of introducing additional dependencies and run
additional builds if tests are not to run.

Exactly because of this check_PROGRAMS exists and should be used for
targets that are used for check target.

Thanks,
Alon

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gpgme][PATCH] build: tests: avoid build tests if not required

Werner Koch
In reply to this post by Alon Bar-Lev-3
On Fri, 23 Sep 2016 22:38, [hidden email] said:
> test enables reducing dependencies for build if tests are not going to
> run.

Not being able to build tests can be a sign that something with the
build system is wrong.  Thus I do not understand why you do not want to
build them.

I have never used check_ and do not user whether this has the same
properties as noinst_.  In particular, noinst_ is used to get rid of the
wrappers for easier debugging and for testing on Windows.

BTW, the commit log should be in the form described by
gnupg/doc/HACKING.


Salam-Shalom,

   Werner

--
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

attachment0 (167 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gpgme][PATCH] build: tests: avoid build tests if not required

Alon Bar-Lev-3
On 30 September 2016 at 19:36, Andre Heinecke
<[hidden email]> wrote:

> Hi,
>
> On Friday 30 September 2016 15:54:05 Werner Koch wrote:
>> On Fri, 23 Sep 2016 22:38, [hidden email] said:
>> > test enables reducing dependencies for build if tests are not going to
>> > run.
>
> Mmh reducing dependencies I might be responsible for this. Is this because the
> Qt Testsuite additionally requires QTest?
>
> In that case I think it might be a better fix to build the Qt tests only if
> QTest is available. Would this work for you?

Yes.
However, autodetect is worse than just not build.
As if you ignore and run "make check" then nothing will run although it should.
So far I patched it to avoid users require QTest if no tests are to be executed.
I will follow whatever decision you may have, including forcing QTest
for users unconditionally, but I thought you have done this by
mistake.

Thanks.

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [gpgme][PATCH] build: tests: avoid build tests if not required

Alon Bar-Lev-3
On 30 September 2016 at 20:49, Alon Bar-Lev <[hidden email]> wrote:

>
> On 30 September 2016 at 19:36, Andre Heinecke
> <[hidden email]> wrote:
> > Hi,
> >
> > On Friday 30 September 2016 15:54:05 Werner Koch wrote:
> >> On Fri, 23 Sep 2016 22:38, [hidden email] said:
> >> > test enables reducing dependencies for build if tests are not going to
> >> > run.
> >
> > Mmh reducing dependencies I might be responsible for this. Is this because the
> > Qt Testsuite additionally requires QTest?
> >
> > In that case I think it might be a better fix to build the Qt tests only if
> > QTest is available. Would this work for you?
>
> Yes.
> However, autodetect is worse than just not build.
> As if you ignore and run "make check" then nothing will run although it should.
> So far I patched it to avoid users require QTest if no tests are to be executed.
> I will follow whatever decision you may have, including forcing QTest
> for users unconditionally, but I thought you have done this by
> mistake.
>
> Thanks.

Hi,
I see that gnupg-1.9 also requires qttest unconditionally, can we
please remove this dependency as mandatory?
Thanks!

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Loading...