mirror of
https://github.com/pkgconf/pkgconf.git
synced 2026-01-26 16:09:27 +00:00
tests: convert sbom-related tests
Signed-off-by: Ariadne Conill <ariadne@ariadne.space>
This commit is contained in:
parent
6867afe86e
commit
a4ade8586d
@ -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)'
|
||||
|
||||
|
||||
@ -176,6 +176,7 @@ fixtures_dir = '@0@/tests'.format(meson.current_source_dir())
|
||||
test_suites = [
|
||||
'basic',
|
||||
'solver',
|
||||
'sbom',
|
||||
]
|
||||
|
||||
foreach t : test_suites
|
||||
|
||||
6
t/sbom/license-file-bar.test
Normal file
6
t/sbom/license-file-bar.test
Normal file
@ -0,0 +1,6 @@
|
||||
PackageSearchPath: lib1
|
||||
WantedFlags: dump-license-file
|
||||
Query: bar
|
||||
ExpectedStdout: foo: https://foo.bar/foo/COPYING
|
||||
ExpectedStdout: bar:
|
||||
MatchStdout: partial
|
||||
4
t/sbom/license-file-foo.test
Normal file
4
t/sbom/license-file-foo.test
Normal file
@ -0,0 +1,4 @@
|
||||
PackageSearchPath: lib1
|
||||
WantedFlags: dump-license-file
|
||||
Query: foo
|
||||
ExpectedStdout: foo: https://foo.bar/foo/COPYING
|
||||
4
t/sbom/license-isc.test
Normal file
4
t/sbom/license-isc.test
Normal file
@ -0,0 +1,4 @@
|
||||
PackageSearchPath: lib1
|
||||
WantedFlags: dump-license
|
||||
Query: foo
|
||||
ExpectedStdout: foo: ISC
|
||||
6
t/sbom/license-noassertion.test
Normal file
6
t/sbom/license-noassertion.test
Normal file
@ -0,0 +1,6 @@
|
||||
PackageSearchPath: lib1
|
||||
WantedFlags: dump-license
|
||||
Query: bar
|
||||
ExpectedStdout: bar: NOASSERTION
|
||||
ExpectedStdout: foo: ISC
|
||||
MatchStdout: partial
|
||||
6
t/sbom/source-tag-bar.test
Normal file
6
t/sbom/source-tag-bar.test
Normal file
@ -0,0 +1,6 @@
|
||||
PackageSearchPath: lib1
|
||||
WantedFlags: dump-source
|
||||
Query: bar
|
||||
ExpectedStdout: foo: https://foo.bar/foo
|
||||
ExpectedStdout: bar:
|
||||
MatchStdout: partial
|
||||
4
t/sbom/source-tag-foo.test
Normal file
4
t/sbom/source-tag-foo.test
Normal file
@ -0,0 +1,4 @@
|
||||
PackageSearchPath: lib1
|
||||
WantedFlags: dump-source
|
||||
Query: foo
|
||||
ExpectedStdout: foo: https://foo.bar/foo
|
||||
@ -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 \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user