From patchwork Tue Oct 25 16:29:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ivan Tetyushkin X-Patchwork-Id: 59403 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id EDE04385615A for ; Tue, 25 Oct 2022 16:32:31 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from forward100o.mail.yandex.net (forward100o.mail.yandex.net [IPv6:2a02:6b8:0:1a2d::600]) by sourceware.org (Postfix) with ESMTPS id 871AA3856954 for ; Tue, 25 Oct 2022 16:32:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 871AA3856954 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=syntacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=syntacore.com Received: from sas1-71299a9d5a62.qloud-c.yandex.net (sas1-71299a9d5a62.qloud-c.yandex.net [IPv6:2a02:6b8:c08:210e:0:640:7129:9a9d]) by forward100o.mail.yandex.net (Yandex) with ESMTP id 0ACD152AB96C for ; Tue, 25 Oct 2022 19:32:16 +0300 (MSK) Received: by sas1-71299a9d5a62.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id vYrOVqEYP6-WFg0gSVj; Tue, 25 Oct 2022 19:32:15 +0300 X-Yandex-Fwd: 1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=syntacore.com; s=mail; t=1666715535; bh=jzUTZ+09WeEwW7XjoUs0gLcDwp69hYAfyD22QwakZ0w=; h=Message-Id:Date:In-Reply-To:Cc:Subject:References:To:From; b=MHwsKOucAyd9dbknxvWwb+I8A87TgZecvji0IByWR3gohP4s+8F4zzSvFqaIiPiTR sbSwiuNESqJTL3lWPJtuZPBZXR7lnrkcV/Dxa4aUrUs+xTaBH6nB99/4T2ZisDC4FS nFL1O24LYIW5QDg0YBXaj0o4uQ3Zj+jg5b+6ZwWU= Authentication-Results: sas1-71299a9d5a62.qloud-c.yandex.net; dkim=pass header.i=@syntacore.com From: Ivan Tetyushkin To: gdb-patches@sourceware.org Subject: [PATCH 1/7] [gdb/testsuite] Adding function to find runtime path to support remote execution for testsuite Date: Tue, 25 Oct 2022 19:29:42 +0300 Message-Id: <20221025162946.727169-2-ivan.tetyushkin@syntacore.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221025162946.727169-1-ivan.tetyushkin@syntacore.com> References: <20221025162946.727169-1-ivan.tetyushkin@syntacore.com> MIME-Version: 1.0 X-Spam-Status: No, score=-10.4 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" --- gdb/testsuite/lib/gdb.exp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index e2cda30b95a..ee25daadac5 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6200,6 +6200,18 @@ proc standard_output_file {basename} { return [file join $dir $basename] } +# Turns a full file name in a name for runtime context. +# This is needed as on remote folder structure is different +proc get_runtime_file {fullfile} { + if [is_remote target] { + set remotedir [board_info target remotedir] + set filename [file tail $fullfile] + return [file join $remotedir $filename] + } else { + return $fullfile + } +} + # Turn BASENAME into a full file name in the standard output directory. If # GDB has been launched more than once then append the count, starting with # a ".1" postfix.