File: git-test-programs-path

package info (click to toggle)
eztrace 2.0%2Brepack-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 4,132 kB
  • sloc: ansic: 23,501; perl: 910; sh: 857; cpp: 771; makefile: 696; fortran: 327; f90: 320; python: 57
file content (285 lines) | stat: -rw-r--r-- 9,959 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
commit fd6b2e00083b5db08a3cf5e05bd466f1f2b3023c
Author: François Trahay <francois.trahay@telecom-sudparis.eu>
Date:   Wed Aug 24 14:12:06 2022 +0200

    fix the path of test programs

diff --git a/test/memory/run.sh b/test/memory/run.sh
index 936b03ea..4797c5c1 100755
--- a/test/memory/run.sh
+++ b/test/memory/run.sh
@@ -9,7 +9,7 @@ check_compilation || exit 1
 
 nfailed=0
 # Running test scripts
-for test in test_*.sh; do
+for test in $CUR_PATH/test_*.sh; do
     run_test "$test" || ((nfailed++))
 done
 
diff --git a/test/memory/test_memory.sh b/test/memory/test_memory.sh
index a7143a92..12c96c96 100755
--- a/test/memory/test_memory.sh
+++ b/test/memory/test_memory.sh
@@ -3,7 +3,7 @@ CUR_PATH=$(dirname  $(realpath $0))
 source "$CUR_PATH/../test_utils/test_utils.sh"
 
 name="memory"
-run_and_check_command "$EZTRACE_PATH" -t "memory" "./$name"
+run_and_check_command "$EZTRACE_PATH" -t "memory" "$CUR_PATH/$name"
 
 trace_filename="${name}_trace/eztrace_log.otf2"
 
diff --git a/test/mpi/run.sh b/test/mpi/run.sh
index 264f1839..5b6e0217 100755
--- a/test/mpi/run.sh
+++ b/test/mpi/run.sh
@@ -11,7 +11,7 @@ check_compilation || exit 1
 
 nfailed=0
 # Running test scripts
-for test in test_*.sh; do
+for test in $CUR_PATH/test_*.sh; do
     run_test "$test" || ((nfailed++))
 done
 
diff --git a/test/mpi/test_mpi_ping.sh b/test/mpi/test_mpi_ping.sh
index 140e5188..3bb03675 100755
--- a/test/mpi/test_mpi_ping.sh
+++ b/test/mpi/test_mpi_ping.sh
@@ -6,7 +6,7 @@ name="mpi_ping"
 np="2"
 
 [ -n "$MPI_MODULE_NAME" ] || MPI_MODULE_NAME=mpi
-run_and_check_command "$MPIRUN_PATH" $MPIRUN_CLI_OPTION -np $np "$EZTRACE_PATH" -t $MPI_MODULE_NAME ./$name
+run_and_check_command "$MPIRUN_PATH" $MPIRUN_CLI_OPTION -np $np "$EZTRACE_PATH" -t "$MPI_MODULE_NAME $CUR_PATH/$name"
 
 trace_filename="${name}_trace/eztrace_log.otf2"
 if ! "$OTF2_PRINT_PATH" "$trace_filename" 2>&1 > /dev/null ; then
diff --git a/test/ompt/run.sh b/test/ompt/run.sh
index bb200c45..e9122c52 100755
--- a/test/ompt/run.sh
+++ b/test/ompt/run.sh
@@ -10,7 +10,7 @@ check_compilation || exit 1
 
 nfailed=0
 # Running test scripts
-for test in test_*.sh; do
+for test in $CUR_PATH/test_*.sh; do
     run_test "$test" || ((nfailed++))
 done
 
diff --git a/test/ompt/test_lock.sh b/test/ompt/test_lock.sh
index b708b1f2..e0769ee9 100755
--- a/test/ompt/test_lock.sh
+++ b/test/ompt/test_lock.sh
@@ -4,7 +4,7 @@ source "$CUR_PATH/../test_utils/test_utils.sh"
 
 name="lock"
 
-run_and_check_command "$EZTRACE_PATH" -t "ompt" "./test_$name"
+run_and_check_command "$EZTRACE_PATH" -t "ompt" "$CUR_PATH/test_$name"
 
 trace_filename="test_${name}_trace/eztrace_log.otf2"
 trace_check_integrity "$trace_filename"
diff --git a/test/ompt/test_parallel_for.sh b/test/ompt/test_parallel_for.sh
index cd8b6fdf..93584469 100755
--- a/test/ompt/test_parallel_for.sh
+++ b/test/ompt/test_parallel_for.sh
@@ -4,7 +4,7 @@ source "$CUR_PATH/../test_utils/test_utils.sh"
 
 name="parallel_for"
 
-run_and_check_command "$EZTRACE_PATH" -t "ompt" "./test_$name"
+run_and_check_command "$EZTRACE_PATH" -t "ompt" "$CUR_PATH/test_$name"
 
 trace_filename="test_${name}_trace/eztrace_log.otf2"
 
