diff options
author | Rob Savoye <rob.savoye@linaro.org> | 2016-03-28 14:15:01 +1100 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2016-03-28 14:15:01 +1100 |
commit | b733213d023ebd27af728bb3471dcca91c1243da (patch) | |
tree | 0e6de769b5f0d324e134af1428afc5e0f8b4c2a3 | |
parent | d8cd1783d80409d2a6258724810023465f331194 (diff) | |
download | dejagnu-b733213d023ebd27af728bb3471dcca91c1243da.zip dejagnu-b733213d023ebd27af728bb3471dcca91c1243da.tar.gz dejagnu-b733213d023ebd27af728bb3471dcca91c1243da.tar.bz2 |
* lib/dmucs.exp: New.
Signed-off-by: Ben Elliston <bje@gnu.org>
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | lib/dmucs.exp | 50 |
2 files changed, 54 insertions, 0 deletions
@@ -1,5 +1,9 @@ 2016-03-28 Rob Savoye <rob.savoye@linaro.org> + * lib/dmucs.exp: New. + +2016-03-28 Rob Savoye <rob.savoye@linaro.org> + * lib/libgloss.exp (find_g++): Look for xgcc++ to use the freshly built compiler, then look in the path. diff --git a/lib/dmucs.exp b/lib/dmucs.exp new file mode 100644 index 0000000..9c5fbfa --- /dev/null +++ b/lib/dmucs.exp @@ -0,0 +1,50 @@ +# Copyright (C) 2016 Free Software Foundation, Inc. + +# This file is part of DejaGnu. +# +# DejaGnu is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# DejaGnu is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with DejaGnu; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + +# This file requires a slightly modified dmucs, which has been +# modified to support mutiple architectures for toolchain +# testing. DMUCS sends the CPU load to a server, which we can query +# using the 'gethost' command to get the next available slave for a +# remote test based on which one is the least busy. The code for this +# enhanced DMUCS is at: http://git.linaro.org/git/toolchain/dmucs.git + +proc dmucs_gethost { server arch } { + # gethost in debug mode returns this output: + # --node and --arch are unique to the Linaro branch of DMUCS + # + # Writing -->host 127.0.1.1 <-- to the server + # Calling Sgets + # Got -->10.6.1.24<-- from the server + # tmp is -->DISTCC_HOSTS=10.6.1.24/100<-- + set slave "" + spawn gethost -s $server --node --arch $arch + expect { + # This is the IP number we want. + "^\[0-9\]*\.\[0-9\]*\.\[0-9\]*\.\[0-9\]*" { + set pos [expr {[string first "/" $expect_out(buffer)] - 1}] + set slave [string range $expect_out(buffer) 0 $pos] + } + timeout { + perror "DMUCS gethost command timed out" + } + eof { + perror "Failed to connect to DMUCS server" + } + } + return $slave +} |