diff --git a/playbooks/unit-test.yaml b/playbooks/unit-test.yaml index f93dc8476..f42263fb4 100644 --- a/playbooks/unit-test.yaml +++ b/playbooks/unit-test.yaml @@ -19,7 +19,12 @@ tasks: - include_tasks: build.yaml - - name: Test - command: meson test -C builddir --verbose + - name: Linting tests + command: meson test -C builddir --verbose --suite linting + args: + chdir: '{{ zuul.project.src_dir }}' + + - name: Unit tests + command: meson test -C builddir --verbose --suite unit args: chdir: '{{ zuul.project.src_dir }}' diff --git a/src/meson.build b/src/meson.build index 46bed646c..cc742f753 100644 --- a/src/meson.build +++ b/src/meson.build @@ -119,9 +119,33 @@ custom_target( ) if shellcheck.found() - test('shellcheck src/go-build-wrapper', shellcheck, args: [go_build_wrapper_file]) + test( + 'shellcheck go-build-wrapper', + shellcheck, + args: [go_build_wrapper_file], + suite: 'linting' + ) endif -test('go fmt', meson_go_fmt_program, args: [meson.current_source_dir()]) -test('go vet', go, args: ['vet', '-c', '3', './...'], workdir: meson.current_source_dir()) -test('go test', go, args: ['test', '-vet', 'off', './...'], workdir: meson.current_source_dir()) +test( + 'go fmt', + meson_go_fmt_program, + args: [meson.current_source_dir()], + suite: 'linting' +) + +test( + 'go vet', + go, + args: ['vet', '-c', '3', './...'], + suite: 'linting', + workdir: meson.current_source_dir() +) + +test( + 'go test', + go, + args: ['test', '-vet', 'off', './...'], + suite: 'unit', + workdir: meson.current_source_dir() +)