Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test_dir is not resolved from avocado.conf #5571

Closed
narasimhan-v opened this issue Jan 6, 2023 · 4 comments
Closed

test_dir is not resolved from avocado.conf #5571

narasimhan-v opened this issue Jan 6, 2023 · 4 comments
Labels

Comments

@narasimhan-v
Copy link
Contributor

narasimhan-v commented Jan 6, 2023

Describe the bug
test_dir is not resolved properly

Steps to reproduce
install latest avocado from git.
set config at ~/.config/avocado/avocado.conf

Expected behavior
test_dir processed in config is resolved

Current behavior
test_dir is currently not resolved

System information (please complete the following information):

  • OS: RHEL 9
  • Avocado version: Avocado 99.0
  • Avocado installation method: github

Additional information

# avocado list avocado-misc-tests/io/disk/ioping.py

# avocado list tests/avocado-misc-tests/io/disk/ioping.py
avocado-instrumented tests/avocado-misc-tests/io/disk/ioping.py:Ioping.test



# pwd
/root/sim/v99/tests



# cat /root/.config/avocado/avocado.conf
[datadir.paths]
base_dir = /root/sim/v99/tests
test_dir = /root/sim/v99/tests/tests
data_dir = /root/sim/v99/tests/data
logs_dir = /root/sim/v99/tests/results

[sysinfo.collect]
enabled = on
profiler = True
per_test = True
optimize = True

[sysinfo.collectibles]
commands = /root/sim/v99/tests/config/sysinfo/commands
fail_commands = /root/sim/v99/tests/config/sysinfo/fail_commands
files = /root/sim/v99/tests/config/sysinfo/files
fail_files = /root/sim/v99/tests/config/sysinfo/fail_files
profilers = /root/sim/v99/tests/config/sysinfo/profilers



