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

DAOS-15234 test: Better integrate with avocado 92 #13595

Closed
wants to merge 107 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
107 commits
Select commit Hold shift + click to select a range
510b4c8
DAOS-14369 ftest: Use a common avocado version everywhere.
ashleypittman Jan 4, 2024
7a549a3
Change install and remove patches.
ashleypittman Jan 4, 2024
ae027be
Copy requirments file.
ashleypittman Jan 4, 2024
2a00bc9
Downgrade avocado version.
ashleypittman Jan 4, 2024
dbb2e24
Copy both requirments.txt files and remove isort.
ashleypittman Jan 4, 2024
33b6701
Search all python passages.
ashleypittman Jan 4, 2024
ca698eb
Cahnge el8 to use python 3.9
ashleypittman Jan 4, 2024
73584ad
Change python install command.
ashleypittman Jan 4, 2024
a39147a
Bump versions again now I've updated python.
ashleypittman Jan 4, 2024
e248ae2
Change pip setup slightly, remove debug and disable pydaos test.
ashleypittman Jan 4, 2024
f83ac6e
Change the pip cmd and disable se test.
ashleypittman Jan 4, 2024
9af394d
Drop avocado version.
ashleypittman Jan 4, 2024
d9af6ee
Add debugging.
ashleypittman Jan 4, 2024
351e4fd
Try and install pydaos.
ashleypittman Jan 4, 2024
5fc5bbd
Log python version in launch.py
ashleypittman Jan 4, 2024
862aab7
Add some debugging and pin to 82.0
ashleypittman Jan 4, 2024
ec9e33e
Add debugging.
ashleypittman Jan 4, 2024
b57c5dd
Fix a crash in log parsing.
ashleypittman Jan 4, 2024
c04df21
Use python3
ashleypittman Jan 5, 2024
461e820
Do not catch exception from launch.py
ashleypittman Jan 5, 2024
6a6e566
Back out rpm change.
ashleypittman Jan 5, 2024
0ff60b0
Fix my python bug.
ashleypittman Jan 5, 2024
a9d12e6
Do not bump python version.
ashleypittman Jan 5, 2024
1879b9e
Remove isort argaion.
ashleypittman Jan 5, 2024
5a60ec9
Disable missing packages.
ashleypittman Jan 5, 2024
141f4d9
Split apart the requirments files.
ashleypittman Jan 5, 2024
54c1e85
Install utest packages in docker.
ashleypittman Jan 5, 2024
d525cdc
Move some packages.
ashleypittman Jan 5, 2024
b22f741
Check the yaml version.
ashleypittman Jan 5, 2024
3bb18a6
Use a venv for avocado.
ashleypittman Jan 5, 2024
a65ff71
Fix shellcheck.
ashleypittman Jan 5, 2024
e0e0ddd
Put the venv in a different location.
ashleypittman Jan 5, 2024
62ba681
Allow for older versions of pip.
ashleypittman Jan 5, 2024
d716fae
Do not configure pip.
ashleypittman Jan 8, 2024
7b9b060
Include an extra package.
ashleypittman Jan 8, 2024
c9f179f
Append the correct path.
ashleypittman Jan 8, 2024
75b6422
Install gdb, bump to avocado 83 and remove debug/tidy up.
ashleypittman Jan 8, 2024
b674e66
Set version back to 82 and change PATHS
ashleypittman Jan 8, 2024
cb1b325
Add the python sources to daos-devel and add it as a ftest requirment.
ashleypittman Jan 8, 2024
ee8240e
Fix python packaging.
ashleypittman Jan 8, 2024
6dd81e3
Tidy up utest and use python 3.9 for testing.
ashleypittman Jan 8, 2024
e121e84
Tidy up python and install pydaos for ftest.
ashleypittman Jan 8, 2024
719fa9d
Update ansible to use version 82 as well.
ashleypittman Jan 8, 2024
86abe75
Install correct packages for leap.
ashleypittman Jan 8, 2024
66104b1
Do not configure pip on 3.6
ashleypittman Jan 9, 2024
f3e3718
Use the correct python variable.
ashleypittman Jan 9, 2024
a5a2a71
Tidy up a lot of stale python code to handle older avocado versions.
ashleypittman Jan 9, 2024
411855c
Remove python param.
ashleypittman Jan 9, 2024
03e153f
Add debugging.
ashleypittman Jan 9, 2024
6a96c54
Add some debugging for failure.
ashleypittman Jan 9, 2024
8ef1c67
Add even more failure debug.
ashleypittman Jan 9, 2024
09af84c
Add a call to avocado confiug.
ashleypittman Jan 9, 2024
d41aa02
Revert import change.
ashleypittman Jan 9, 2024
81cf462
Re-run with my longer failing test.
ashleypittman Jan 9, 2024
90bd191
Merge branch 'master' into amd/avocado-version
ashleypittman Jan 10, 2024
73d9e46
Install ftest-reqs file in rpm. Install it for testing.
ashleypittman Jan 11, 2024
209b190
Use correct path and python binaries.
ashleypittman Jan 11, 2024
bccaeee
Add ftest to docker.
ashleypittman Jan 11, 2024
1fbe579
Fix pip for rpm testing and change docker ftest name.
ashleypittman Jan 11, 2024
a18674f
Tidy up
ashleypittman Jan 11, 2024
10be0b8
Fix req file.
ashleypittman Jan 11, 2024
bfdcf75
Change rpm test again.
ashleypittman Jan 11, 2024
6e3af8d
Skip a python3 issue.
ashleypittman Jan 11, 2024
347d7fa
Merge branch 'master' into amd/avocado-version
ashleypittman Jan 11, 2024
a3d488c
Fix a comment.
ashleypittman Jan 11, 2024
88dbffd
Tidy up and repush.
ashleypittman Jan 11, 2024
4ed9af6
Update daos-test rpm deps.
ashleypittman Jan 12, 2024
656e9e9
Re-instate use of env for python files.
ashleypittman Jan 12, 2024
3ab9297
Re-add failing check.
ashleypittman Jan 12, 2024
6d8532e
Fix spelling mistake.
ashleypittman Jan 12, 2024
5b90c81
Use correct python under sudo.
ashleypittman Jan 12, 2024
8e03422
Use python to launch python scripts.
ashleypittman Jan 12, 2024
97ebaac
Run full daily regresssion suite.
ashleypittman Jan 12, 2024
e6e4c80
Merge branch 'master' into amd/avocado-version
ashleypittman Jan 15, 2024
57bd143
Remove extra assignment and add comment, run full daily suite.
ashleypittman Jan 15, 2024
584bacb
Bump avocado to 92
ashleypittman Jan 12, 2024
9897c78
Use new json command for fetching test list.
ashleypittman Jan 15, 2024
f3d8587
Take on review feedback.
ashleypittman Jan 16, 2024
e4ce1a7
Tweak cart path incluides.
ashleypittman Jan 16, 2024
2a9d4d7
Merge branch \'amd/avocado-version-92\' into origin/amd/avocado-version
ashleypittman Jan 16, 2024
1b85b7f
Merge branch 'master' into amd/avocado-version
ashleypittman Jan 18, 2024
0e2a2b4
Change setup for mpiio
ashleypittman Jan 18, 2024
b1c4d81
Load mpi before install python
ashleypittman Jan 18, 2024
b2dcc7a
Remove mpi4py tests.
ashleypittman Jan 18, 2024
9808158
Do not install mpi4py
ashleypittman Jan 18, 2024
da604ef
Merge branch 'amd/avocado-version' into amd/avocado-version-92
ashleypittman Jan 19, 2024
945933b
Fix yaml parsing of test names.
ashleypittman Jan 19, 2024
f58a429
Tweak .build_vars.sh file.
ashleypittman Jan 19, 2024
7773c22
Do not install the build_var files.
ashleypittman Jan 19, 2024
e2f44e6
Remove packing files from debian.
ashleypittman Jan 22, 2024
d478861
Do not open build file on each test.
ashleypittman Jan 22, 2024
5686e5c
Merge branch 'master' into amd/avocado-version
ashleypittman Jan 22, 2024
2428d13
Do not require build vars file and runn full faily regression.
ashleypittman Jan 22, 2024
3b3fcfd
Fix python warning.
ashleypittman Jan 22, 2024
d2d8151
Change setup.py and run daily regression.
ashleypittman Jan 22, 2024
5551a58
Merge branch 'master' into amd/avocado-version
ashleypittman Jan 23, 2024
3676719
Update GitHub actions to use pip rather than setup.py
ashleypittman Jan 23, 2024
e6ce4c2
Merge branch 'master' into amd/avocado-version
ashleypittman Jan 30, 2024
7381927
Update pydaos to use d_getenv_bool
ashleypittman Jan 30, 2024
a337a8a
Merge branch 'master' into amd/avocado-version
ashleypittman Feb 2, 2024
c64dc99
Bump rpm metadata and run daily testing.
ashleypittman Feb 2, 2024
e563b89
Merge branch 'amd/avocado-version' into amd/avocado-version-92
ashleypittman Feb 2, 2024
fed6396
Fix two tpyos.
ashleypittman Feb 2, 2024
6bed854
Merge branch 'master' into amd/avocado-version-92
ashleypittman Apr 5, 2024
596907b
Fix merge.
ashleypittman Apr 5, 2024
5196359
Merge branch 'master' into amd/avocado-version-92
ashleypittman Apr 9, 2024
982b410
Remove dead code.
ashleypittman Apr 9, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions requirements-ftest.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
avocado-framework==82
avocado-framework-plugin-result-html==82
avocado-framework-plugin-varianter-yaml-to-mux==82
avocado-framework==92
avocado-framework-plugin-result-html==92
avocado-framework-plugin-varianter-yaml-to-mux==92
clustershell
paramiko
distro
20 changes: 0 additions & 20 deletions src/tests/ftest/util/avocado_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,26 +160,6 @@ def get_directory(self, directory):
logs_dir = self.get_logs_dir()
return os.path.join(logs_dir, directory)

