quicksilver / Quicksilver

Quicksilver Project Source
http://qsapp.com
Apache License 2.0
2.74k stars 286 forks source link

[Bug]: Multiple Quicksilver_Tests fail when run as part of Quicksilver scheme #2971

Closed n8henrie closed 1 year ago

n8henrie commented 1 year ago

Before submitting your bug report, please confirm you have completed the following steps

Bug description

Of the tests for the Quicksilver scheme, these three fail when run directly:

All tests, including these, pass when run as part of the Quicksilver Distribution scheme.

Why is this?

Steps to reproduce

  1. In Xcode, select the Quicksilver scheme
  2. Run tests
  3. Observe that these three tests fail

Expected behavior

These tests should pass when run in isolation.

MacOS Version

None

Quicksilver Version

No response

Relevant Plugins

No response

Crash Logs or Spindump

No response

Screenshots

No response

Additional info

These tests fail as part of the Quicksilver Distribution depending on the order in which they are run; if one selects the option to randomize test order, they fail frequently.

The common theme between these three is:

QSInterfaceController *i = [(QSController *)[NSApp delegate] interfaceController];
QSCollectingSearchObjectView *dSelector = (QSCollectingSearchObjectView *)[i dSelector];

When run as part of the Quicksilver Distribution, *i is non-nil. When run as part of Quicksilver, this is a nil pointer.

Similarly, [QSReg preferredCommandInterface] is a nil pointer when run from Quicksilver but non-nil with Quicksilver Distribution: https://github.com/quicksilver/Quicksilver/blob/main/Quicksilver/Code-App/QSController.m#L784

Having a hard time chasing this down, it seems like these tests should be set up to pass from this scheme (since they pass when run from Quicksilver Distribution); if there is some fundamental reason why they won't, perhaps they should be moved?

Any pointers from @pjrobertson @skurfer ?

n8henrie commented 1 year ago

The Quicksilver test testActionsForURLObject fails if run immediately after a clean but succeeds if I first change schemes and run tests for Core Support.

n8henrie commented 1 year ago

testClearingFirstPane fails even if I run all 3 of the other test sets (QuickStep Core, Core Support, and QuickStep Foundation) first, but succeeds if I run it as part of the Quicksilver Distribution scheme.