Page MenuHomePhabricator

[qa] Make src_dir handling more robust
Needs ReviewPublic

Authored by schancel on Fri, Nov 30, 03:09.


Group Reviewers
Restricted Project

Currently, the get_srcdir() function in tries to find the source directory by walking up the path from it's main module. However, this may not necessarily be located where the src directory actually is depending on how it is ran and imported. However, it also checks the SRC_DIR environment variable. This commit ensures this environment variable is always set based on the config, or an override environment variable. This way can always find the sources files it requires.

Test Plan

Diff Detail

rABC Bitcoin ABC
Lint OK
Auto-Fixtest/functional/ style violation
No Unit Test Coverage
Build Status
Buildable 4182
Build 6430: Bitcoin ABC Teamcity Staging
Build 6429: arc lint + arc unit

Event Timeline

schancel created this revision.Fri, Nov 30, 03:09
Herald added a reviewer: Restricted Project. · View Herald TranscriptFri, Nov 30, 03:09
jasonbcox requested changes to this revision.Fri, Nov 30, 22:05
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.

If src_dir already has a value from above, I think this check should fail with an error saying src_dir is defined twice

This revision now requires changes to proceed.Fri, Nov 30, 22:05
schancel requested review of this revision.Sat, Dec 1, 16:31
schancel marked an inline comment as done.
schancel added inline comments.

src_dir will always be defined by the config setup by ./configure

deadalnix requested changes to this revision.Sun, Dec 2, 23:11

I have no idea what problem this diff solves.

This revision now requires changes to proceed.Sun, Dec 2, 23:11
schancel requested review of this revision.Wed, Dec 5, 05:28
schancel edited the summary of this revision. (Show Details)