sysgen: Terminate build when error detected
System generator now terminates with a non-zero exit code when it detects an error, allowing the build system to detect the failure and terminate the build. Note: Sysgen only detects invalid keywords at this time. It would be nice if it also detected other syntax and semantic errors. Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
This commit is contained in:
parent
5b76cee54e
commit
d00b802a6d
1 changed files with 12 additions and 2 deletions
|
|
@ -136,6 +136,16 @@ def write_file(filename, contents):
|
|||
f.close()
|
||||
|
||||
|
||||
#
|
||||
# ERROR HANDLING
|
||||
#
|
||||
|
||||
|
||||
def sysgen_error(msg):
|
||||
print "\n*** sysgen error: " + msg + "\n"
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
#
|
||||
# CREATE INTERNAL REPRESENTATION OF SYSTEM
|
||||
#
|
||||
|
|
@ -227,8 +237,8 @@ def vpf_parse():
|
|||
driver_list.append(line[start_quote + 1:end_quote])
|
||||
continue
|
||||
|
||||
print "UNRECOGNIZED INPUT LINE"
|
||||
print words # display any unrecognized line
|
||||
sysgen_error("unrecognized keyword %s on following line\n%s" %
|
||||
(words[0], line))
|
||||
|
||||
|
||||
#
|
||||
|
|
|
|||
Loading…
Reference in a new issue