# avocado config
Config files read (in order, '*' means the file exists and had been read):
      /etc/avocado/avocado.conf
    * /root/.config/avocado/avocado.conf

    Section.Key                              Value
    assets.fetch.ignore_errors               False
    assets.fetch.references                  []
    assets.fetch.timeout                     300
    assets.list.days                         None
    assets.list.overall_limit                None
    assets.list.size_filter                  None
    assets.purge.days                        None
    assets.purge.overall_limit               None
    assets.purge.size_filter                 None
    assets.register.name                     None
    assets.register.sha1_hash                None
    assets.register.url                      None
    cache.clear                              []
    cache.list                               []
    config.datadir                           False
    core.paginator                           False
    core.show                                {'app'}
    core.verbose                             False
    datadir.paths.base_dir                   /root/sim/v99/tests
    datadir.paths.cache_dirs                 ['/root/avocado/data/cache']
    datadir.paths.data_dir                   /root/sim/v99/tests/data
    datadir.paths.logs_dir                   /root/sim/v99/tests/results
    datadir.paths.test_dir                   /root/sim/v99/tests/tests
    diff.create_reports                      False
    diff.filter                              ['cmdline', 'time', 'variants', 'results', 'config', 'sysinfo']
    diff.html                                None
    diff.jobids                              []
    diff.open_browser                        False
    diff.strip_id                            False
    distro.distro_def_arch
    distro.distro_def_create                 False
    distro.distro_def_name
    distro.distro_def_path
    distro.distro_def_release
    distro.distro_def_type
    distro.distro_def_version
    filter.by_tags.include_empty             False
    filter.by_tags.include_empty_key         False
    filter.by_tags.tags                      []
    human_ui.omit.statuses                   []
    job.output.loglevel                      DEBUG
    job.output.testlogs.logfiles             ['debug.log']
    job.output.testlogs.statuses             []
    job.output.testlogs.summary_statuses     ['FAIL', 'ERROR']
    job.replay.source_job_id                 latest
    job.run.result.html.enabled              True
    job.run.result.html.open_browser         False
    job.run.result.html.output               None
    job.run.result.json.enabled              True
    job.run.result.json.output               None
    job.run.result.tap.enabled               True
    job.run.result.tap.include_logs          False
    job.run.result.tap.output                None
    job.run.result.xunit.enabled             True
    job.run.result.xunit.job_name            None
    job.run.result.xunit.max_test_log_chars  100000
    job.run.result.xunit.output              None
    job.run.store_logging_stream             ['avocado.core:DEBUG']
    job.run.timeout                          0
    jobs.show.job_id                         latest
    json.variants.load                       None
    list.recipes.write_to_directory          None
    list.write_to_json_file                  None
    plugins.cache.order                      []
    plugins.cli.cmd.order                    []
    plugins.cli.order                        []
    plugins.disable                          []
    plugins.init.order                       []
    plugins.job.prepost.order                []
    plugins.jobscripts.post                  /etc/avocado/scripts/job/post.d/
    plugins.jobscripts.pre                   /etc/avocado/scripts/job/pre.d/
    plugins.jobscripts.warn_non_existing_dir False
    plugins.jobscripts.warn_non_zero_status  True
    plugins.ordered_list                     False
    plugins.resolver.order                   []
    plugins.result.order                     []
    plugins.result_events.order              []
    plugins.runnable.runner.order            []
    plugins.skip_broken_plugin_notification  []
    plugins.spawner.order                    []
    plugins.suite.runner.order               []
    plugins.test.pre.order                   []
    plugins.varianter.order                  []
    resolver.references                      []
    run.dict_variants                        []
    run.dict_variants.variant_id_keys        []
    run.dry_run.enabled                      False
    run.dry_run.no_cleanup                   False
    run.execution_order                      variants-per-test
    run.failfast                             False
    run.ignore_missing_references            False
    run.job_category                         None
    run.journal.enabled                      False
    run.keep_tmp                             False
    run.log_test_data_directories            False
    run.max_parallel_tasks                   128
    run.results.archive                      False
    run.results_dir                          None
    run.shuffle                              False
    run.spawner                              process
    run.status_server_auto                   True
    run.status_server_buffer_size            33554432
    run.status_server_listen                 127.0.0.1:8888
    run.status_server_uri                    127.0.0.1:8888
    run.suite_runner                         nrunner
    run.test_parameters                      []
    run.unique_job_id                        None
    runner.exectest.exitcodes.skip           []
    runner.identifier_format                 {uri}
    runner.output.color                      auto
    runner.output.colored                    True
    runner.timeout.after_interrupted         60
    runner.timeout.process_alive             60
    runner.timeout.process_died              10
    simpletests.status.failure_fields        ['status', 'stdout', 'stderr']
    simpletests.status.skip_location         all
    simpletests.status.skip_regex            ^SKIP$
    simpletests.status.warn_location         all
    simpletests.status.warn_regex            ^WARN$
    spawner.podman.avocado_spawner_egg       None
    spawner.podman.bin                       /usr/bin/podman
    spawner.podman.image                     rhel:9
    sysinfo.collect.commands_timeout         -1
    sysinfo.collect.enabled                  True
    sysinfo.collect.installed_packages       False
    sysinfo.collect.locale                   C
    sysinfo.collect.optimize                 True
    sysinfo.collect.profiler                 True
    sysinfo.collect.sysinfodir               None
    sysinfo.collectibles.commands            /root/sim/v99/tests/config/sysinfo/commands
    sysinfo.collectibles.fail_commands       /root/sim/v99/tests/config/sysinfo/fail_commands
    sysinfo.collectibles.fail_files          /root/sim/v99/tests/config/sysinfo/fail_files
    sysinfo.collectibles.files               /root/sim/v99/tests/config/sysinfo/files
    sysinfo.collectibles.profilers           /root/sim/v99/tests/config/sysinfo/profilers
    task.timeout.running                     None
    variants.contents                        False
    variants.debug                           False
    variants.inherit                         False
    variants.json_variants_dump              None
    variants.summary                         0
    variants.tree                            False
    variants.variants                        1
    vmimage.get.arch                         None
    vmimage.get.distro                       None
    vmimage.get.version                      None
    yaml_to_mux.files                        []
    yaml_to_mux.filter_only                  []
    yaml_to_mux.filter_out                   []
    yaml_to_mux.inject                       []
    yaml_to_mux.parameter_paths              ['/run/*']

@richtja
Copy link
Contributor

richtja commented Jan 9, 2023

Hi @narasimhan-v the test_dir property is legacy feature and it doesn't work with new resolver mechanism. We deprecated the old legacy runner and old listing, but we forgot to remove also the test_dir. Thank you for pointing this out. Can you please describe your use-case for test_dir maybe it is something that we should consider and create a mechanism for discovering tests in directory. Do you have any reason not to run avocado from /root/sim/v99/tests/ or add absolute path to the tests? Thanks for your help.

@narasimhan-v
Copy link
Contributor Author

Hi @richtja the need for running from a different location is to make sure we are able to trigger avocado from a different location where we have wrapper scripts which run multiple tests in a specific sequence. So we use tests_dir to point. Adding absolute paths does work, but it would make each line in the test config a bit longer unnecessarily.

Would be helpful if we are able to get tests_dir or any other property to resolve this.

@richtja
Copy link
Contributor

richtja commented Jan 12, 2023

Hi @narasimhan-v, I opened #5576 to better tract this feature. If you are interested in this, your contribution is more than welcome.

I am closing this, but if you have any other comments, feel free to reopen it.

@richtja richtja closed this as completed Jan 12, 2023
@narasimhan-v
Copy link
Contributor Author

Sure @richtja

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

No branches or pull requests

2 participants