Skip to content

Restore upstream sanity test t/001compile.t#161

Open
mrenvoize wants to merge 1 commit into
bugzilla:mainfrom
mrenvoize:fix-001compile-test
Open

Restore upstream sanity test t/001compile.t#161
mrenvoize wants to merge 1 commit into
bugzilla:mainfrom
mrenvoize:fix-001compile-test

Conversation

@mrenvoize

Copy link
Copy Markdown
Contributor

t/001compile.t (compiles every module/script) was dropped during Harmony's divergence because its shared enumeration/feature-gating no longer matched Harmony's extension layout and optional features. Restore it and fix the supporting machinery so it passes cleanly against Harmony's tree.

t/001compile.t:

  • use 5.10.1 (Harmony convention; satisfies t/002goodperl.t).
  • Map extension modules at extensions//lib/.pm to their real package name Bugzilla::Extension:::: before use_ok(), so the already-loaded module is found instead of being recompiled under a bogus path-derived name (which broke Moo accessors / inlined constructors).

t/Support/Files.pm (shared by all sanity tests):

  • Remove a duplicate extension-scan loop that added every extension .pm file to the test list twice.
  • Skip files under *.disabled/ sub-directories (e.g. Push's Connector.disabled/) and under template/ (template data .pl files); neither can be compiled stand-alone, and the former even produced a fatal parse error that aborted the whole run.
  • IGNORE Bugzilla/Test/MockDB.pm (mutates DB state at load) and Bugzilla/Report/Ping/Simple.pm (see below).

Bugzilla/Install/Requirements.pm (FEATURE_FILES):

  • Map optional-feature files so they are skipped when the feature is not installed, instead of failing to compile: jobqueue-worker.pl (jobqueue), Bugzilla/App/Plugin/OAuth2.pm (oauth2_server), Bugzilla/Markdown/GFM* (alien_cmark), Bugzilla/Report/SecurityRisk.pm (chart_clicker), and Bugzilla/Attachment/Storage/S3.pm (s3, which had only the old Attachment/S3.pm path).

Note: Bugzilla/Report/Ping/Simple.pm is IGNOREd because it uses JSON::Validator's "joi" export, which has been removed from current JSON::Validator, so the module no longer compiles. This is a pre-existing bug that should be fixed or the module removed; quarantining it here keeps the guardrail meaningful without masking new breakage.

t/001compile.t (compiles every module/script) was dropped during Harmony's
divergence because its shared enumeration/feature-gating no longer matched
Harmony's extension layout and optional features. Restore it and fix the
supporting machinery so it passes cleanly against Harmony's tree.

t/001compile.t:
  - use 5.10.1 (Harmony convention; satisfies t/002goodperl.t).
  - Map extension modules at extensions/<Name>/lib/<Path>.pm to their real
    package name Bugzilla::Extension::<Name>::<Path> before use_ok(), so the
    already-loaded module is found instead of being recompiled under a bogus
    path-derived name (which broke Moo accessors / inlined constructors).

t/Support/Files.pm (shared by all sanity tests):
  - Remove a duplicate extension-scan loop that added every extension .pm
    file to the test list twice.
  - Skip files under *.disabled/ sub-directories (e.g. Push's
    Connector.disabled/) and under template/ (template data .pl files);
    neither can be compiled stand-alone, and the former even produced a
    fatal parse error that aborted the whole run.
  - IGNORE Bugzilla/Test/MockDB.pm (mutates DB state at load) and
    Bugzilla/Report/Ping/Simple.pm (see below).

Bugzilla/Install/Requirements.pm (FEATURE_FILES):
  - Map optional-feature files so they are skipped when the feature is not
    installed, instead of failing to compile: jobqueue-worker.pl (jobqueue),
    Bugzilla/App/Plugin/OAuth2.pm (oauth2_server), Bugzilla/Markdown/GFM*
    (alien_cmark), Bugzilla/Report/SecurityRisk.pm (chart_clicker), and
    Bugzilla/Attachment/Storage/S3.pm (s3, which had only the old
    Attachment/S3.pm path).

Note: Bugzilla/Report/Ping/Simple.pm is IGNOREd because it uses
JSON::Validator's "joi" export, which has been removed from current
JSON::Validator, so the module no longer compiles. This is a pre-existing
bug that should be fixed or the module removed; quarantining it here keeps
the guardrail meaningful without masking new breakage.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant