Page MenuHomePhabricator

[qa] Make src_dir handling more robust
Needs ReviewPublic

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

Details

Reviewers
deadalnix
jasonbcox
Group Reviewers
Restricted Project
Summary

Currently, the get_srcdir() function in cdefs.py 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 cdefs.py can always find the sources files it requires.

Test Plan
./test/functional/test_runner.py

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint OK
SeverityLocationCodeMessage
Auto-Fixtest/functional/test_runner.py:1CFMTCode style violation
Unit
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.
test/functional/test_runner.py
143

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.
test/functional/test_runner.py
143

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)