Debian Codegraph @

scripts/test/inotify-stress-soak.sh

raw
1 #!/bin/sh
2 #
3 # Copyright (c) 2026 Enrico M. Crisostomo
4 #
5 # This program is free software; you can redistribute it and/or modify it under
6 # the terms of the GNU General Public License as published by the Free Software
7 # Foundation; either version 3, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful, but WITHOUT
10 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12 # details.
13 #
14 # You should have received a copy of the GNU General Public License along with
15 # this program. If not, see <http://www.gnu.org/licenses/>.
16
17 set -eu
18
19 BUILD_DIR=${BUILD_DIR:-build-inotify-soak}
20 ITERATIONS=${ITERATIONS:-50}
21 JOBS=${JOBS:-2}
22 export CCACHE_DISABLE=${CCACHE_DISABLE:-1}
23
24 cmake -S . -B "${BUILD_DIR}" -DBUILD_TESTING=ON
25 cmake --build "${BUILD_DIR}" -j "${JOBS}"
26
27 i=1
28 while [ "${i}" -le "${ITERATIONS}" ]; do
29 printf 'inotify stress soak iteration %s/%s\n' "${i}" "${ITERATIONS}"
30 ctest --test-dir "${BUILD_DIR}" -L inotify --output-on-failure
31 i=$((i + 1))
32 done