autotests: Use built executable instead of installed
AbandonedPublic

Authored by bruns on Apr 2 2018, 9:28 AM.

Details

Reviewers
elvisangelaccio
michaelh
Group Reviewers
Baloo
Frameworks

Diff Detail

Repository
R824 Baloo Widgets
Branch
testexe (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
michaelh created this revision.Apr 2 2018, 9:28 AM
Restricted Application added a project: Baloo. · View Herald TranscriptApr 2 2018, 9:28 AM
michaelh requested review of this revision.Apr 2 2018, 9:28 AM
michaelh updated this revision to Diff 31265.Apr 4 2018, 9:31 AM
  • Add our extractor to PATH
alexeymin added inline comments.
autotests/filemetadatawidgettest.cpp
60

Should probably use QDir::listSeparator() instead of this #ifdef logic

michaelh added inline comments.Apr 4 2018, 9:41 AM
autotests/filemetadatawidgettest.cpp
60

Great! Thanks.

michaelh updated this revision to Diff 31267.Apr 4 2018, 9:44 AM
  • Use list separator

Code looks fine, but I did not test if it actually works. ;)

autotests/filemetadatawidgettest.cpp
58 ↗(On Diff #31267)

Missing space after comma?

michaelh updated this revision to Diff 31289.Apr 4 2018, 11:38 AM
  • Move excess space to line 58
michaelh marked 3 inline comments as done.Apr 4 2018, 11:38 AM
michaelh added a comment.EditedApr 4 2018, 11:41 AM

Code looks fine, but I did not test if it actually works. ;)

It's a little hard to see the effect of this, because the installed extractor and the freshly built have to differ somehow. D11913 brought the necessity for this into the light.

michaelh retitled this revision from extractortest: Use built executable instead of installed to autotests: Use built executable instead of installed.Apr 4 2018, 12:29 PM
bruns added a subscriber: bruns.Apr 13 2018, 3:34 PM

Code looks fine, but I did not test if it actually works. ;)

It's a little hard to see the effect of this, because the installed extractor and the freshly built have to differ somehow. D11913 brought the necessity for this into the light.

Maybe we can add a trivial dummy extractor which is used in unittests, but not anywhere else. It could e.g. return the current date, compilation timestamp (i.e. DATE), and the KF version.

Maybe we can add a trivial dummy extractor which is used in unittests, but not anywhere else. It could e.g. return the current date, compilation timestamp (i.e. DATE), and the KF version.

I'm not sure if this wouldn't be too error prone. Every change in baloo_filemetadata_temp_extractor has to be accompanied by a respective change in the dummy.
Someone new to the code and not as skilled as you are might overlook that.
Also that wouldn't help much as in src/indexeddataretriever.cpp:

IndexedDataRetriever::start()
const QString exe = QStandardPaths::findExecutable(QLatin1String("baloo_filemetadata_temp_extractor"));

@bruns this diff tries to accomplish the same as D19268, and can be closed, right?

bruns commandeered this revision.Apr 7 2019, 7:42 PM
bruns abandoned this revision.
bruns added a reviewer: michaelh.

Obsoleted by D19268