Hi Vasil,

Thanks for the quick reply. Indeed, it is related to that issue, and make
test does not work without installing it first. However, the linked fixes
did not work for me, and I think the reason is that in GNURadio 3.10
changes the module  located to test_modules/gnuradio/modulename from
test_modules/modulename.

1. Gnuradio 3.10 uses "from gnuradio.modulename import xyz" (and 3.9 seems
to use "from modulename import xyz")
2. Once "from gnuradio import gr" is executed prior to that, then the
gnuradio library is loaded, and even if we update the sys.path the "from
gnuradio.modulename import xyz" will use the path of the gnuradio module to
look up the OOT submodule, and it will never find the test_modules
directory.

In the end I could not find any other solution than reverting back to the
"testmodules/modulename" output directory in cmake, and using "import
modulename" inside the QA code. So I am sceptical whether it is possible to
run make test for a gnuradio 3.10 OOT module without installing it.

Best,
Miklos



On Wed, Mar 2, 2022 at 1:26 AM Vasil Velichkov <vvvelich...@gmail.com>
wrote:

> Hi Milkos,
>
> Your problem seems related to [1]. Make sure your gnuradio version does
> include the fix from [2] and your OOT CMakeLists.txt contains [3]
>
> [1] https://github.com/gnuradio/gnuradio/issues/4825
> [2] https://github.com/gnuradio/gnuradio/pull/5279
> [3]
> https://wiki.gnuradio.org/index.php/GNU_Radio_3.9_OOT_Module_Porting_Guide#CMakeLists.txt_changes_to_fix_OOT_module_testing
>
> Regards,
> Vasil
>
> On 02/03/2022 05.19, Miklos Maroti wrote:
> > Dear All,
> >
> > I have a GNURadio 3.10 OOT module which has C++ blocks and python QA
> code.
> > During my development I do the following steps:
> >
> > 1. make
> > 2. make test
> > 3. make install
> > 4. change c++ files
> > 5. make
> > 6. make test
> >
> > At the last step the python QA code will link the already installed
> python
> > library and not the latest one within the build folder. The QA code
> should
> > link the latest python and c++ libraries from the build directory, and
> > there should be no "smartness" (except ImportError) in the QA boilerplate
> > code.
> >
> > I have tried to trick python3 by changing the sys.path prior to the
> import
> > statement, but this fails. Somehow once you have imported gnuradio from
> the
> > stock include path, then changing the sys.path even to the empty list
> will
> > not prevent the loading of the installed OOT module.
> >
> > Has anyone seen this behaviour? Is there a workaround?
> >
> > Best,
> > Miklos
> >
>
>

Reply via email to