[PING^3,1/1] sim/testsuite: Trim extra path from arch

Message ID d217b25b1701e25c615621c075bb5d55245349c5.1663776150.git.research_trasio@irq.a4lg.com
State Dropped
Headers
Series sim/testsuite: Fix broken "make check-sim" by trimming excess path from arch |

Commit Message

Tsukasa OI Sept. 21, 2022, 4:02 p.m. UTC
  If subdir begins with "./", sim_arch returned "./ARCH" instead of
"ARCH" and target-specific check-sim is prevented.  This commit fixes
the issue to make "make check-sim" work.

sim/ChangeLog:

	* testsuite/lib/sim-defs.exp: Fix return value of sim_arch
	by trimming leading "./".
---
 sim/testsuite/lib/sim-defs.exp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Patch

diff --git a/sim/testsuite/lib/sim-defs.exp b/sim/testsuite/lib/sim-defs.exp
index 5528d64684b..6d8f0134089 100644
--- a/sim/testsuite/lib/sim-defs.exp
+++ b/sim/testsuite/lib/sim-defs.exp
@@ -14,7 +14,7 @@  proc sim_arch {} {
     while { [file dirname $arch] != "." } {
 	set arch [file dirname $arch]
     }
-    return "$arch"
+    return [file tail $arch]
 }
 
 # Initialize the testrun.