def get_list_command(self):
"""Get the avocado list command for this version of avocado.

Returns:
list: avocado list command parts
"""
if self.major >= 83:
return ["avocado", "list"]
return ["avocado", "--paginator=off", "list"]

def get_list_regex(self):
"""Get the regular expression used to get the test file from the avocado list command.

Returns:
str: regular expression to use to get the test file from the avocado list command output
"""
if self.major >= 92:
return r"avocado-instrumented\s+(.*):"
return r"INSTRUMENTED\s+(.*):"

def get_run_command(self, test, tag_filters, sparse, failfast):
"""Get the avocado run command for this version of avocado.

Expand Down
56 changes: 41 additions & 15 deletions src/tests/ftest/util/launch_utils.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
"""
(C) Copyright 2022-2023 Intel Corporation.
(C) Copyright 2022-2024 Intel Corporation.

SPDX-License-Identifier: BSD-2-Clause-Patent
"""
# pylint: disable=too-many-lines
import json
import logging
import os
import re
import sys
import tempfile
import time
from pathlib import Path

Expand Down Expand Up @@ -794,21 +796,45 @@ def list_tests(self, logger, verbose):
tag = ",".join((tag, fault_tag))
self.tag_filters.append(f"--filter-by-tags={tag}")

# Get the avocado list command to find all the tests that match the specified files and tags
command = self._avocado.get_list_command()
command.extend(self.tag_filters)
command.extend(test_files)
if not test_files:
command.append("./")
if self._avocado.major > 82:
with tempfile.NamedTemporaryFile() as tmpf:
command = ["avocado", "list", "--json", tmpf.name]
command.extend(self.tag_filters)
command.extend(test_files)
if not test_files:
command.append("./")

# Find all the test files that contain tests matching the tags
logger.debug("-" * 80)
logger.info("Detecting tests matching tags: %s", " ".join(command))
run_local(logger, " ".join(command), check=True)
data = json.load(tmpf)
index = 1
for test in data:
if test["Type"] != "avocado-instrumented":
continue
test_name = test["Test"].split(":")[0]
self.tests.append(TestInfo(test_name, index, self._yaml_extension))
index += 1
logger.info(" %s", self.tests[-1])

# Find all the test files that contain tests matching the tags
logger.debug("-" * 80)
logger.info("Detecting tests matching tags: %s", " ".join(command))
output = run_local(logger, " ".join(command), check=True)
unique_test_files = set(re.findall(self._avocado.get_list_regex(), output.stdout))
for index, test_file in enumerate(unique_test_files):
self.tests.append(TestInfo(test_file, index + 1, self._yaml_extension))
logger.info(" %s", self.tests[-1])
else:
# Get the avocado list command to find all the tests that match the specified files and
# #tags
command = ["avocado", "--paginator=off", "list"]
command.extend(self.tag_filters)
command.extend(test_files)
if not test_files:
command.append("./")

# Find all the test files that contain tests matching the tags
logger.debug("-" * 80)
logger.info("Detecting tests matching tags: %s", " ".join(command))
output = run_local(logger, " ".join(command), check=True)
unique_test_files = set(re.findall(r"INSTRUMENTED\s+(.*):", output.stdout))
for index, test_file in enumerate(unique_test_files):
self.tests.append(TestInfo(test_file, index + 1, self._yaml_extension))
logger.info(" %s", self.tests[-1])

# List all of the possible tags if no matches where found and verbose is set
if not self.tests and verbose:
Expand Down
2 changes: 1 addition & 1 deletion utils/ansible/ftest/vars/defaults.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Install dependencies of a development node

daos_avocado_version_default: 2.4.3
daos_avocado_framework_version_default: 82
daos_avocado_framework_version_default: 92
Loading