Hi folks you are definitely right with your answers, however, they are not entirely answer my questions
On 07/15/15 10:29, Ghislain Vaillant wrote: > On 15 Jul 2015 9:03 am, "PICCA Frederic-Emmanuel" < > frederic-emmanuel.pi...@synchrotron-soleil.fr> wrote: >> >>>> In order to run the tests in my package I first have to build them > (they >>>> are not built by the 'all' target). This requires a non-standard target >>>> (build-tests) of the upstream Makefile to be invoked. >>>> I have two solutions how I can deal with this: >>>> 1.) I change to the build directory (the directory where the rules >>>> file invokes the upstream build system) and run 'make build-tests' >>>> from within rules. >>>> 2.) Find a simple way how to call a custom target of the upstream >>>> build system from within 'rules'. >> >> >> In fact I just checked in the debhelper. >> the dh_auto_test target call the first running test , check target >> >> so if you add a make chech target, it will be executer by dh >> >> >> Now if you want to customize the target >> >> just >> >> override_du_auto_test: >> <cmd du run the tests> Let me give you an example here. Let us assume we have a special target 'my_super_test' in the upstream Makefile which should be called by dh_auto_test and let us further assume we do not want or cannot change the upstream Makefile. In this case I would do something like this override_du_auto_test: cd <BUILDDIR> && make my_super_test My original question was: where do I get BUILDDIR from? For instance, when you use cmake the build directory (relative to the location where the rules file is running) is obj-x86_64-linux-gnu. I learned this from the output of the build process. However, this obviously depends on the architecture. What I would like to have is a procedure which retrieves me this information. I stumbled upon this problem for dh_auto_test but there are maybe other situations where this is useful. regards Eugen >> >> >> Cheers >> >> Fred >> >> -- >> To UNSUBSCRIBE, email to debian-mentors-requ...@lists.debian.org >> with a subject of "unsubscribe". Trouble? Contact > listmas...@lists.debian.org >> Archive: > https://lists.debian.org/a2a20ec3b8560d408356cac2fc148e53b2177...@sun-dag3.synchrotron-soleil.fr >> > > I second what Fred said. > > The override on dh_auto_test exists for specific use cases where upstream > deviates from what dh can automatically detect wrt the test suite. > > Ghis >
signature.asc
Description: OpenPGP digital signature