All of lore.kernel.org
 help / color / mirror / Atom feed
* [Fuego] [PATCH] linaro: add option to skip installing dependencies
@ 2019-03-05  5:39 Daniel Sangorrin
  2019-03-13 19:13 ` Tim.Bird
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Sangorrin @ 2019-03-05  5:39 UTC (permalink / raw)
  To: fuego

Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
---
 tests/Functional.linaro/fuego_test.sh | 14 ++++++++++----
 tests/Functional.linaro/test.yaml     |  5 +++++
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/tests/Functional.linaro/fuego_test.sh b/tests/Functional.linaro/fuego_test.sh
index 3959256..86d3c43 100755
--- a/tests/Functional.linaro/fuego_test.sh
+++ b/tests/Functional.linaro/fuego_test.sh
@@ -1,14 +1,13 @@
 gitrepo="https://github.com/Linaro/test-definitions.git"
 
 # Root permissions required for
-# - installing dependencies on the target (debian/centos) when -s is not specified
+# - installing dependencies on the target (debian/centos) (unless SKIPINSTALL=1)
 # - executing some of the tests
 # FIXTHIS: don't force root permissions for tests that do not require them
 NEED_ROOT=1
 
 function test_pre_check {
     # linaro parser dependencies
-    # FIXTHIS: use dependencies specified in the test definition yaml
     assert_has_program sed
     assert_has_program awk
     assert_has_program egrep
@@ -50,8 +49,15 @@ function test_run {
         PARAMS=""
     fi
 
-    # FIXTHIS: don't use -s for targets with debian/centos
-    test-runner -o ${LOGDIR} $test_or_plan_flag ${REPO_PATH}/$yaml_file $PARAMS -g $LOGIN@$IPADDR -s -e
+    # Note: linaro already detects if the OS supports installing dependencies
+    SKIPINSTALL=${FUNCTIONAL_LINARO_SKIPINSTALL:-0}
+    if [ "$SKIPINSTALL" -eq 1 ]; then
+        SKIPFLAG="-s"
+    else
+        SKIPFLAG=""
+    fi
+
+    test-runner -o ${LOGDIR} $test_or_plan_flag ${REPO_PATH}/$yaml_file $PARAMS -g $LOGIN@$IPADDR $SKIPFLAG -e
 }
 
 # FIXTHIS: the log directory is populated with a copy of the whole repository, clean unnecessary files
diff --git a/tests/Functional.linaro/test.yaml b/tests/Functional.linaro/test.yaml
index a2efee8..c31d8f4 100644
--- a/tests/Functional.linaro/test.yaml
+++ b/tests/Functional.linaro/test.yaml
@@ -19,6 +19,11 @@ params:
         description: List of params for the test PARAM1=VALUE1 [PARAM2=VALUE2]
         example: "TESTS='pwd'"
         optional: yes
+    - SKIPINSTALL:
+        description: Skip install dependencies on the target
+        example: 1 (skip) or 0 (don't skip them)
+        default: 0 (don't skip them)
+        optional: yes
 data_files:
     - chart_config.json
     - fuego_test.sh
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Fuego] [PATCH] linaro: add option to skip installing dependencies
  2019-03-05  5:39 [Fuego] [PATCH] linaro: add option to skip installing dependencies Daniel Sangorrin
@ 2019-03-13 19:13 ` Tim.Bird
  0 siblings, 0 replies; 2+ messages in thread
From: Tim.Bird @ 2019-03-13 19:13 UTC (permalink / raw)
  To: daniel.sangorrin, fuego

Looks good.  Applied to the fuegotest 'next' branch.

Thanks,
 -- Tim

> -----Original Message-----
> From: fuego-bounces@lists.linuxfoundation.org [mailto:fuego-
> bounces@lists.linuxfoundation.org] On Behalf Of Daniel Sangorrin
> Sent: Monday, March 04, 2019 9:39 PM
> To: fuego@lists.linuxfoundation.org
> Subject: [Fuego] [PATCH] linaro: add option to skip installing dependencies
> 
> Signed-off-by: Daniel Sangorrin <daniel.sangorrin@toshiba.co.jp>
> ---
>  tests/Functional.linaro/fuego_test.sh | 14 ++++++++++----
>  tests/Functional.linaro/test.yaml     |  5 +++++
>  2 files changed, 15 insertions(+), 4 deletions(-)
> 
> diff --git a/tests/Functional.linaro/fuego_test.sh
> b/tests/Functional.linaro/fuego_test.sh
> index 3959256..86d3c43 100755
> --- a/tests/Functional.linaro/fuego_test.sh
> +++ b/tests/Functional.linaro/fuego_test.sh
> @@ -1,14 +1,13 @@
>  gitrepo="https://github.com/Linaro/test-definitions.git"
> 
>  # Root permissions required for
> -# - installing dependencies on the target (debian/centos) when -s is not
> specified
> +# - installing dependencies on the target (debian/centos) (unless
> SKIPINSTALL=1)
>  # - executing some of the tests
>  # FIXTHIS: don't force root permissions for tests that do not require them
>  NEED_ROOT=1
> 
>  function test_pre_check {
>      # linaro parser dependencies
> -    # FIXTHIS: use dependencies specified in the test definition yaml
>      assert_has_program sed
>      assert_has_program awk
>      assert_has_program egrep
> @@ -50,8 +49,15 @@ function test_run {
>          PARAMS=""
>      fi
> 
> -    # FIXTHIS: don't use -s for targets with debian/centos
> -    test-runner -o ${LOGDIR} $test_or_plan_flag ${REPO_PATH}/$yaml_file
> $PARAMS -g $LOGIN@$IPADDR -s -e
> +    # Note: linaro already detects if the OS supports installing dependencies
> +    SKIPINSTALL=${FUNCTIONAL_LINARO_SKIPINSTALL:-0}
> +    if [ "$SKIPINSTALL" -eq 1 ]; then
> +        SKIPFLAG="-s"
> +    else
> +        SKIPFLAG=""
> +    fi
> +
> +    test-runner -o ${LOGDIR} $test_or_plan_flag ${REPO_PATH}/$yaml_file
> $PARAMS -g $LOGIN@$IPADDR $SKIPFLAG -e
>  }
> 
>  # FIXTHIS: the log directory is populated with a copy of the whole repository,
> clean unnecessary files
> diff --git a/tests/Functional.linaro/test.yaml
> b/tests/Functional.linaro/test.yaml
> index a2efee8..c31d8f4 100644
> --- a/tests/Functional.linaro/test.yaml
> +++ b/tests/Functional.linaro/test.yaml
> @@ -19,6 +19,11 @@ params:
>          description: List of params for the test PARAM1=VALUE1
> [PARAM2=VALUE2]
>          example: "TESTS='pwd'"
>          optional: yes
> +    - SKIPINSTALL:
> +        description: Skip install dependencies on the target
> +        example: 1 (skip) or 0 (don't skip them)
> +        default: 0 (don't skip them)
> +        optional: yes
>  data_files:
>      - chart_config.json
>      - fuego_test.sh
> --
> 2.7.4
> 
> _______________________________________________
> Fuego mailing list
> Fuego@lists.linuxfoundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/fuego

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-03-13 19:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-05  5:39 [Fuego] [PATCH] linaro: add option to skip installing dependencies Daniel Sangorrin
2019-03-13 19:13 ` Tim.Bird

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.