All of lore.kernel.org
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] run_tests: add run all tests parameter
@ 2017-03-08 17:00 Andrew Jones
  2017-03-10  9:20 ` Paolo Bonzini
  2017-03-15 17:11 ` Radim Krčmář
  0 siblings, 2 replies; 3+ messages in thread
From: Andrew Jones @ 2017-03-08 17:00 UTC (permalink / raw)
  To: kvm; +Cc: christoffer.dall, rkrcmar, pbonzini

Tests can be flagged as 'nodefault' in unittests.cfg files. Allow
running all tests, including all nodefault tests by just calling
run_tests.sh with a new -a parameter. (Also cleanup the help text.)

Suggested-by: Christoffer Dall <christoffer.dall@linaro.org>
Signed-off-by: Andrew Jones <drjones@redhat.com>
---
 run_tests.sh         | 14 +++++++++-----
 scripts/runtime.bash |  1 +
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/run_tests.sh b/run_tests.sh
index 09cd057b7f41d..c35a058023467 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -1,6 +1,7 @@
 #!/bin/bash
 
 verbose="no"
+run_all_tests="no" # don't run nodefault tests
 
 if [ ! -f config.mak ]; then
     echo "run ./configure && make first. See ./configure -h"
@@ -13,13 +14,13 @@ function usage()
 {
 cat <<EOF
 
-Usage: $0 [-g group] [-h] [-v]
-Usage: $0 [-g group] [-h] [-v] [-j NUM-TASKS]
+Usage: $0 [-h] [-v] [-a] [-g group] [-j NUM-TASKS]
 
-    -g: Only execute tests in the given group
     -h: Output this help text
-    -j: Execute tests in parallel
     -v: Enables verbose mode
+    -a: Run all tests, including those flagged as 'nodefault'
+    -g: Only execute tests in the given group
+    -j: Execute tests in parallel
 
 Set the environment variable QEMU=/path/to/qemu-system-ARCH to
 specify the appropriate qemu binary for ARCH-run.
@@ -30,8 +31,11 @@ EOF
 RUNTIME_arch_run="./$TEST_DIR/run"
 source scripts/runtime.bash
 
-while getopts "g:hj:v" opt; do
+while getopts "ag:hj:v" opt; do
     case $opt in
+        a)
+            run_all_tests="yes"
+            ;;
         g)
             only_group=$OPTARG
             ;;
diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index 9c1bc3b3b3fe7..98f18357e537a 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -34,6 +34,7 @@ get_cmdline()
 
 skip_nodefault()
 {
+    [ "$run_all_tests" = "yes" ] && return 1
     [ "$STANDALONE" != "yes" ] && return 0
 
     while true; do
-- 
2.7.4

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

* Re: [kvm-unit-tests PATCH] run_tests: add run all tests parameter
  2017-03-08 17:00 [kvm-unit-tests PATCH] run_tests: add run all tests parameter Andrew Jones
@ 2017-03-10  9:20 ` Paolo Bonzini
  2017-03-15 17:11 ` Radim Krčmář
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2017-03-10  9:20 UTC (permalink / raw)
  To: Andrew Jones, kvm; +Cc: christoffer.dall, rkrcmar



On 08/03/2017 18:00, Andrew Jones wrote:
> Tests can be flagged as 'nodefault' in unittests.cfg files. Allow
> running all tests, including all nodefault tests by just calling
> run_tests.sh with a new -a parameter. (Also cleanup the help text.)
> 
> Suggested-by: Christoffer Dall <christoffer.dall@linaro.org>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---
>  run_tests.sh         | 14 +++++++++-----
>  scripts/runtime.bash |  1 +
>  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/run_tests.sh b/run_tests.sh
> index 09cd057b7f41d..c35a058023467 100755
> --- a/run_tests.sh
> +++ b/run_tests.sh
> @@ -1,6 +1,7 @@
>  #!/bin/bash
>  
>  verbose="no"
> +run_all_tests="no" # don't run nodefault tests
>  
>  if [ ! -f config.mak ]; then
>      echo "run ./configure && make first. See ./configure -h"
> @@ -13,13 +14,13 @@ function usage()
>  {
>  cat <<EOF
>  
> -Usage: $0 [-g group] [-h] [-v]
> -Usage: $0 [-g group] [-h] [-v] [-j NUM-TASKS]
> +Usage: $0 [-h] [-v] [-a] [-g group] [-j NUM-TASKS]
>  
> -    -g: Only execute tests in the given group
>      -h: Output this help text
> -    -j: Execute tests in parallel
>      -v: Enables verbose mode
> +    -a: Run all tests, including those flagged as 'nodefault'
> +    -g: Only execute tests in the given group
> +    -j: Execute tests in parallel
>  
>  Set the environment variable QEMU=/path/to/qemu-system-ARCH to
>  specify the appropriate qemu binary for ARCH-run.
> @@ -30,8 +31,11 @@ EOF
>  RUNTIME_arch_run="./$TEST_DIR/run"
>  source scripts/runtime.bash
>  
> -while getopts "g:hj:v" opt; do
> +while getopts "ag:hj:v" opt; do
>      case $opt in
> +        a)
> +            run_all_tests="yes"
> +            ;;
>          g)
>              only_group=$OPTARG
>              ;;
> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
> index 9c1bc3b3b3fe7..98f18357e537a 100644
> --- a/scripts/runtime.bash
> +++ b/scripts/runtime.bash
> @@ -34,6 +34,7 @@ get_cmdline()
>  
>  skip_nodefault()
>  {
> +    [ "$run_all_tests" = "yes" ] && return 1
>      [ "$STANDALONE" != "yes" ] && return 0
>  
>      while true; do
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

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

* Re: [kvm-unit-tests PATCH] run_tests: add run all tests parameter
  2017-03-08 17:00 [kvm-unit-tests PATCH] run_tests: add run all tests parameter Andrew Jones
  2017-03-10  9:20 ` Paolo Bonzini
@ 2017-03-15 17:11 ` Radim Krčmář
  1 sibling, 0 replies; 3+ messages in thread
From: Radim Krčmář @ 2017-03-15 17:11 UTC (permalink / raw)
  To: Andrew Jones; +Cc: kvm, christoffer.dall, pbonzini

2017-03-08 18:00+0100, Andrew Jones:
> Tests can be flagged as 'nodefault' in unittests.cfg files. Allow
> running all tests, including all nodefault tests by just calling
> run_tests.sh with a new -a parameter. (Also cleanup the help text.)
> 
> Suggested-by: Christoffer Dall <christoffer.dall@linaro.org>
> Signed-off-by: Andrew Jones <drjones@redhat.com>
> ---

Applied, thanks.

>  run_tests.sh         | 14 +++++++++-----
>  scripts/runtime.bash |  1 +
>  2 files changed, 10 insertions(+), 5 deletions(-)
> 
> diff --git a/run_tests.sh b/run_tests.sh
> index 09cd057b7f41d..c35a058023467 100755
> --- a/run_tests.sh
> +++ b/run_tests.sh
> @@ -1,6 +1,7 @@
>  #!/bin/bash
>  
>  verbose="no"
> +run_all_tests="no" # don't run nodefault tests
>  
>  if [ ! -f config.mak ]; then
>      echo "run ./configure && make first. See ./configure -h"
> @@ -13,13 +14,13 @@ function usage()
>  {
>  cat <<EOF
>  
> -Usage: $0 [-g group] [-h] [-v]
> -Usage: $0 [-g group] [-h] [-v] [-j NUM-TASKS]
> +Usage: $0 [-h] [-v] [-a] [-g group] [-j NUM-TASKS]
>  
> -    -g: Only execute tests in the given group
>      -h: Output this help text
> -    -j: Execute tests in parallel
>      -v: Enables verbose mode
> +    -a: Run all tests, including those flagged as 'nodefault'
> +    -g: Only execute tests in the given group
> +    -j: Execute tests in parallel
>  
>  Set the environment variable QEMU=/path/to/qemu-system-ARCH to
>  specify the appropriate qemu binary for ARCH-run.
> @@ -30,8 +31,11 @@ EOF
>  RUNTIME_arch_run="./$TEST_DIR/run"
>  source scripts/runtime.bash
>  
> -while getopts "g:hj:v" opt; do
> +while getopts "ag:hj:v" opt; do
>      case $opt in
> +        a)
> +            run_all_tests="yes"
> +            ;;
>          g)
>              only_group=$OPTARG
>              ;;
> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
> index 9c1bc3b3b3fe7..98f18357e537a 100644
> --- a/scripts/runtime.bash
> +++ b/scripts/runtime.bash
> @@ -34,6 +34,7 @@ get_cmdline()
>  
>  skip_nodefault()
>  {
> +    [ "$run_all_tests" = "yes" ] && return 1
>      [ "$STANDALONE" != "yes" ] && return 0
>  
>      while true; do
> -- 
> 2.7.4
> 

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

end of thread, other threads:[~2017-03-15 17:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-08 17:00 [kvm-unit-tests PATCH] run_tests: add run all tests parameter Andrew Jones
2017-03-10  9:20 ` Paolo Bonzini
2017-03-15 17:11 ` Radim Krčmář

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.