Page MenuHomeFreeBSD

usr.bin/pkgconf: import the test suite
Needs ReviewPublic

Authored by khorben on Sat, Jul 4, 1:36 AM.
Tags
None
Referenced Files
F163950442: D58034.id181741.diff
Mon, Jul 27, 10:14 AM
Unknown Object (File)
Sat, Jul 25, 8:36 PM
Unknown Object (File)
Fri, Jul 24, 8:31 PM
Unknown Object (File)
Fri, Jul 24, 4:38 PM
Unknown Object (File)
Fri, Jul 24, 12:12 PM
Unknown Object (File)
Fri, Jul 24, 9:02 AM
Unknown Object (File)
Fri, Jul 24, 7:06 AM
Unknown Object (File)
Wed, Jul 22, 1:27 PM
Subscribers

Details

Reviewers
markj
Summary

This integrates pkgconf's own test suite with that of the base system.

Some tests are still missing (e.g., for memory allocation) but they require a Linux host to complete.

Test Plan

I have been able to perform all of the tests successfully (log below) by now.

$ cd /usr/tests/usr.bin/pkgconf
$ $PWD/pkgconf_tests
1..28
# Log of test suite run on Mon Jul 13 05:27:30 UTC 2026
ok 1 pkgconf:api-audit
# test-api-audit -> test_audit_log_no_logfile_is_noop: PASS
# test-api-audit -> test_audit_set_log_and_write: PASS
# test-api-audit -> test_audit_log_multiple_writes: PASS
# test-api-audit -> test_audit_log_dependency_versionless: PASS
# test-api-audit -> test_audit_log_dependency_versioned: PASS
# test-api-audit -> test_audit_log_dependency_no_logfile_is_noop: PASS
ok 2 pkgconf:api-buffer
# test-api-buffer -> test_buffer_empty: PASS
# test-api-buffer -> test_buffer_append: PASS
# test-api-buffer -> test_buffer_append_slice: PASS
# test-api-buffer -> test_buffer_append_fmt: PASS
# test-api-buffer -> test_buffer_prepend: PASS
# test-api-buffer -> test_buffer_push_byte: PASS
# test-api-buffer -> test_buffer_trim_byte: PASS
# test-api-buffer -> test_buffer_reset: PASS
# test-api-buffer -> test_buffer_freeze: PASS
# test-api-buffer -> test_buffer_copy: PASS
# test-api-buffer -> test_buffer_join: PASS
# test-api-buffer -> test_buffer_contains: PASS
# test-api-buffer -> test_buffer_match: PASS
# test-api-buffer -> test_buffer_has_prefix: PASS
# test-api-buffer -> test_buffer_subst: PASS
# test-api-buffer -> test_buffer_subst_empty_pattern: PASS
# test-api-buffer -> test_buffer_escape: PASS
# test-api-buffer -> test_str_eq_slice: PASS
# test-api-buffer -> test_span_contains: PASS
# test-api-buffer -> test_buffer_fputs_nonempty: PASS
# test-api-buffer -> test_buffer_fputs_empty: PASS
ok 3 pkgconf:api-bytecode
# test-api-bytecode -> test_eval_plain_text: PASS
# test-api-bytecode -> test_eval_empty_input: PASS
# test-api-bytecode -> test_eval_variable_substitution: PASS
# test-api-bytecode -> test_eval_nested_variables: PASS
# test-api-bytecode -> test_eval_multiple_variables: PASS
# test-api-bytecode -> test_eval_undefined_variable: PASS
# test-api-bytecode -> test_eval_sysroot_detection: PASS
# test-api-bytecode -> test_eval_null_args: PASS
# test-api-bytecode -> test_emit_guards: PASS
# test-api-bytecode -> test_emit_text_and_eval: PASS
# test-api-bytecode -> test_emit_var_and_eval: PASS
# test-api-bytecode -> test_emit_sysroot_and_eval: PASS
# test-api-bytecode -> test_dollar_escape: PASS
# test-api-bytecode -> test_malformed_unclosed: PASS
# test-api-bytecode -> test_empty_braces: PASS
# test-api-bytecode -> test_circular_reference: PASS
# test-api-bytecode -> test_references_var: PASS
# test-api-bytecode -> test_references_var_text_only: PASS
# test-api-bytecode -> test_compile_time_sysroot: PASS
# test-api-bytecode -> test_sysroot_dot_disables: PASS
# test-api-bytecode -> test_sysroot_root_disables: PASS
# test-api-bytecode -> test_sysroot_trailing_slash_trimmed: PASS
# test-api-bytecode -> test_sysroot_normalizes_to_root_disables: PASS
# test-api-bytecode -> test_rewrite_selfrefs: PASS
# test-api-bytecode -> test_rewrite_selfrefs_no_match: PASS
# test-api-bytecode -> test_compile_eval_roundtrip: PASS
# test-api-bytecode -> test_compile_produces_nonempty_buffer: PASS
# test-api-bytecode -> test_compile_null_args: PASS
ok 4 pkgconf:api-client
# test-api-client -> test_client_new_and_free: PASS
# test-api-client -> test_client_init_and_deinit_stack: PASS
# test-api-client -> test_client_init_system_paths_from_environ: PASS
# test-api-client -> test_client_preload_from_environ: PASS
# test-api-client -> test_client_sysroot_dir: PASS
# test-api-client -> test_client_buildroot_dir: PASS
# test-api-client -> test_client_flags: PASS
# test-api-client -> test_client_prefix_varname: PASS
# test-api-client -> test_client_error_handler_fires: PASS
# test-api-client -> test_client_warn_handler_fires: PASS
# test-api-client -> test_client_trace_handler_fires: PASS
# test-api-client -> test_client_unveil_handler_installation: PASS
# test-api-client -> test_client_getenv_via_handler: PASS
# test-api-client -> test_client_dir_list_build_smoke: PASS
# test-api-client -> test_client_trace_null_client: PASS
ok 5 pkgconf:api-dependency
# test-api-dependency -> test_comparator_lookup_known: PASS
# test-api-dependency -> test_comparator_lookup_unknown: PASS
# test-api-dependency -> test_comparator_roundtrip: PASS
# test-api-dependency -> test_parse_str_empty: PASS
# test-api-dependency -> test_parse_str_single: PASS
# test-api-dependency -> test_parse_str_versioned: PASS
# test-api-dependency -> test_parse_str_multiple_space_separated: PASS
# test-api-dependency -> test_parse_str_multiple_comma_separated: PASS
# test-api-dependency -> test_parse_str_mixed_versioned_and_bare: PASS
# test-api-dependency -> test_parse_str_all_comparators: PASS
# test-api-dependency -> test_dependency_add: PASS
# test-api-dependency -> test_dependency_add_no_version: PASS
# test-api-dependency -> test_dependency_add_multiple: PASS
# test-api-dependency -> test_dependency_collision_drops_flagged_newcomer: PASS
# test-api-dependency -> test_dependency_collision_drops_flagged_existing: PASS
# test-api-dependency -> test_version_equal: PASS
# test-api-dependency -> test_version_simple_numeric: PASS
# test-api-dependency -> test_version_numeric_segments_not_lexical: PASS
# test-api-dependency -> test_version_different_lengths: PASS
# test-api-dependency -> test_version_alpha_suffix: PASS
# test-api-dependency -> test_version_tilde_prerelease: PASS
# test-api-dependency -> test_version_numeric_beats_alpha: PASS
# test-api-dependency -> test_version_alpha_ordering: PASS
# test-api-dependency -> test_version_dotted_vs_hyphenated: PASS
# test-api-dependency -> test_version_leading_zeros: PASS
# test-api-dependency -> test_version_trailing_zero_segments: PASS
# test-api-dependency -> test_version_null_handling: PASS
# test-api-dependency -> test_version_tilde_both_sides: PASS
# test-api-dependency -> test_version_separator_equivalence: PASS
# test-api-dependency -> test_version_case_insensitive: PASS
# test-api-dependency -> test_version_alpha_prefix: PASS
ok 6 pkgconf:api-fileio
# test-api-fileio -> test_fgetline_no_trailing_newline: PASS
# test-api-fileio -> test_fgetline_empty_stream: PASS
# test-api-fileio -> test_fgetline_lf: PASS
# test-api-fileio -> test_fgetline_crlf: PASS
# test-api-fileio -> test_fgetline_lone_cr: PASS
# test-api-fileio -> test_fgetline_backslash_continuation_lf: PASS
# test-api-fileio -> test_fgetline_backslash_continuation_crlf: PASS
# test-api-fileio -> test_fgetline_backslash_continuation_lone_cr: PASS
# test-api-fileio -> test_fgetline_backslash_not_continuation: PASS
# test-api-fileio -> test_fgetline_crlf_split_across_fgets_buffer: PASS
ok 7 pkgconf:api-fragment
# test-api-fragment -> test_fragment_parse_empty: PASS
# test-api-fragment -> test_fragment_parse_cflags: PASS
# test-api-fragment -> test_fragment_parse_libs: PASS
# test-api-fragment -> test_fragment_add_single: PASS
# test-api-fragment -> test_fragment_render_empty: PASS
# test-api-fragment -> test_fragment_render_cflags: PASS
# test-api-fragment -> test_fragment_render_libs: PASS
# test-api-fragment -> test_fragment_filter_only_includes: PASS
# test-api-fragment -> test_fragment_filter_only_libnames: PASS
# test-api-fragment -> test_fragment_filter_keeps_nothing: PASS
# test-api-fragment -> test_fragment_has_system_dir_matches: PASS
# test-api-fragment -> test_fragment_has_system_dir_libs: PASS
ok 8 pkgconf:api-license
# test-api-license -> test_license_insert_and_free: PASS
# test-api-license -> test_license_free_empty: PASS
# test-api-license -> test_license_evaluate_single: PASS
# test-api-license -> test_license_evaluate_or: PASS
# test-api-license -> test_license_evaluate_and: PASS
# test-api-license -> test_license_evaluate_multiple_keys_implicit_and: PASS
# test-api-license -> test_license_evaluate_brackets: PASS
# test-api-license -> test_license_evaluate_empty: PASS
# test-api-license -> test_license_evaluate_sanitizes: PASS
# test-api-license -> test_license_evaluate_long_sanitized_token: PASS
# test-api-license -> test_license_evaluate_unterminated_quote: PASS
# test-api-license -> test_license_render_empty: PASS
# test-api-license -> test_license_render_single: PASS
# test-api-license -> test_license_copy_list: PASS
ok 9 pkgconf:api-path-utils
# test-api-path-utils -> test_path_find_basename: PASS
# test-api-path-utils -> test_path_trim_basename: PASS
# test-api-path-utils -> test_determine_prefix_logic: PASS
# test-api-path-utils -> test_path_prepend: PASS
# test-api-path-utils -> test_path_prepend_filter: PASS
# test-api-path-utils -> test_path_prepend_list: PASS
# test-api-path-utils -> test_path_is_plausible: PASS
ok 10 pkgconf:api-personality
# test-api-personality -> test_personality_deinit_null: PASS
# test-api-personality -> test_personality_default_refcount: PASS
# test-api-personality -> test_personality_find_invalid_triplet: PASS
# test-api-personality -> test_personality_find_direct_path: PASS
# test-api-personality -> test_personality_find_via_xdg: PASS
# test-api-personality -> test_personality_find_missing_returns_default: PASS
ok 11 pkgconf:api-queue
# test-api-queue -> test_queue_validate_success: PASS
# test-api-queue -> test_queue_validate_version_satisfied: PASS
# test-api-queue -> test_queue_validate_missing_package: PASS
# test-api-queue -> test_queue_validate_unsatisfiable_version: PASS
# test-api-queue -> test_queue_validate_empty: PASS
# test-api-queue -> test_queue_apply_success: PASS
# test-api-queue -> test_queue_apply_callback_failure: PASS
# test-api-queue -> test_queue_apply_missing_package: PASS
ok 12 pkgconf:api-tuple
# test-api-tuple -> test_tuple_add_and_find: PASS
# test-api-tuple -> test_tuple_find_absent: PASS
# test-api-tuple -> test_tuple_add_multiple: PASS
# test-api-tuple -> test_tuple_free_empty: PASS
# test-api-tuple -> test_tuple_global_add_and_find: PASS
# test-api-tuple -> test_tuple_global_find_absent: PASS
# test-api-tuple -> test_tuple_define_global_kv_form: PASS
# test-api-tuple -> test_tuple_define_global_with_equals_in_value: PASS
# test-api-tuple -> test_tuple_global_multiple: PASS
# test-api-tuple -> test_tuple_global_free_resets: PASS
# test-api-tuple -> test_tuple_define_variable_end_to_end: PASS
# test-api-tuple -> test_tuple_define_variable_overrides_local: PASS
# test-api-tuple -> test_tuple_escaped_quote: PASS
ok 13 pkgconf:api-variable
# test-api-variable -> test_variable_new_and_free: PASS
# test-api-variable -> test_variable_get_or_create_creates: PASS
# test-api-variable -> test_variable_get_or_create_returns_existing: PASS
# test-api-variable -> test_variable_find_present: PASS
# test-api-variable -> test_variable_find_absent: PASS
# test-api-variable -> test_variable_find_among_many: PASS
# test-api-variable -> test_variable_delete: PASS
# test-api-variable -> test_variable_eval_str_plain: PASS
# test-api-variable -> test_variable_eval_str_with_reference: PASS
# test-api-variable -> test_variable_eval_str_chained: PASS
# test-api-variable -> test_variable_list_free_handles_empty: PASS
# test-api-variable -> test_variable_list_free_handles_many: PASS
ok 14 pkgconf:api-version
# test-api-version -> test_version_equal: PASS
# test-api-version -> test_version_null: PASS
# test-api-version -> test_version_numeric: PASS
# test-api-version -> test_version_leading_zeros: PASS
# test-api-version -> test_version_component_count: PASS
# test-api-version -> test_version_separators: PASS
# test-api-version -> test_version_tilde: PASS
# test-api-version -> test_version_alpha_numeric: PASS
# test-api-version -> test_version_real_world: PASS
ok 15 pkgconf:api-serialize
# test-api-serialize -> test_serialize_value_string: PASS
# test-api-serialize -> test_serialize_value_int: PASS
# test-api-serialize -> test_serialize_value_bool: PASS
# test-api-serialize -> test_serialize_value_null: PASS
# test-api-serialize -> test_serialize_escape_sequences: PASS
# test-api-serialize -> test_serialize_object_mixed_types: PASS
# test-api-serialize -> test_serialize_array_mixed_types: PASS
# test-api-serialize -> test_serialize_null_guards: PASS
ok 16 pkgconf:basic
# PASS: arbitrary-path.test
# PASS: builtin-pkg-config-exists.test
# PASS: builtin-pkg-config-pc_path-variable.test
# PASS: builtin-pkgconf-exists.test
# PASS: builtin-pkgconf-pc_path-variable.test
# PASS: cflags-shared-static.test
# PASS: cflags-shared.test
# PASS: define-prefix-child-prefix-env.test
# PASS: define-prefix-child-prefix.test
# PASS: define-prefix.test
# PASS: direct-query-with-pkg_config_path.test
# PASS: env-tuple.test
# PASS: exists-cflags-env.test
# PASS: exists-cflags.test
# PASS: exists-nonexistent.test
# PASS: exists-version-greater-than-with-tilde.test
# PASS: exists-version-greater-than.test
# PASS: exists-version-less-than-with-tilde.test
# PASS: exists-version-malformed.test
# PASS: exists-version-minimum.test
# PASS: exists-version-with-tilde.test
# PASS: incomplete-cflags.test
# PASS: incomplete-libs.test
# PASS: keep-system-libs-2.test
# PASS: keep-system-libs.test
# PASS: libs-cflags-version-multiple-comma.test
# PASS: libs-cflags-version-multiple.test
# PASS: libs-cflags-version-not-provided.test
# PASS: libs-cflags-version-not.test
# PASS: libs-cflags-version.test
# PASS: libs-cflags.test
# PASS: libs-env.test
# PASS: libs-only.test
# PASS: libs-shared-static.test
# PASS: libs-shared.test
# PASS: libs.test
# PASS: malformed-empty-package.test
# PASS: modversion-fullpath.test
# PASS: modversion-noflatten.test
# PASS: modversion-uninstalled.test
# PASS: modversion-verbose-prefix.test
# PASS: noargs.test
# PASS: nocflags.test
# PASS: nolibs.test
# PASS: pkg-config-path.test
# PASS: print-variables-env.test
# PASS: requires-shared-static.test
# PASS: requires-shared.test
# PASS: single-depth-selectors.test
# PASS: static-archive-libs.test
# PASS: uninstalled-not.test
# PASS: uninstalled.test
# # test skipped: requires a UTF-8 locale
# SKIP: utf8-pkg-config-path.test
# PASS: variable-env.test
# PASS: variable-no-recursion.test
# PASS: variable.test
# PASS: version-atleast-1.test
# PASS: version-atleast-2.test
# PASS: version-exact-1.test
# PASS: version-exact-2.test
# PASS: version-max-1.test
# PASS: version-max-2.test
ok 17 pkgconf:cli
# Package foo was not found in the pkg-config search path.
# Perhaps you should add the directory containing `foo.pc'
# to the PKG_CONFIG_PATH environment variable
# Package 'foo' not found
# Package boguspkg was not found in the pkg-config search path.
# Perhaps you should add the directory containing `boguspkg.pc'
# to the PKG_CONFIG_PATH environment variable
# Package 'boguspkg' not found
# Please specify at least one package name on the command line.
# pkgconf: unknown option -- bogus-flag
# PASS: about.test
# PASS: atleast-pkgconfig-version-fail.test
# PASS: atleast-pkgconfig-version-pass.test
# PASS: atleast-version-fail.test
# PASS: atleast-version-inline-constraint.test
# PASS: atleast-version-inline-overrides.test
# PASS: atleast-version-pass.test
# PASS: cflags-libs.test
# PASS: debug.test
# PASS: define-variable.test
# PASS: dont-define-prefix.test
# PASS: dump-personality-loaded.test
# PASS: dump-personality.test
# PASS: env-allow-system-cflags-default.test
# PASS: env-allow-system-cflags.test
# PASS: env-allow-system-libs-default.test
# PASS: env-allow-system-libs.test
# PASS: env-dont-relocate-paths.test
# PASS: env-early-trace.test
# PASS: env-log.test
# PASS: env-maximum-traverse-depth.test
# PASS: env-msvc-syntax.test
# PASS: env-only.test
# PASS: env-top-build-dir.test
# PASS: env.test
# PASS: exact-version-fail.test
# PASS: exact-version-inline-constraint.test
# PASS: exact-version-inline-overrides.test
# PASS: exact-version-pass.test
# PASS: exists-missing.test
# PASS: exists-valid.test
# PASS: fragment-filter.test
# PASS: help.test
# PASS: internal-cflags.test
# PASS: keep-system-cflags-flag.test
# PASS: keep-system-libs-flag.test
# PASS: list-package-names.test
# PASS: log-file.test
# PASS: max-version-fail.test
# PASS: max-version-inline-constraint.test
# PASS: max-version-inline-overrides.test
# PASS: max-version-pass.test
# PASS: maximum-traverse-depth.test
# PASS: missing-package-error.test
# PASS: missing-package.test
# PASS: modversion.test
# PASS: no-arguments.test
# PASS: no-cache.test
# PASS: no-provides.test
# PASS: no-uninstalled.test
# PASS: path.test
# PASS: personality.test
# PASS: prefix-variable.test
# PASS: print-provides.test
# PASS: print-requires-private.test
# PASS: print-requires.test
# PASS: print-variables.test
# PASS: shared.test
# PASS: short-errors.test
# PASS: silence-errors.test
# PASS: simulate.test
# PASS: solution.test
# PASS: unknown-option.test
# PASS: validate-warning.test
# PASS: validate.test
# PASS: variable.test
# PASS: verbose.test
# PASS: version.test
# PASS: with-path.test
ok 18 pkgconf:link-abi
# PASS: cxx-leaf-static.test
# PASS: cxx-leaf.test
# PASS: default-c.test
# PASS: multi-dedup.test
# PASS: private-requires-shared.test
# PASS: private-requires-static.test
# PASS: public-requires.test
ok 19 pkgconf:ordering
# PASS: cflags-never-mergeback.test
# PASS: cflags-only.test
# PASS: flag-order-1.test
# PASS: flag-order-2.test
# PASS: flag-order-3.test
# PASS: flag-order-4.test
# PASS: fragment-collision.test
# PASS: framework-1.test
# PASS: framework-2.test
# PASS: framework-3.test
# PASS: idirafter-munge-ordering.test
# PASS: idirafter-ordering.test
# PASS: isystem-munge-ordering.test
# PASS: libs-never-mergeback.test
ok 20 pkgconf:parser
# PASS: argv-parse-1.test
# PASS: argv-parse-2.test
# PASS: argv-parse-3.test
# PASS: c-comments-should-warn.test
# PASS: comments-in-fields.test
# PASS: comments.test
# PASS: dollar-sign-escape-2.test
# PASS: dollar-sign-escape.test
# PASS: dos-lineendings.test
# PASS: escaped-backslashes-in-output.test
# PASS: fragment-comment.test
# PASS: fragment-escaping-1.test
# PASS: fragment-escaping-2.test
# PASS: fragment-escaping-3.test
# PASS: fragment-groups-composite.test
# PASS: fragment-groups.test
# PASS: fragment-quoting-2.test
# PASS: fragment-quoting-3.test
# PASS: fragment-quoting-5.test
# PASS: fragment-quoting-7.test
# PASS: fragment-quoting.test
# PASS: fragment-tree.test
# PASS: framework-with-libs.test
# PASS: malformed-no-newlines.test
# PASS: malformed-quoting.test
# PASS: msvc-fragment-quoting.test
# PASS: msvc-fragment-render-cflags.test
# PASS: multiline-bogus-header.test
# PASS: multiline-field.test
# PASS: multiline-folding-cflags.test
# PASS: multiline-folding-libs.test
# PASS: no-trailing-newline.test
# PASS: paren-quoting.test
# PASS: shell-quoted-output.test
# PASS: tilde-quoting-1.test
# PASS: tilde-quoting-2.test
# PASS: truncated-files-should-fail-to-parse.test
# PASS: tuple-dequote.test
# PASS: variable-fragment-expansion.test
# PASS: variable-whitespace.test
# PASS: version-with-whitespace-2.test
# PASS: version-with-whitespace-diagnostic.test
# PASS: version-with-whitespace.test
ok 21 pkgconf:personality
# PASS: dump-personality.test
# PASS: pc-path-var.test
# PASS: pc-system-includedirs.test
# PASS: pc-system-libdirs.test
ok 22 pkgconf:solver
# PASS: circular-reference-1.test
# PASS: circular-reference-2.test
# PASS: circular-reference-directpc.test
# PASS: compound-foo-metapackage-3.test
# PASS: conflicts-solution-error.test
# PASS: conflicts-solution-ignore.test
# PASS: conflicts-solution-is-fine-standalone.test
# PASS: depgraph-break-1.test
# PASS: depgraph-break-2.test
# PASS: depgraph-break-3.test
# PASS: libs-intermediary.test
# PASS: libs-metapackage.test
# PASS: libs-static-ordering.test
# PASS: missing-required-dep.test
# PASS: modversion-provides.test
# PASS: private-libs-duplication-digraph.test
# PASS: private-libs-duplication.test
# PASS: provides-bar-any.test
# PASS: provides-bar-versioned-equal.test
# PASS: provides-bar-versioned-greater-than-equal.test
# PASS: provides-bar-versioned-greater-than.test
# PASS: provides-bar-versioned-less-than-equal.test
# PASS: provides-bar-versioned-less-than-new.test
# PASS: provides-bar-versioned-less-than-old.test
# PASS: provides-bar-versioned-not-equal-old.test
# PASS: provides-bar-versioned-not-equal.test
# PASS: provides-foo-any.test
# PASS: provides-foo-versioned-exact.test
# PASS: provides-foo-versioned-greater-than-equal.test
# PASS: provides-foo-versioned-greater-than.test
# PASS: provides-foo-versioned-less-than-equal.test
# PASS: provides-foo-versioned-less-than.test
# PASS: provides-foo-versioned-not-equal.test
# PASS: provides-indirect-dependency-versioned.test
# PASS: provides-indirect-dependency.test
# PASS: provides-print-simple.test
# PASS: provides-request-simple-no-provides.test
# PASS: provides-request-simple.test
# PASS: query-no-space-0.test
# PASS: query-no-space-1.test
# PASS: query-order-1.test
# PASS: query-order-2.test
# PASS: requires-cflags-libs-private-1.test
# PASS: requires-cflags-libs-private-2.test
# PASS: requires-internal-collision.test
# PASS: requires-internal-missing-nonstatic-cflags-libs.test
# PASS: requires-internal-missing-nonstatic.test
# PASS: requires-internal-missing-static-cflags.test
# PASS: requires-internal-missing.test
# PASS: requires-internal.test
# PASS: requires-libs-cflags.test
# PASS: requires-libs-static-2.test
# PASS: requires-libs-static-pure.test
# PASS: requires-libs-static.test
# PASS: requires-libs.test
# PASS: requires-private-debounce.test
# PASS: requires-private-missing.test
# PASS: requires-static-cflags.test
ok 23 pkgconf:sbom
# PASS: license-file-bar.test
# PASS: license-file-foo.test
# PASS: license-isc.test
# PASS: license-malformed-token.test
# PASS: license-noassertion.test
# PASS: source-tag-bar.test
# PASS: source-tag-foo.test
ok 24 pkgconf:sysroot
# PASS: cflags-rewriting.test
# PASS: explicit-sysroot.test
# PASS: idirafter-munge-sysroot.test
# PASS: isystem-munge-sysroot.test
# PASS: isystem-sysroot-prefixed.test
# PASS: no-pc_sysrootdir-rewriting-2.test
# PASS: no-pc_sysrootdir-rewriting-3.test
# PASS: no-pc_sysrootdir-rewriting-4.test
# PASS: no-pc_sysrootdir-rewriting-5.test
# PASS: no-pc_sysrootdir-rewriting-variable.test
# PASS: path-segment-awareness.test
# PASS: skip-rewriting-when-sysroot-dir-is-root-dir.test
# PASS: sysroot-differs-from-destdir-injects.test
# PASS: sysroot-equals-destdir-fdo-rules.test
# PASS: undefined-pc_sysrootdir-should-be-empty.test
# PASS: uninstalled-rewriting-fdo-rules-with-pc_sysrootdir.test
# PASS: uninstalled-rewriting-fdo-rules.test
# PASS: uninstalled-rewriting-pkgconf-1-rules.test
# PASS: uninstalled-rewriting.test
# PASS: variable-rewriting-1.test
# PASS: variable-rewriting-2.test
ok 25 pkgconf:tuple
# PASS: billion-laughs.test
# PASS: case-sensitivity-1.test
# PASS: case-sensitivity-2.test
# PASS: define-variable-override.test
# PASS: define-variable.test
# PASS: duplicate-upsert.test
# PASS: empty-tuple.test
ok 26 pkgconf:bomtool
# unable to open /nonexistent-dir/out.txt: No such file or directory
# pkgconf: unknown option -- bogus-option
# Package no-such-pkg was not found in the pkg-config search path.
# Perhaps you should add the directory containing `no-such-pkg.pc'
# to the PKG_CONFIG_PATH environment variable
# Package 'no-such-pkg' not found
# PASS: about.test
# PASS: bad-output.test
# PASS: basic.test
# PASS: default-time.test
# PASS: define-variable-with-dependency.test
# PASS: define-variable.test
# PASS: help.test
# PASS: meta-package.test
# PASS: multiple-packages.test
# PASS: no-license.test
# PASS: output-file.test
# PASS: package-whitespace.test
# PASS: private-dependency.test
# PASS: source-date-epoch-precedence.test
# PASS: source-date-epoch.test
# PASS: special-chars.test
# PASS: unknown-option.test
# PASS: unknown-package.test
# PASS: version-operator.test
# PASS: version.test
# PASS: with-dependency.test
ok 27 pkgconf:spdxtool
# unable to open /nonexistent-dir/out.json: No such file or directory
# pkgconf: unknown option -- bogus-option
# Package no-such-pkg was not found in the pkg-config search path.
# Perhaps you should add the directory containing `no-such-pkg.pc'
# to the PKG_CONFIG_PATH environment variable
# Package 'no-such-pkg' not found
# PASS: about.test
# PASS: agent-name-space.test
# PASS: agent-name.test
# PASS: bad-output.test
# PASS: basic-with-colon.test
# PASS: basic-with-spdx-base-id.test
# PASS: basic.test
# PASS: creation-id.test
# PASS: default-time.test
# PASS: define-variable-with-dependency.test
# PASS: define-variable.test
# PASS: help.test
# PASS: meta-package-with-colon-spdx-base-id.test
# PASS: meta-package.test
# PASS: multi-copyright.test
# PASS: multiple-packages.test
# PASS: no-license.test
# PASS: output-file.test
# PASS: package-whitespace.test
# PASS: private-dependency.test
# PASS: source-date-epoch-precedence.test
# PASS: source-date-epoch.test
# PASS: special-chars.test
# PASS: unknown-option.test
# PASS: unknown-package.test
# PASS: version-operator.test
# PASS: version.test
# PASS: with-dependency.test
ok 28 pkgconf:symlink
# PASS: pcfiledir_symlink_absolute_env1.test
# PASS: pcfiledir_symlink_absolute_env10.test
# PASS: pcfiledir_symlink_absolute_env11.test
# PASS: pcfiledir_symlink_absolute_env12.test
# PASS: pcfiledir_symlink_absolute_env2.test
# PASS: pcfiledir_symlink_absolute_env3.test
# PASS: pcfiledir_symlink_absolute_env4.test
# PASS: pcfiledir_symlink_absolute_env5.test
# PASS: pcfiledir_symlink_absolute_env6.test
# PASS: pcfiledir_symlink_absolute_env7.test
# PASS: pcfiledir_symlink_absolute_env8.test
# PASS: pcfiledir_symlink_absolute_env9.test
# PASS: pcfiledir_symlink_relative_env1.test
# PASS: pcfiledir_symlink_relative_env10.test
# PASS: pcfiledir_symlink_relative_env11.test
# PASS: pcfiledir_symlink_relative_env12.test
# PASS: pcfiledir_symlink_relative_env2.test
# PASS: pcfiledir_symlink_relative_env3.test
# PASS: pcfiledir_symlink_relative_env4.test
# PASS: pcfiledir_symlink_relative_env5.test
# PASS: pcfiledir_symlink_relative_env6.test
# PASS: pcfiledir_symlink_relative_env7.test
# PASS: pcfiledir_symlink_relative_env8.test
# PASS: pcfiledir_symlink_relative_env9.test