diff --git a/test/ompt/test_task.sh b/test/ompt/test_task.sh
index 102fcc57..2f6dd5ca 100755
--- a/test/ompt/test_task.sh
+++ b/test/ompt/test_task.sh
@@ -4,7 +4,7 @@ source "$CUR_PATH/../test_utils/test_utils.sh"
 
 name="task"
 
-nb_tasks=$("$EZTRACE_PATH" -t "ompt" ./test_$name 2>&1 | grep "Number of executed tasks" | cut -d' ' -f5)
+nb_tasks=$("$EZTRACE_PATH" -t "ompt" "$CUR_PATH/test_$name" 2>&1 | grep "Number of executed tasks" | cut -d' ' -f5)
 
 trace_filename="test_${name}_trace/eztrace_log.otf2"
 
diff --git a/test/openmp/run.sh b/test/openmp/run.sh
index ee62aa23..288290b4 100755
--- a/test/openmp/run.sh
+++ b/test/openmp/run.sh
@@ -10,7 +10,7 @@ check_compilation || exit 1
 
 nfailed=0
 # Running test scripts
-for test in test_*.sh; do
+for test in $CUR_PATH/test_*.sh; do
     run_test "$test" || ((nfailed++))
 done
 
diff --git a/test/openmp/test_lock.sh b/test/openmp/test_lock.sh
index 0bf9b879..c332a559 100755
--- a/test/openmp/test_lock.sh
+++ b/test/openmp/test_lock.sh
@@ -4,10 +4,10 @@ source "$CUR_PATH/../test_utils/test_utils.sh"
 
 name="lock"
 
-run_and_check_command "$EZTRACE_PATH" -t "openmp" "./test_$name" || ((nb_fail++))
+run_and_check_command "$EZTRACE_PATH" -t "openmp" "$CUR_PATH/test_$name" || ((nb_fail++))
 
 trace_filename="test_${name}_trace/eztrace_log.otf2"
-trace_check_integrity "$trace_filename" || return 1
+trace_check_integrity "$trace_filename" ||  ((nb_fail++))
 trace_check_enter_leave_parity  "$trace_filename"
 
 nb_locks=$(echo "(1024*1024*8/1000)+ 1"|bc)
diff --git a/test/openmp/test_nest_lock.sh b/test/openmp/test_nest_lock.sh
index ac4ecb7f..63965768 100755
--- a/test/openmp/test_nest_lock.sh
+++ b/test/openmp/test_nest_lock.sh
@@ -4,7 +4,7 @@ source "$CUR_PATH/../test_utils/test_utils.sh"
 
 name="nest_lock"
 
-run_and_check_command "$EZTRACE_PATH" -t "openmp" "./test_$name" || ((nb_fail++))
+run_and_check_command "$EZTRACE_PATH" -t "openmp" "$CUR_PATH/test_$name" || ((nb_fail++))
 
 trace_filename="test_${name}_trace/eztrace_log.otf2"
 trace_check_integrity "$trace_filename" || return 1
diff --git a/test/openmp/test_openmp_simple.sh b/test/openmp/test_openmp_simple.sh
index 7e57cea4..a01566d9 100755
--- a/test/openmp/test_openmp_simple.sh
+++ b/test/openmp/test_openmp_simple.sh
@@ -5,7 +5,7 @@ source "$CUR_PATH/../test_utils/test_utils.sh"
 name="openmp_simple"
 export OMP_NUM_THREADS=4
 
-run_and_check_command "$EZTRACE_PATH" -t "openmp" "./$name" || ((nb_fail++))
+run_and_check_command "$EZTRACE_PATH" -t "openmp" "$CUR_PATH/$name" || ((nb_fail++))
 
 trace_filename="${name}_trace/eztrace_log.otf2"
 trace_check_integrity "$trace_filename" || exit 1
diff --git a/test/openmp/test_task.sh b/test/openmp/test_task.sh
index f17cbfbd..ec374171 100755
--- a/test/openmp/test_task.sh
+++ b/test/openmp/test_task.sh
@@ -4,7 +4,7 @@ source "$CUR_PATH/../test_utils/test_utils.sh"
 
 name="task"
 
-run_and_check_command "$EZTRACE_PATH" -t "openmp" "./test_$name" || ((nb_fail++))
+run_and_check_command "$EZTRACE_PATH" -t "openmp" "$CUR_PATH/test_$name" || ((nb_fail++))
 
 trace_filename="test_${name}_trace/eztrace_log.otf2"
 trace_check_integrity "$trace_filename" || exit 1
diff --git a/test/posixio/run.sh b/test/posixio/run.sh
index 0c4f24b3..f6aa17a2 100755
--- a/test/posixio/run.sh
+++ b/test/posixio/run.sh
@@ -10,7 +10,7 @@ check_compilation || exit 1
 
 nfailed=0
 # Running test scripts
