mirror of https://gitee.com/openkylin/linux.git
tc-testing: split config file
Move the config customization into a site-local file tdc_config_local.py, so that updates of the tdc test software does not require hand-editing of the config. This patch includes a template for the site-local customization file. In addition, this makes it easy to revert to a stock tdc environment for testing the test framework and/or the core tests. Also it makes it harder for any custom config to be submitted back to the kernel tdc. Signed-off-by: Brenda J. Butler <bjb@mojatatu.com> Acked-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
a5a5efe999
commit
181d6610f5
|
@ -17,3 +17,17 @@ NAMES = {
|
|||
# Name of the namespace to use
|
||||
'NS': 'tcut'
|
||||
}
|
||||
|
||||
|
||||
ENVIR = { }
|
||||
|
||||
# put customizations in tdc_config_local.py
|
||||
try:
|
||||
from tdc_config_local import *
|
||||
except ImportError as ie:
|
||||
pass
|
||||
|
||||
try:
|
||||
NAMES.update(EXTRA_NAMES)
|
||||
except NameError as ne:
|
||||
pass
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
"""
|
||||
tdc_config_local.py - tdc plugin-writer-specified values
|
||||
|
||||
Copyright (C) 2017 bjb@mojatatu.com
|
||||
"""
|
||||
|
||||
import os
|
||||
|
||||
ENVIR = os.environ.copy()
|
||||
|
||||
ENV_LD_LIBRARY_PATH = os.getenv('LD_LIBRARY_PATH', '')
|
||||
ENV_OTHER_LIB = os.getenv('OTHER_LIB', '')
|
||||
|
||||
|
||||
# example adding value to NAMES, without editing tdc_config.py
|
||||
EXTRA_NAMES = dict()
|
||||
EXTRA_NAMES['SOME_BIN'] = os.path.join(os.getenv('OTHER_BIN', ''), 'some_bin')
|
||||
|
||||
|
||||
# example adding values to ENVIR, without editing tdc_config.py
|
||||
ENVIR['VALGRIND_LIB'] = '/usr/lib/valgrind'
|
||||
ENVIR['VALGRIND_BIN'] = '/usr/bin/valgrind'
|
||||
ENVIR['VGDB_BIN'] = '/usr/bin/vgdb'
|
Loading…
Reference in New Issue