mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +01:00
pytest: Better dealing with env variables to configure tests
This commit is contained in:
committed by
Rusty Russell
parent
db84525b67
commit
23da30a2a4
@@ -15,9 +15,12 @@ import utils
|
|||||||
|
|
||||||
bitcoind = None
|
bitcoind = None
|
||||||
TEST_DIR = tempfile.mkdtemp(prefix='lightning-')
|
TEST_DIR = tempfile.mkdtemp(prefix='lightning-')
|
||||||
VALGRIND = os.getenv("NOVALGRIND", None) == None
|
VALGRIND = os.getenv("NOVALGRIND", "0") == "0"
|
||||||
|
TEST_DEBUG = os.getenv("TEST_DEBUG", "0") == "1"
|
||||||
|
|
||||||
if os.getenv("TEST_DEBUG", None) != None:
|
print("Testing results are in {}".format(TEST_DIR))
|
||||||
|
|
||||||
|
if TEST_DEBUG:
|
||||||
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
|
logging.basicConfig(level=logging.DEBUG, stream=sys.stdout)
|
||||||
logging.info("Tests running in '%s'", TEST_DIR)
|
logging.info("Tests running in '%s'", TEST_DIR)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user