Or with kyua(1):

$ (cd usr.bin/pkgconf && make tests && cd tests && make install)
[...]
$ (cd /usr/tests/usr.bin/pkgconf && kyua test)
pkgconf_tests:main  ->  passed  [1.228s]

Results file id is usr_tests_usr.bin_pkgconf.20260713-053053-676588
Results saved to /home/khorben/.kyua/store/results.usr_tests_usr.bin_pkgconf.20260713-053053-676588.db

1/1 passed (0 broken, 0 failed, 0 skipped)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

Fixed inconsistent indentation in etc/mtree/BSD.tests.dist.

khorben edited the test plan for this revision. (Show Details)

Imported more tests from the 2.9.93 release.
Some still remain to be integrated, like for spdxtool specifically.

I have run the tests manually, I'm still not quite sure how to run them through FreeBSD's build system.

Something like,

# make -C usr.bin/pkgconf/tests install
$ cd /usr/tests/usr.bin/pkgconf
$ kyua test
usr.bin/pkgconf/tests/Makefile
40

Why NO_SHARED?

usr.bin/pkgconf/tests/pkgconf_tests.sh
2

Missing a license header.

32

Rather than assuming the test programs are in the PATH, you can qualify the path with something like

local base=$(dirname $0)
...
_test $i "pkgconf:api-$test" ${base}/test-api-$test
khorben edited the summary of this revision. (Show Details)
khorben edited the test plan for this revision. (Show Details)

Added the SPDX license header.
Added discovery mechanism for the location of the test executables.

khorben edited the summary of this revision. (Show Details)
khorben edited the test plan for this revision. (Show Details)

Also hooked the serialisation test for spdxtool.

Are the tests all passing now?

Now copying most of the test data required: only 2 tests do not pass on my local setup (the spdxtool binary is required and I have not installed it yet).

khorben edited the summary of this revision. (Show Details)
khorben edited the test plan for this revision. (Show Details)

Copied missing data.
Registered the missing test directories in etc/mtree/BSD.tests.dist.
Forced a C locale to avoid the UTF-8 test. (Original test file removed from our import because of UTF-8 filename)

Are the tests all passing now?

Now yes! *phew*

Removed use of NO_SHARED for the test binaries.

khorben added inline comments.
usr.bin/pkgconf/tests/Makefile
40

This is what pkgconf does, which I believe makes sense when running the test suite in place from the source repository. Since we are installing and running the test suite after installing the libprivatepkgconf library, we do not need NO_SHARED.