[Avocado-devel] Howto change Avocado Data Directories ?

Andrei Stepanov astepano at redhat.com
Tue Sep 8 15:32:07 UTC 2015


As you can see I tried to change tree config files:

./scripts/avocado config --datadir
Config files read (in order):
    /mnt/tests/spice/qe-tests/avocado/etc/avocado/avocado.conf
    /mnt/tests/spice/qe-tests/avocado/etc/avocado/conf.d/gdb.conf
    /mnt/tests/spice/qe-tests/avocado/etc/avocado/conf.d/vt.conf


head /mnt/tests/spice/qe-tests/avocado/etc/avocado/avocado.conf
[datadir.paths]
# Avocado data dir (holds tests and test auxiliary data, such as ISO files).
base_dir = /mnt/tests/spice/qe-tests/avocado_run



On Tue, Sep 8, 2015 at 5:27 PM, Lucas Meneghel Rodrigues <lmr at redhat.com>
wrote:

>
>
> On Tue, Sep 8, 2015 at 11:58 AM, Andrei Stepanov <astepano at redhat.com>
> wrote:
>
>> Hello
>>
>> I have tried different approaches to get base dir different from
>> /var/lib/avocado
>>
>> But all the same. It takes /var/lib/avocado no matter what.
>>
>> What is right approach ?
>>
>> # ./scripts/avocado config --datadir
>> Config files read (in order):
>>     /mnt/tests/spice/qe-tests/avocado/etc/avocado/avocado.conf
>>     /mnt/tests/spice/qe-tests/avocado/etc/avocado/conf.d/gdb.conf
>>     /mnt/tests/spice/qe-tests/avocado/etc/avocado/conf.d/vt.conf
>>
>> Avocado replaces config dirs that can't be accessed
>> with sensible defaults. Please edit your local config
>> file to customize values
>>
>> Avocado Data Directories:
>>     base     /var/lib/avocado
>>     tests    /mnt/tests/spice/qe-tests/avocado/examples/tests
>>     data     /var/lib/avocado/data
>>     logs     /var/lib/avocado/job-results
>>
>>
>>
>> # head /mnt/tests/spice/qe-tests/avocado/etc/avocado/avocado.conf
>> [datadir.paths]
>> # Avocado data dir (holds tests and test auxiliary data, such as ISO
>> files).
>> #base_dir = /usr/share/avocado
>> base_dir = /mnt/tests/spice/qe-tests/avocado_run
>>
>
> I've just tried the following to ensure there wasn't any new crazy bug:
>
>
> vim ~/.config/avocado/avocado.conf
> ...
> [datadir.paths]
> base_dir = /tmp/sbruble-avocado
> logs_dir = /tmp/sbruble-avocado/job-results
>
>
> avocado config --datadir
> Config files read (in order):
>    /etc/avocado/avocado.conf
>    /etc/avocado/conf.d/gdb.conf
>    /home/lmr/.config/avocado/avocado.conf
>
> Avocado replaces config dirs that can't be accessed
> with sensible defaults. Please edit your local config
> file to customize values
>
> Avocado Data Directories:
>    base     /tmp/sbruble-avocado
>    tests    /home/lmr/avocado/tests
>    data     /home/lmr/avocado/data
>    logs     /tmp/sbruble-avocado/job-results
>
> avocado run /bin/true
> JOB ID     : b62b64a632c53d2d21550ca4429b292f60223053
> JOB LOG    :
> /tmp/sbruble-avocado/job-results/job-2015-09-08T12.08-b62b64a/job.log
> TESTS      : 1
> (1/1) /bin/true: PASS (0.00 s)
> RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0
> TIME       : 0.00 s
>
> So the configurable locations feature is working as expected. Keep in mind
> that if you are running from git repos, then you have to modify the in tree
> config files. I've fixed the avocado configuration in PR
> https://github.com/avocado-framework/avocado/pull/778 to make the
> alternate location explicit.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20150908/6b21869d/attachment.htm>


More information about the Avocado-devel mailing list