Skip to content

Commit

Permalink
common: rationalize fault injection testing
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Michalski <jan.michalski@intel.com>
  • Loading branch information
janekmi committed Jul 25, 2023
1 parent 4ceb80b commit 514c7d8
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ jobs:
CONFIG: [
"OS=ubuntu OS_VER=22.04 MAKE_PKG=1 EXPERIMENTAL=y VALGRIND=0 NDCTL_ENABLE=n",
"OS=ubuntu OS_VER=22.04 MAKE_PKG=1 EXPERIMENTAL=y VALGRIND=0 NDCTL_ENABLE=n PMDK_CC=clang PMDK_CXX=clang++",
"OS=opensuse-leap OS_VER=15 FAULT_INJECTION=1 TEST_BUILD=debug",
"OS=opensuse-leap OS_VER=15 FAULT_INJECTION=1 TEST_BUILD=nondebug",
"OS=opensuse-leap OS_VER=15 TEST_BUILD=debug",
"OS=opensuse-leap OS_VER=15 TEST_BUILD=nondebug",
"OS=opensuse-leap OS_VER=15 MAKE_PKG=1 EXPERIMENTAL=y VALGRIND=0",
"OS=rockylinux OS_VER=8 TEST_BUILD=debug",
"OS=rockylinux OS_VER=8 TEST_BUILD=nondebug",
Expand Down
41 changes: 39 additions & 2 deletions .github/workflows/pmem_check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ on:
workflow_dispatch:
workflow_call:

env:
WORKDIR: utils/gha-runners

jobs:
linux:
name: PMEM_check
Expand All @@ -16,8 +19,6 @@ jobs:
matrix:
os: [[self-hosted, rhel],[self-hosted, opensuse]]
build: ['debug', 'nondebug', 'static_debug', 'static_nondebug']
env:
WORKDIR: utils/gha-runners

steps:
- name: Clone the git repo
Expand All @@ -39,3 +40,39 @@ jobs:

- name: Run tests (Python)
run: cd src/test/ && ./RUNTESTS.py -b ${{ matrix.build }}


fault_injection:
name: PMEM fault injection
runs-on: [self-hosted, rhel]
strategy:
fail-fast: false
matrix:
build: ['debug', 'nondebug']
env:
TEST_LABEL: fault_injection
TEST_BUILD: ${{ matrix.build }}

steps:
- name: Clone the git repo
uses: actions/checkout@v3
with:
repository: pmem/pmdk

- name: Get system information
run: ./$WORKDIR/get-system-info.sh

- name: Build
env:
FAULT_INJECTION: 1
run: ./$WORKDIR/build-pmdk.sh

- name: Create testconfig files
run: ./$WORKDIR/../create-testconfig.sh

- name: Run tests (Bash)
# TEST_BUILD and TEST_LABEL are taken directly from the environment
run: cd src/test/ && ./RUNTESTS.sh

- name: Run tests (Python)
run: cd src/test/ && ./RUNTESTS.py -b $TEST_BUILD --test-label $TEST_LABEL

0 comments on commit 514c7d8

Please sign in to comment.