From ac2b220dc0bbdba6d74a63fc8694498cd83a5507 Mon Sep 17 00:00:00 2001 From: Dan Rue Date: Thu, 1 Mar 2018 15:42:18 -0600 Subject: [PATCH] Allow 'tests' to use StringArray, too This allows usage i.e.: skiplist: - reason: Some test reason url: https://bugs.linaro.org/show_bug.cgi?id=3145 environments: production boards: x15 branches: "4.4" tests: run_vmtests Before this change, environments/boards/branches could be either a list or a value, but not tests. Fix this inconsistency. I have no idea why I didn't anticipate this usecase. Signed-off-by: Dan Rue --- skipgen.go | 2 +- skipgen_test.go | 12 ++++-------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/skipgen.go b/skipgen.go index 71f3726..cf8c88e 100644 --- a/skipgen.go +++ b/skipgen.go @@ -66,7 +66,7 @@ type Skipfile struct { Environments StringArray Boards StringArray Branches StringArray - Tests []string + Tests StringArray } } diff --git a/skipgen_test.go b/skipgen_test.go index 18d9a91..c214ee8 100644 --- a/skipgen_test.go +++ b/skipgen_test.go @@ -109,14 +109,10 @@ func TestSkipMinimum(t *testing.T) { skiplist: - reason: Some test reason url: https://bugs.linaro.org/show_bug.cgi?id=3145 - environments: - - production - boards: - - x15 - branches: - - "4.4" - tests: - - run_vmtests + environments: production # Test UnmarshallYAML + boards: x15 # Test UnmarshallYAML + branches: "4.4" # Test UnmarshallYAML + tests: run_vmtests # Test UnmarshallYAML ` skips, err := parseSkipfile([]byte(skipAll)) if err != nil {