3582ff9c743fdea987011d321c065bcd9d6d99d8
[deliverable/binutils-gdb.git] / gdb / testsuite / lib / build-piece.exp
1 # Copyright (C) 2014-2021 Free Software Foundation, Inc.
2
3 # This program is free software; you can redistribute it and/or modify
4 # it under the terms of the GNU General Public License as published by
5 # the Free Software Foundation; either version 3 of the License, or
6 # (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
15
16 # Utility to bootstrap building a piece of a performance test in a
17 # parallel build.
18 # See testsuite/Makefile.in:workers/%.worker.
19 # WORKER is set by the makefile and is
20 # "{program_name}/{program_name}-{worker_nr}".
21
22 regexp "^\(.+\)/\(.+\)-\(\[0-9\]+\)$" $WORKER entire_match PROGRAM_NAME pname2 WORKER_NR
23
24 if { ![info exists entire_match] || $entire_match != $WORKER } {
25 error "Bad value for WORKER: $WORKER"
26 }
27 if { $PROGRAM_NAME != $pname2 } {
28 error "Bad value for WORKER: $WORKER"
29 }
30
31 # $subdir is set to "lib", because that is where this file lives,
32 # which is not what tests expect.
33 set subdir "gdb.perf"
34
35 # $gdb_test_file_name is set to this file, build-piece, which is not what
36 # tests expect.
37 set gdb_test_file_name $PROGRAM_NAME
38
39 source $srcdir/$subdir/${gdb_test_file_name}.exp
This page took 0.029786 seconds and 3 git commands to generate.