comparison scripts/build.py @ 153:3ab91c56d7bc

* Fix `pythontools` unit tests on windows. * Handle import error when resolving the module in `<python:exec>`
author cmlenz
date Mon, 22 Aug 2005 11:21:18 +0000
parents f3f5895e373c
children 634be6cbb808
comparison
equal deleted inserted replaced
152:56027862f910 153:3ab91c56d7bc
59 try: 59 try:
60 recipe = Recipe(xmlio.parse(recipe_file)) 60 recipe = Recipe(xmlio.parse(recipe_file))
61 for step in recipe: 61 for step in recipe:
62 if not steps_to_run or step.id in steps_to_run: 62 if not steps_to_run or step.id in steps_to_run:
63 print 63 print
64 print '-->', step.description or step.id 64 print '-->', step.id
65 for type, function, output in step.execute(recipe.ctxt): 65 for type, function, output in step.execute(recipe.ctxt):
66 if type == Recipe.ERROR: 66 if type == Recipe.ERROR:
67 log.error('Failure in step "%s": %s', step.id, output) 67 log.error('Failure in step "%s": %s', step.id, output)
68 elif type == Recipe.REPORT and options.print_reports: 68 elif type == Recipe.REPORT and options.print_reports:
69 output.write(sys.stdout, newlines=True) 69 output.write(sys.stdout, newlines=True)
74 74
75 if __name__ == '__main__': 75 if __name__ == '__main__':
76 try: 76 try:
77 main() 77 main()
78 except BuildError, e: 78 except BuildError, e:
79 print
79 print>>sys.stderr, 'FAILED: %s' % e 80 print>>sys.stderr, 'FAILED: %s' % e
80 sys.exit(-1) 81 sys.exit(-1)
82 print
81 print 'SUCCESS' 83 print 'SUCCESS'
Copyright (C) 2012-2017 Edgewall Software