sanitycheck: allow placing parsetab.py in a custom dir
when running multiple instances of sanitycheck, allow placing the parsetab.py in a customer location that can be set using an environment variable. export PARSETAB_DIR=/tmp/ run sanitycheck and the parsetab.py will be placed in /tmp/. Fixes #4513 Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
4701f0190c
commit
9c974b966c
1 changed files with 4 additions and 1 deletions
|
@ -164,7 +164,10 @@ def p_error(p):
|
|||
else:
|
||||
raise SyntaxError("Unexpected end of expression")
|
||||
|
||||
parser = yacc.yacc(debug=0)
|
||||
if "PARSETAB_DIR" not in os.environ:
|
||||
parser = yacc.yacc(debug=0)
|
||||
else:
|
||||
parser = yacc.yacc(debug=0, outputdir=os.environ["PARSETAB_DIR"])
|
||||
|
||||
def ast_sym(ast, env):
|
||||
if ast in env:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue