Page MenuHomePhabricator

Don't require the "gd" extension be installed in order to run unit tests
ClosedPublic

Authored by epriestley on Nov 30 2017, 9:47 PM.
Tags
None
Referenced Files
F15530646: D18812.diff
Wed, Apr 23, 6:44 AM
F15491621: D18812.diff
Sat, Apr 12, 5:33 AM
F15487426: D18812.id45134.diff
Thu, Apr 10, 1:55 PM
F15470814: D18812.diff
Sat, Apr 5, 1:42 AM
F15458427: D18812.diff
Mon, Mar 31, 12:33 AM
F15433767: D18812.id.diff
Mar 25 2025, 12:35 AM
F15432891: D18812.id45133.diff
Mar 24 2025, 8:09 PM
F15430290: D18812.id45134.diff
Mar 24 2025, 6:56 AM
Subscribers
None

Details

Summary

Ref T10405. If gd is not installed, a number of unit tests currently fail because they generate synthetic users and try to composite profile pictures for them.

Instead, just fall back to a static default if gd is not available.

Test Plan

Faked this pathway, created a new user, saw a default profile picture.

Diff Detail

Repository
rP Phabricator
Branch
nogd
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 18906
Build 25495: Run Core Tests
Build 25494: arc lint + arc unit

Event Timeline

This revision is now accepted and ready to land.Nov 30 2017, 9:49 PM

I see a handful of other places where we use imagecreatefromstring(); should we be fixing those as well?

This revision was automatically updated to reflect the committed changes.

Ideally, yeah -- I merged everything I could remember/find into T10405 as a sort of umbrella for these. In this case, Lyuba was just hitting a narrow issue with getting arc diff to make it through the workflow.

These can be kind of a pain to hunt down and not having gd is rare, and some of them already get guarded in other ways, and in other cases we're probably reasonable already (we can't really do anything about actual thumbnailing, for example, I think) or the issue is entangled with other stuff (T13016 / T5258). So I didn't go on a hunting expedition, but it's definitely desirable that we're more robust against gd being missing than we currently are.