Skip to content

Commit 9e56870

Browse files
committed
refactor scripts and workflow: add PPC_DISABLE_VALGRIND check in test logic and update GitHub Actions for environment consistency
1 parent 004d097 commit 9e56870

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/ubuntu.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,11 +374,13 @@ jobs:
374374
env:
375375
PPC_NUM_THREADS: 2
376376
LLVM_PROFILE_FILE: "build/llvm_profile_%p_%m.profraw"
377+
PPC_DISABLE_VALGRIND: 1
377378
- name: Run tests (threads)
378379
run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4
379380
env:
380381
PPC_NUM_PROC: 1
381382
LLVM_PROFILE_FILE: "build/llvm_profile_%p_%m.profraw"
383+
PPC_DISABLE_VALGRIND: 1
382384
- name: Generate LLVM Coverage Data
383385
run: |
384386
scripts/generate_llvm_coverage.py \

scripts/run_tests.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ def __get_gtest_settings(repeats_count, type_task):
103103

104104
def run_threads(self):
105105
"""Run tests in threading mode."""
106-
if platform.system() == "Linux" and not self.__ppc_env.get("PPC_ASAN_RUN"):
106+
if (platform.system() == "Linux" and
107+
not self.__ppc_env.get("PPC_ASAN_RUN") and
108+
not self.__ppc_env.get("PPC_DISABLE_VALGRIND")):
107109
for task_type in ["seq", "stl"]:
108110
self.__run_exec(
109111
shlex.split(self.valgrind_cmd)
@@ -119,7 +121,9 @@ def run_threads(self):
119121

120122
def run_core(self):
121123
"""Run core functionality tests."""
122-
if platform.system() == "Linux" and not self.__ppc_env.get("PPC_ASAN_RUN"):
124+
if (platform.system() == "Linux" and
125+
not self.__ppc_env.get("PPC_ASAN_RUN") and
126+
not self.__ppc_env.get("PPC_DISABLE_VALGRIND")):
123127
self.__run_exec(
124128
shlex.split(self.valgrind_cmd)
125129
+ [str(self.work_dir / 'core_func_tests')]

0 commit comments

Comments
 (0)