Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 5 additions & 2 deletions ci/provisioning/post_provision_config_nodes_EL_8.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@
#
# SPDX-License-Identifier: BSD-2-Clause-Patent

PYTHON3_VERSION="3.11"

bootstrap_dnf() {
systemctl enable postfix.service
systemctl start postfix.service
Expand All @@ -19,8 +21,9 @@ distro_custom() {

# Use a more recent python version for unit testing, this allows us to also test installing
# pydaos into virtual environments.
dnf -y install python39 python39-devel
dnf -y install python3.11 python3.11-devel
dnf -y install python${PYTHON3_VERSION} python${PYTHON3_VERSION}-devel
sudo update-alternatives --set python3 /usr/bin/python${PYTHON3_VERSION}
update-alternatives --list
}

install_mofed() {
Expand Down
8 changes: 8 additions & 0 deletions ci/provisioning/post_provision_config_nodes_LEAP_15.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

PYTHON3_VERSION="311"

bootstrap_dnf() {
rm -rf "$REPOS_DIR"
ln -s ../zypp/repos.d "$REPOS_DIR"
Expand All @@ -16,4 +18,10 @@ distro_custom() {
sed -e '/MODULEPATH=/s/$/:\/usr\/share\/modules/' \
/etc/profile.d/lmod.sh; \
fi

# Use a more recent python version for unit testing, this allows us to also test installing
# pydaos into virtual environments.
dnf -y install python${PYTHON3_VERSION} python${PYTHON3_VERSION}-devel
sudo update-alternatives --set python3 /usr/bin/python${PYTHON3_VERSION}
update-alternatives --list python3
}
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>=103.0,<104.0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This range ensures we pick up any dot fixes to the 103 LTS release.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does ==103 not allow any 103.x point release? That was my experience with ==82.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to https://peps.python.org/pep-0440/#version-matching it looks like we could use ==103.*.

avocado-framework-plugin-result-html>=103.0,<104.0
avocado-framework-plugin-varianter-yaml-to-mux>=103.0,<104.0
clustershell
paramiko
distro
2 changes: 1 addition & 1 deletion src/tests/ftest/dfuse/simul.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ def run_simul(self, include=None, exclude=None, raise_exception=True):
self.fail("##Both include and exclude tests are selected both or empty.")

self.log_step("Running simul on %s", mpi_type)
return run_command(cmd, output_check="combined", raise_exception=raise_exception)
return run_command(cmd, raise_exception=raise_exception)

def test_posix_simul(self):
"""Test simul.
Expand Down
6 changes: 3 additions & 3 deletions src/tests/ftest/erasurecode/space_usage.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_ec_space_balanced_ec_4p1gx(self):
:avocado: tags=ec,ior,pool,query_targets
:avocado: tags=EcodSpaceUsage,test_ec_space_balanced_ec_4p1gx
"""
self._run_test(ior_namespace='/run/ior_ec_4p1gx/*')
self._execute_test(ior_namespace='/run/ior_ec_4p1gx/*')

def test_ec_space_balanced_ec_4p2gx(self):
"""Jira ID: DAOS-10912.
Expand All @@ -46,9 +46,9 @@ def test_ec_space_balanced_ec_4p2gx(self):
:avocado: tags=ec,ior,pool,query_targets
:avocado: tags=EcodSpaceUsage,test_ec_space_balanced_ec_4p2gx
"""
self._run_test(ior_namespace='/run/ior_ec_4p2gx/*')
self._execute_test(ior_namespace='/run/ior_ec_4p2gx/*')

def _run_test(self, ior_namespace):
def _execute_test(self, ior_namespace):
"""Run the test.

Args:
Expand Down
19 changes: 2 additions & 17 deletions src/tests/ftest/util/apricot/apricot/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from avocado import Test as avocadoTest
from avocado import TestFail, fail_on, skip
from avocado.core import exceptions
from avocado.core.teststatus import STATUSES_NOT_OK
from cart_ctl_utils import CartCtl
from ClusterShell.NodeSet import NodeSet
from command_utils_base import EnvironmentVariables
Expand Down Expand Up @@ -1364,27 +1365,11 @@ def report_timeout(self):
# dump engines ULT stacks upon test timeout
self.dump_engines_stacks("Test has timed-out")

def fail(self, message=None):
"""Dump engines ULT stacks upon test failure."""
self.dump_engines_stacks("Test has failed")
super().fail(message)

def error(self, message=None):
# pylint: disable=arguments-renamed
"""Dump engines ULT stacks upon test error."""
self.dump_engines_stacks("Test has errored")
super().error(message)

def tearDown(self):
"""Tear down after each test case."""

# dump engines ULT stacks upon test failure
# check of Avocado test status during teardown is presently useless
# and about same behavior has been implemented by adding both fail()
# error() method above, to overload the methods of Avocado base Test
# class (see DAOS-1452/DAOS-9941 and Avocado issue #5217 with
# associated PR-5224)
if self.status is not None and self.status != 'PASS' and self.status != 'SKIP':
if self.status is not None and self.status in STATUSES_NOT_OK:
self.dump_engines_stacks("Test status is {}".format(self.status))

# Report whether or not the timeout has expired
Expand Down
3 changes: 1 addition & 2 deletions src/tests/ftest/util/command_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ def _run_process(self, raise_exception=None):

self.result = run_command(
command, self.timeout, self.verbose, raise_exception,
self.output_check, env=self.env)
env=self.env)

except DaosTestError as error:
# Command failed or possibly timed out
Expand Down Expand Up @@ -284,7 +284,6 @@ def _run_subprocess(self):
kwargs = {
"cmd": str(self),
"verbose": self.verbose,
"allow_output_check": "combined",
"shell": False,
"env": self.env,
"sudo": self.sudo,
Expand Down
13 changes: 1 addition & 12 deletions src/tests/ftest/util/general_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,7 @@ def bytes_to_human(size, digits=2, binary=True):
return "".join([str(round(value[0], digits)), value[1]])


def run_command(command, timeout=60, verbose=True, raise_exception=True,
output_check="both", env=None):
def run_command(command, timeout=60, verbose=True, raise_exception=True, env=None):
"""Run the command on the local host.

This method uses the avocado.utils.process.run() method to run the specified
Expand All @@ -107,15 +106,6 @@ def run_command(command, timeout=60, verbose=True, raise_exception=True,
stdout/stderr. Defaults to True.
raise_exception (bool, optional): whether to raise an exception if the
command returns a non-zero exit status. Defaults to True.
output_check (str, optional): whether to record the output from the
command (from stdout and stderr) in the test output record files.
Valid values:
"stdout" - standard output *only*
"stderr" - standard error *only*
"both" - both standard output and error in separate files
"combined" - standard output and error in a single file
"none" - disable all recording
Defaults to "both".
env (dict, optional): dictionary of environment variable names and
values to set when running the command. Defaults to None.

Expand Down Expand Up @@ -144,7 +134,6 @@ def run_command(command, timeout=60, verbose=True, raise_exception=True,
"timeout": timeout,
"verbose": verbose,
"ignore_status": not raise_exception,
"allow_output_check": output_check,
"shell": False,
"env": env,
}
Expand Down