[GRASS-dev] Testsuite: script for easier use of test framework

Markus Neteler neteler at osgeo.org
Tue Jan 22 01:29:51 PST 2019


On Tue, Jan 22, 2019 at 4:14 AM Vaclav Petras <wenzeslaus at gmail.com> wrote:
>
>
>
> On Mon, Jan 21, 2019 at 5:34 PM Markus Neteler <neteler at osgeo.org> wrote:
>>
>> On Mon, Jan 21, 2019 at 11:14 PM Vaclav Petras <wenzeslaus at gmail.com> wrote:
>> > On Mon, Jan 21, 2019 at 3:59 PM Markus Neteler <neteler at osgeo.org> wrote:
>> >> On Mon, Jan 21, 2019 at 9:34 PM Vaclav Petras <wenzeslaus at gmail.com> wrote:
>> ...
>> >> > OK, this raises the question if I should put the exact script I'm using at fatra.cnr.ncsu.edu to GRASS GIS code?
>> >>
>> >> Ah, in order to also run it directly, right?
>> >>
>> >> > I based the example in doc on that but considered the actual script as too specific (it needs to have the hardcoded paths anyway).
>> >>
>> >> Perhaps it might be the best to store the hardcoded paths in a
>> >> separate config file which is "source"d by the test script?
>> >
>> >
>> > That's a good idea. That way I we could actually run it directly without storing the specific settings in the source code.
>>
>> Changed in r73993.
>> Please try.
>
>
> How do you suggest to set path the config file to `source`? I don't have it in the current directory. Script parameter?

I have now added support for specifying the conf_file as a parameter in r73996..
Like this the user can have a local conf file and execute the script with that.

> Also, what do you think about keeping all the grass77, grass76, ... in the source code? I'm using the following in my script. Would that be understandable in the example?

Sorry, I don't get what you mean.

> # just get any file which is there (there is only one, but the name differs by version
> GRASSBIN="$GRASSSRC/bin.x86_64-pc-linux-gnu/grass*"

ok, in r73997 the ARCH is now autodetected.

> Otherwise, trying to align the two scripts, it seems I need to parametrize every task the script is doing (I want the compilation to keep more cores free,

customizable FREECPU also added to the conf_file.

> I don't need the download, untar and rename,

Could be customized as well.

> and I have different combination and names of locations).

We should control all this with your local config file - there will be
no way around it.

Markus


More information about the grass-dev mailing list