Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
DLR-AMR
GitHub Repository: DLR-AMR/t8code
Path: blob/main/scripts/find_all_test_binary_paths.sh
900 views
1
#!/bin/bash
2
3
# This file is part of t8code.
4
# t8code is a C library to manage a collection (a forest) of multiple
5
# connected adaptive space-trees of general element classes in parallel.
6
#
7
# Copyright (C) 2025 the developers
8
#
9
# t8code is free software; you can redistribute it and/or modify
10
# it under the terms of the GNU General Public License as published by
11
# the Free Software Foundation; either version 2 of the License, or
12
# (at your option) any later version.
13
#
14
# t8code is distributed in the hope that it will be useful,
15
# but WITHOUT ANY WARRANTY; without even the implied warranty of
16
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
# GNU General Public License for more details.
18
#
19
# You should have received a copy of the GNU General Public License
20
# along with t8code; if not, write to the Free Software Foundation, Inc.,
21
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
22
23
#
24
# This file lists all paths to test binaries that exist in the build/test directory.
25
# The script can be used to run the check_valgrind script for every test binary.
26
# The paths are relative paths assuming an execution from the test/ folder in the build directory.
27
#
28
29
build_test_directory="../build/test/"
30
31
# Check that path to test folder in build directory is correct.
32
if [ ! -d "$build_test_directory" ]; then
33
echo "Directory build/test/ not found!"
34
exit 1
35
fi
36
37
# Find all executables in the build/test/ directory (that do not have a .so file ending)
38
# and store the relative paths to the build_test_directory with leading "./".
39
test_bin_paths=$(find "$build_test_directory" -type f -executable -not -name "*.so" -exec realpath --relative-to="$build_test_directory" {} \; | sed 's|^|./|')
40
41
echo $test_bin_paths
42
43