diff --git a/Makefile.am b/Makefile.am index 2e708dd..8481dbf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -49,6 +49,12 @@ EXTRA_DIST = pkg.m4 \ t/basic/uninstalled.test \ t/solver/circular-reference-1.test \ t/solver/circular-reference-2.test \ + t/sbom/license-file-bar.test \ + t/sbom/license-file-foo.test \ + t/sbom/license-isc.test \ + t/sbom/license-noassertion.test \ + t/sbom/source-tag-bar.test \ + t/sbom/source-tag-foo.test \ tests/lib-relocatable/lib/pkgconfig/foo.pc \ tests/lib1/argv-parse-2.pc \ tests/lib1/billion-laughs.pc \ @@ -281,6 +287,7 @@ CLEANFILES = $(EXTRA_PROGRAMS) \ check: pkgconf test-runner $(check_SCRIPTS) $(builddir)/test-runner$(EXEEXT) --test-fixtures=$(top_srcdir)/tests $(top_srcdir)/t/basic $(builddir)/test-runner$(EXEEXT) --test-fixtures=$(top_srcdir)/tests $(top_srcdir)/t/solver + $(builddir)/test-runner$(EXEEXT) --test-fixtures=$(top_srcdir)/tests $(top_srcdir)/t/sbom kyua --config=none test --kyuafile='$(top_builddir)/Kyuafile' \ --build-root='$(top_builddir)' diff --git a/meson.build b/meson.build index 6cbc8a9..64d787e 100644 --- a/meson.build +++ b/meson.build @@ -176,6 +176,7 @@ fixtures_dir = '@0@/tests'.format(meson.current_source_dir()) test_suites = [ 'basic', 'solver', + 'sbom', ] foreach t : test_suites diff --git a/t/sbom/license-file-bar.test b/t/sbom/license-file-bar.test new file mode 100644 index 0000000..6b4f0e6 --- /dev/null +++ b/t/sbom/license-file-bar.test @@ -0,0 +1,6 @@ +PackageSearchPath: lib1 +WantedFlags: dump-license-file +Query: bar +ExpectedStdout: foo: https://foo.bar/foo/COPYING +ExpectedStdout: bar: +MatchStdout: partial diff --git a/t/sbom/license-file-foo.test b/t/sbom/license-file-foo.test new file mode 100644 index 0000000..830b294 --- /dev/null +++ b/t/sbom/license-file-foo.test @@ -0,0 +1,4 @@ +PackageSearchPath: lib1 +WantedFlags: dump-license-file +Query: foo +ExpectedStdout: foo: https://foo.bar/foo/COPYING diff --git a/t/sbom/license-isc.test b/t/sbom/license-isc.test new file mode 100644 index 0000000..c686745 --- /dev/null +++ b/t/sbom/license-isc.test @@ -0,0 +1,4 @@ +PackageSearchPath: lib1 +WantedFlags: dump-license +Query: foo +ExpectedStdout: foo: ISC diff --git a/t/sbom/license-noassertion.test b/t/sbom/license-noassertion.test new file mode 100644 index 0000000..9271469 --- /dev/null +++ b/t/sbom/license-noassertion.test @@ -0,0 +1,6 @@ +PackageSearchPath: lib1 +WantedFlags: dump-license +Query: bar +ExpectedStdout: bar: NOASSERTION +ExpectedStdout: foo: ISC +MatchStdout: partial diff --git a/t/sbom/source-tag-bar.test b/t/sbom/source-tag-bar.test new file mode 100644 index 0000000..f8190d4 --- /dev/null +++ b/t/sbom/source-tag-bar.test @@ -0,0 +1,6 @@ +PackageSearchPath: lib1 +WantedFlags: dump-source +Query: bar +ExpectedStdout: foo: https://foo.bar/foo +ExpectedStdout: bar: +MatchStdout: partial diff --git a/t/sbom/source-tag-foo.test b/t/sbom/source-tag-foo.test new file mode 100644 index 0000000..f21491e --- /dev/null +++ b/t/sbom/source-tag-foo.test @@ -0,0 +1,4 @@ +PackageSearchPath: lib1 +WantedFlags: dump-source +Query: foo +ExpectedStdout: foo: https://foo.bar/foo diff --git a/tests/basic.sh b/tests/basic.sh index 0c4adee..d856620 100755 --- a/tests/basic.sh +++ b/tests/basic.sh @@ -8,17 +8,11 @@ tests_init \ libs_static \ libs_static_ordering \ libs_metapackage \ - license_isc \ - license_noassertion \ - license_file_foo \ - license_file_empty \ pkg_config_path \ arbitary_path \ with_path \ relocatable \ single_depth_selectors \ - source_foo \ - source_empty \ print_variables_env \ variable_env \ variable_no_recurse \ @@ -108,48 +102,6 @@ single_depth_selectors_body() pkgconf --with-path=${selfdir}/lib3 --print-requires bar } -license_isc_body() -{ - atf_check \ - -o inline:"foo: ISC\n" \ - pkgconf --with-path=${selfdir}/lib1 --license foo -} - -license_noassertion_body() -{ - atf_check \ - -o inline:"bar: NOASSERTION\nfoo: ISC\n" \ - pkgconf --with-path=${selfdir}/lib1 --license bar -} - -license_file_foo_body() -{ - atf_check \ - -o inline:"foo: https://foo.bar/foo/COPYING\n" \ - pkgconf --with-path=${selfdir}/lib1 --license-file foo -} - -license_file_empty_body() -{ - atf_check \ - -o inline:"bar: \nfoo: https://foo.bar/foo/COPYING\n" \ - pkgconf --with-path=${selfdir}/lib1 --license-file bar -} - -source_foo_body() -{ - atf_check \ - -o inline:"foo: https://foo.bar/foo\n" \ - pkgconf --with-path=${selfdir}/lib1 --source foo -} - -source_empty_body() -{ - atf_check \ - -o inline:"bar: \nfoo: https://foo.bar/foo\n" \ - pkgconf --with-path=${selfdir}/lib1 --source bar -} - print_variables_env_body() { atf_check \