-for test in test_*.sh; do
+for test in $CUR_PATH/test_*.sh; do
     run_test "$test" || ((nfailed++))
 done
 
diff --git a/test/posixio/test_my_cat.sh b/test/posixio/test_my_cat.sh
index 443b877a..6f644102 100755
--- a/test/posixio/test_my_cat.sh
+++ b/test/posixio/test_my_cat.sh
@@ -8,7 +8,7 @@ output_file="output_file.tmp"
 size=1000
 dd if=/dev/random of="$input_file" count=1000 bs=1
 
-run_and_check_command "$EZTRACE_PATH" -t "posixio" "./$name" "${input_file}" "$output_file"
+run_and_check_command "$EZTRACE_PATH" -t "posixio" "$CUR_PATH/$name" "${input_file}" "$output_file"
 
 trace_filename="${name}_trace/eztrace_log.otf2"
 trace_check_integrity "$trace_filename"
diff --git a/test/posixio/test_posixio.sh b/test/posixio/test_posixio.sh
index ef6809e6..6eba574e 100755
--- a/test/posixio/test_posixio.sh
+++ b/test/posixio/test_posixio.sh
@@ -4,7 +4,7 @@ source "$CUR_PATH/../test_utils/test_utils.sh"
 
 name="posixio"
 
-run_and_check_command "$EZTRACE_PATH" -t "posixio" "./$name"
+run_and_check_command "$EZTRACE_PATH" -t "posixio" "$CUR_PATH/$name"
 
 trace_filename="${name}_trace/eztrace_log.otf2"
 trace_check_integrity "$trace_filename"
diff --git a/test/pthread/run.sh b/test/pthread/run.sh
index 4e934c68..36f8315a 100755
--- a/test/pthread/run.sh
+++ b/test/pthread/run.sh
@@ -10,7 +10,7 @@ check_compilation || exit 1
 
 nfailed=0
 # Running test scripts
-for test in test_*.sh; do
+for test in $CUR_PATH/test_*.sh; do
     run_test "$test" || ((nfailed++))
 done
 
diff --git a/test/pthread/test_dummy.sh b/test/pthread/test_dummy.sh
index dde9e775..59038278 100755
--- a/test/pthread/test_dummy.sh
+++ b/test/pthread/test_dummy.sh
@@ -4,7 +4,7 @@ source "$CUR_PATH/../test_utils/test_utils.sh"
 
 name="dummy_thread"
 [ -n "$EZTRACE_PATH" ] || EZTRACE_PATH=eztrace
-run_and_check_command "$EZTRACE_PATH" -t "pthread" "./dummy_thread"
+run_and_check_command "$EZTRACE_PATH" -t "pthread" "$CUR_PATH/dummy_thread"
 
 trace_filename="${name}_trace/eztrace_log.otf2"
 trace_check_integrity "$trace_filename"
diff --git a/test/test_utils/test_utils.sh b/test/test_utils/test_utils.sh
index 543979fc..b2178d00 100644
--- a/test/test_utils/test_utils.sh
+++ b/test/test_utils/test_utils.sh
@@ -1,11 +1,11 @@
 #!/bin/bash
 
-[ -n "$OTF2_PRINT_PATH" ]    || OTF2_PRINT_PATH=otf2-print
-[ -n "$EZTRACE_PATH" ]       || EZTRACE_PATH=eztrace
-[ -n "$EZTRACE_AVAIL_PATH" ] || EZTRACE_AVAIL_PATH=eztrace_avail
-[ -n "$EZTRACE_CC_PATH" ]    || EZTRACE_CC_PATH=eztrace_cc
-[ -n "$MPIRUN_PATH" ]        || MPIRUN_PATH=mpirun
-[ -n "$MPICC_PATH" ]         || MPICC_PATH=mpicc
+[ -n "$OTF2_PRINT_PATH" ]    || export OTF2_PRINT_PATH=otf2-print
+[ -n "$EZTRACE_PATH" ]       || export EZTRACE_PATH=eztrace
+[ -n "$EZTRACE_AVAIL_PATH" ] || export EZTRACE_AVAIL_PATH=eztrace_avail
+[ -n "$EZTRACE_CC_PATH" ]    || export EZTRACE_CC_PATH=eztrace_cc
+[ -n "$MPIRUN_PATH" ]        || export MPIRUN_PATH=mpirun
+[ -n "$MPICC_PATH" ]         || export MPICC_PATH=mpicc
 
 
 C_BLACK='\033[0;30m'
@@ -101,14 +101,14 @@ function run_test {
     if ! [ -x "$test" ]; then
 	return
     fi
-    echo "> Running ./$test..."
+    echo "> Running $test..."
     if [ -n "$verbose" ]; then
-	./$test
+	$test
     else
-	./$test > /dev/null 2>&1
+	$test > /dev/null 2>&1
     fi
     if [ "$?" != "0" ]; then
-        print_error "Test ./$test failed"
+        print_error "Test $test failed"
         return 1
     fi
     print_ok