a/codesys-ide/scripts/buildtest.py | b/codesys-ide/scripts/build-test.py | ||
---|---|---|---|
... |
... |
||
41 | 41 | ||
42 | helper.install_missing_libraries(proj, librarymanager) |
42 | helper.install_missing_libraries(proj, librarymanager) |
43 | # proj.save() |
43 | # proj.save() |
44 | print("create bootapp '%s'" % destination) |
44 | print("create bootapp '%s'" % destination) |
45 | try: |
45 | try: |
46 | proj.active_application.create_boot_application(destination) |
46 | proj.active_application.create_boot_application(os.path.basename(destination)) |
47 | except: |
47 | except: |
48 | print("Error: Creation of bootapplication failed") |
48 | print("Error: Creation of bootapplication failed") |
49 | # Get message objects which contain all the data |
49 | # Get message objects which contain all the data |
50 | severities = { |
50 | severities = { |
51 | Severity.FatalError : "Fatal error", Severity.Error : "Error", |
51 | Severity.FatalError : "Fatal error", Severity.Error : "Error", |
52 | Severity.Warning : "Warning", Severity.Information : "Information", |
52 | Severity.Warning : "Warning", Severity.Information : "Information", |
53 | Severity.Text : "Text" |
53 | Severity.Text : "Text" |
54 | } |
54 | } |
55 | msgs = system.get_message_objects(CompileCategory, Severity.FatalError|Severity.Error) |
55 | msgs = system.get_message_objects(CompileCategory, Severity.FatalError|Severity.Error) |
56 | xError = False |
||
56 | for msg in msgs: |
57 | for msg in msgs: |
57 | sev = severities[msg.severity] |
58 | sev = severities[msg.severity] |
58 | print("{} {}{}: {}".format(sev, msg.prefix, msg.number, msg.text)) |
59 | if msg.severity == Severity.FatalError: |
60 | xError = True |
||
61 | print("%s %s%s: %s" % (sev, msg.prefix, msg.number, msg.text)) |
||
59 | return None |
62 | if not xError: |
60 | print("done." % destination) |
63 | return None |
61 | proj.close() |
64 | proj.close() |
62 | return destination |
65 | return destination |
63 | 66 | ||
64 | 67 | ||
65 | class SearchBuildDo(helper.SearchBuild): |
68 | class SearchBuildDo(helper.SearchBuild): |