From 7c7dc2c784897b151738de69717b81b6ae63528f Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Fri, 4 Jul 2025 14:31:34 +0200 Subject: [PATCH 1/2] Make run_tests.py executable --- .github/workflows/mac.yml | 6 +++--- .github/workflows/ubuntu.yml | 22 +++++++++++----------- .github/workflows/windows.yml | 10 +++++----- docs/user_guide/ci.rst | 6 +++--- scripts/generate_perf_results.bat | 2 +- scripts/generate_perf_results.sh | 2 +- scripts/run_tests.py | 0 7 files changed, 24 insertions(+), 24 deletions(-) mode change 100644 => 100755 scripts/run_tests.py diff --git a/.github/workflows/mac.yml b/.github/workflows/mac.yml index ff1bedba1..50cfbd67b 100644 --- a/.github/workflows/mac.yml +++ b/.github/workflows/mac.yml @@ -68,11 +68,11 @@ jobs: mkdir -p install tar -xzvf macos-clang-install.tar.gz -C install - name: Run func tests (MPI) - run: python3 scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 env: PPC_NUM_THREADS: 1 - name: Run tests (threads) - run: python3 scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 env: PPC_NUM_PROC: 1 clang-test-extended: @@ -99,6 +99,6 @@ jobs: mkdir -p install tar -xzvf macos-clang-install.tar.gz -C install - name: Run tests (threads extended) - run: python3 scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 + run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: PPC_NUM_PROC: 1 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 17c30b34a..b168eb9a1 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -76,11 +76,11 @@ jobs: mkdir -p install tar -xzvf ubuntu-gcc-install-${{ matrix.os }}.tar.gz -C install - name: Run func tests (MPI) - run: python3 scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 env: PPC_NUM_THREADS: 1 - name: Run func tests (threads) - run: python3 scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 env: PPC_NUM_PROC: 1 gcc-test-extended: @@ -106,7 +106,7 @@ jobs: mkdir -p install tar -xzvf ubuntu-gcc-install-${{ matrix.os }}.tar.gz -C install - name: Run func tests (threads extended) - run: python3 scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 + run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: PPC_NUM_PROC: 1 clang-build: @@ -178,11 +178,11 @@ jobs: mkdir -p install tar -xzvf ubuntu-clang-install-${{ matrix.os }}.tar.gz -C install - name: Run func tests (MPI) - run: python3 scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 env: PPC_NUM_THREADS: 1 - name: Run tests (threads) - run: python3 scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 env: PPC_NUM_PROC: 1 clang-test-extended: @@ -210,7 +210,7 @@ jobs: mkdir -p install tar -xzvf ubuntu-clang-install-${{ matrix.os }}.tar.gz -C install - name: Run tests (threads extended) - run: python3 scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 + run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: PPC_NUM_PROC: 1 clang-sanitizer-build: @@ -288,14 +288,14 @@ jobs: mkdir -p install tar -xzvf ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz -C install - name: Run tests (MPI) - run: python3 scripts/run_tests.py --running-type="processes" --counts 2 --additional-mpi-args="--oversubscribe" + run: scripts/run_tests.py --running-type="processes" --counts 2 --additional-mpi-args="--oversubscribe" env: PPC_NUM_THREADS: 2 PPC_ASAN_RUN: 1 ASAN_OPTIONS: abort_on_error=1 UBSAN_OPTIONS: halt_on_error=1 - name: Run tests (threads) - run: python3 scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 env: PPC_NUM_PROC: 1 PPC_ASAN_RUN: 1 @@ -327,7 +327,7 @@ jobs: mkdir -p install tar -xzvf ubuntu-clang-sanitizer-install-${{ matrix.os }}.tar.gz -C install - name: Run tests (threads extended) - run: python3 scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 + run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: PPC_NUM_PROC: 1 PPC_ASAN_RUN: 1 @@ -361,12 +361,12 @@ jobs: run: | cmake --build build --parallel - name: Run tests (MPI) - run: python3 scripts/run_tests.py --running-type="processes" + run: scripts/run_tests.py --running-type="processes" env: PPC_NUM_PROC: 2 PPC_NUM_THREADS: 2 - name: Run tests (threads) - run: python3 scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 env: PPC_NUM_PROC: 1 - name: Generate gcovr Coverage Data diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index d64650a67..48e9f1f53 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -51,11 +51,11 @@ jobs: run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force shell: pwsh - name: Run func tests (MPI) - run: python3 scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="processes" --counts 1 2 3 4 env: PPC_NUM_THREADS: 1 - name: Run tests (threads) - run: python3 scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 env: PPC_NUM_PROC: 1 msvc-test-extended: @@ -76,7 +76,7 @@ jobs: run: Expand-Archive -Path .\windows-msvc-install.zip -DestinationPath . -Force shell: pwsh - name: Run tests (threads extended) - run: python3 scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 + run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: PPC_NUM_PROC: 1 clang-build: @@ -135,7 +135,7 @@ jobs: run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force shell: pwsh - name: Run tests (threads) - run: python3 scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 + run: scripts/run_tests.py --running-type="threads" --counts 1 2 3 4 env: PPC_NUM_PROC: 1 clang-test-extended: @@ -156,6 +156,6 @@ jobs: run: Expand-Archive -Path .\windows-clang-install.zip -DestinationPath . -Force shell: pwsh - name: Run tests (threads extended) - run: python3 scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 + run: scripts/run_tests.py --running-type="threads" --counts 5 7 11 13 env: PPC_NUM_PROC: 1 diff --git a/docs/user_guide/ci.rst b/docs/user_guide/ci.rst index 1dae74d5d..e7b381da3 100644 --- a/docs/user_guide/ci.rst +++ b/docs/user_guide/ci.rst @@ -46,13 +46,13 @@ Example usage: export PPC_NUM_PROC=2 # Multithreaded functional tests - python3 scripts/run_tests.py --running-type="threads" + scripts/run_tests.py --running-type="threads" # MPI functional tests - python3 scripts/run_tests.py --running-type="processes" + scripts/run_tests.py --running-type="processes" # Performance benchmarks - python3 scripts/run_tests.py --running-type="performance" + scripts/run_tests.py --running-type="performance" Additional MPI arguments can be supplied with ``--additional-mpi-args`` when running in ``processes`` mode. diff --git a/scripts/generate_perf_results.bat b/scripts/generate_perf_results.bat index c05306f3b..a7d72690a 100644 --- a/scripts/generate_perf_results.bat +++ b/scripts/generate_perf_results.bat @@ -1,4 +1,4 @@ @echo off mkdir build\perf_stat_dir -python3 scripts/run_tests.py --running-type="performance" > build\perf_stat_dir\perf_log.txt +scripts/run_tests.py --running-type="performance" > build\perf_stat_dir\perf_log.txt python scripts\create_perf_table.py --input build\perf_stat_dir\perf_log.txt --output build\perf_stat_dir diff --git a/scripts/generate_perf_results.sh b/scripts/generate_perf_results.sh index a16bf169c..da317f427 100644 --- a/scripts/generate_perf_results.sh +++ b/scripts/generate_perf_results.sh @@ -2,5 +2,5 @@ set -euo pipefail mkdir -p build/perf_stat_dir -python3 scripts/run_tests.py --running-type="performance" | tee build/perf_stat_dir/perf_log.txt +scripts/run_tests.py --running-type="performance" | tee build/perf_stat_dir/perf_log.txt python3 scripts/create_perf_table.py --input build/perf_stat_dir/perf_log.txt --output build/perf_stat_dir diff --git a/scripts/run_tests.py b/scripts/run_tests.py old mode 100644 new mode 100755 From e9ad895e0f1a3f579b7cfd44320bb8d61309a4c3 Mon Sep 17 00:00:00 2001 From: Arseniy Obolenskiy Date: Fri, 4 Jul 2025 15:17:38 +0200 Subject: [PATCH 2/2] shebang --- scripts/run_tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/run_tests.py b/scripts/run_tests.py index 9d97795b3..f54a8a6cb 100755 --- a/scripts/run_tests.py +++ b/scripts/run_tests.py @@ -1,3 +1,5 @@ +#!/usr/bin/env python3 + import os import shlex import subprocess