Skip to content

Commit

Permalink
DAOS-12950 test: auto-determine test tags
Browse files Browse the repository at this point in the history
Skip-func-hw-test: true
Skip-unit-tests: true
Skip-fault-injection-test: true

- Add a tool to:
  - automatically determine test tags based on files modified.
  - run a lint check on ftest tags
- Add a GHA job for runnings ftest tag lint
- Update Jenkinsfile Get Commit Message stage to inject Test-tag from
  the new utility

Required-githooks: true

Signed-off-by: Dalton Bohning <[email protected]>
  • Loading branch information
daltonbohning committed Nov 9, 2023
1 parent d0f71a3 commit 57b4e09
Show file tree
Hide file tree
Showing 11 changed files with 658 additions and 8 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,14 @@ jobs:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check DAOS logging macro use.
run: ./utils/cq/d_logging_check.py --github src

ftest-tags:
name: Ftest tag check
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Check DAOS ftest tags.
run: ./src/tests/ftest/tags.py lint
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ pipeline {
stage('Get Commit Message') {
steps {
script {
env.COMMIT_MESSAGE = sh(script: 'git show -s --format=%B',
env.COMMIT_MESSAGE = sh(script: 'src/tests/ftest/tags.py pragmas --use-commit --target origin/' + target_branch,
returnStdout: true).trim()
Map pragmas = [:]
// can't use eachLine() here: https://issues.jenkins.io/browse/JENKINS-46988/
Expand Down
1 change: 1 addition & 0 deletions src/container/srv_container.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
/**
* \file
*
* dummy change
* ds_cont: Container Operations
*
* This file contains the server API methods and the RPC handlers that are both
Expand Down
1 change: 1 addition & 0 deletions src/tests/ftest/datamover/dst_create.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Dummy change
hosts:
test_servers: 1
test_clients: 1
Expand Down
2 changes: 2 additions & 0 deletions src/tests/ftest/dfuse/mu_mount.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
from dfuse_test_base import DfuseTestBase
from run_utils import command_as_user, run_remote

# Dummy change


class DfuseMUMount(DfuseTestBase):
"""Verifies multi-user dfuse mounting"""
Expand Down
2 changes: 2 additions & 0 deletions src/tests/ftest/dfuse/mu_perms.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
from run_utils import command_as_user, run_remote
from user_utils import get_chown_command

# Dummy change


class DfuseMUPerms(DfuseTestBase):
"""Verify dfuse multi-user basic permissions."""
Expand Down
10 changes: 5 additions & 5 deletions src/tests/ftest/nvme/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def container_read(container, array_size=None):
# read written objects and verify
container.read_objects()

def test_runner(self, namespace, record_size, array_size, thread_per_size=4):
def run_test(self, namespace, record_size, array_size, thread_per_size=4):
"""Perform simultaneous writes of varying record size to a container.
Args:
Expand Down Expand Up @@ -143,7 +143,7 @@ def test_nvme_object_single_pool(self):
:avocado: tags=NvmeObject,test_nvme_object_single_pool
"""
# perform multiple object writes to a single pool
self.test_runner("/run/pool_1/*", self.record_size[:-1], 0, self.array_size)
self.run_test("/run/pool_1/*", self.record_size[:-1], 0, self.array_size)
report_errors(self, self.errors)

@avocado.fail_on(DaosApiError)
Expand All @@ -165,7 +165,7 @@ def test_nvme_object_multiple_pools(self):
:avocado: tags=NvmeObject,test_nvme_object_multiple_pools
"""
# thread to perform simultaneous object writes to multiple pools
runner_manager = ThreadManager(self.test_runner, self.get_remaining_time() - 30)
runner_manager = ThreadManager(self.run_test, self.get_remaining_time() - 30)
runner_manager.add(
namespace='/run/pool_1/*', record_size=self.record_size, array_size=self.array_size)
runner_manager.add(
Expand All @@ -178,6 +178,6 @@ def test_nvme_object_multiple_pools(self):
self.errors.append(result.result)
report_errors(self, self.errors)

# run the test_runner after cleaning up all the pools for large nvme_pool size
self.test_runner("/run/pool_3/*", self.record_size, self.array_size)
# run again after cleaning up all the pools for large nvme_pool size
self.run_test("/run/pool_3/*", self.record_size, self.array_size)
report_errors(self, self.errors)
Loading

0 comments on commit 57b4e09

Please sign in to comment.