Re: [Fuego] fixes for the linaro and rt tests

<[email protected]> Fri, 27 Aug 2021 09:23:18 +0000
Newsgroups dev.linux.lists.fuego
Message-ID <OS3PR01MB58804C7755D7A8281F77160395C89@OS3PR01MB5880.jpnprd01.prod.outlook.com>
Dear Tim,

I updated "patch [1/4] linaro: localhost does not require ssh"
Could you please help me check the attachment?

Thanks,
Tho

-----Original Message-----
From: sangorrin daniel(サンゴリン ダニエル □SWC◯ACT) <[email protected]> 
Sent: Thursday, August 26, 2021 9:46 AM
To: [email protected]
Cc: [email protected]; nguyen dat tho(TSDV Eng 1) <[email protected]>
Subject: RE: fixes for the linaro and rt tests

Hi Tim

Thanks for reviewing the patches

> -----Original Message-----
> From: [email protected] <[email protected]>
> > [PATCH 1/4] linaro: localhost does not require ssh
> >
> > This ones is self explanatory (no SSH if you use the local board)
> This looks OK.  I'm wondering if there's another way to detect a local 
> operation.  Can we check the TRANSPORT (e.g. if [ $TRANSPORT = "local" ] ...)?
> Checking the network address seems a bit iffy.

You are right, we will try with TRANSPORT or another variable and re-send the patch.

Thanks,
Daniel
0001-linaro-localhost-does-not-require-ssh.patch (application/octet-stream, 1.8 KB)
From 14dc2fc73db6bc99c7ef2830bc8230481e64f427 Mon Sep 17 00:00:00 2001
From: Nguyen Dat Tho <[email protected]>
Date: Fri, 20 Aug 2021 10:51:37 +0900
Subject: [PATCH] linaro: localhost does not require ssh

When running the test on localhost ssh is not required

Signed-off-by: Nguyen Dat Tho <[email protected]>
Signed-off-by: Daniel Sangorrin <[email protected]>
---
 tests/Functional.linaro/fuego_test.sh | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/tests/Functional.linaro/fuego_test.sh b/tests/Functional.linaro/fuego_test.sh
index 86d3c43..71c77e7 100755
--- a/tests/Functional.linaro/fuego_test.sh
+++ b/tests/Functional.linaro/fuego_test.sh
@@ -19,7 +19,10 @@ function test_pre_check {
     # vi ~/.ssh/config
     #  Host 192.167.1.99 <- replace with your boards ip address ($IPADDR)
     #    IdentityFile ~/.ssh/bbb_id_rsa
-    assert_define SSH_KEY "Please setup SSH_KEY on your board file (fuego-ro/boards/$NODE_NAME.board)"
+    # [Note] when running on localhost SSH_KEY is not required
+    if [ "$TRANSPORT" != "local" ]; then
+        assert_define SSH_KEY "Please setup SSH_KEY on your board file (fuego-ro/boards/$NODE_NAME.board)"
+    fi
 }
 
 function test_build {
@@ -57,7 +60,12 @@ function test_run {
         SKIPFLAG=""
     fi
 
-    test-runner -o ${LOGDIR} $test_or_plan_flag ${REPO_PATH}/$yaml_file $PARAMS -g $LOGIN@$IPADDR $SKIPFLAG -e
+    # SSH is not required when running on localhost
+    if [ "$TRANSPORT" != "local" ]; then
+        test-runner -o ${LOGDIR} $test_or_plan_flag ${REPO_PATH}/$yaml_file $PARAMS -g $LOGIN@$IPADDR $SKIPFLAG -e
+    else
+        test-runner -o ${LOGDIR} $test_or_plan_flag ${REPO_PATH}/$yaml_file $PARAMS $SKIPFLAG -e
+    fi
 }
 
 # FIXTHIS: the log directory is populated with a copy of the whole repository, clean unnecessary files
-- 
2.20.1