From: Jack Jansen Date: Thu, 15 Aug 2002 21:48:16 +0000 (+0000) Subject: After generating the Python file with definitions try to run it, so X-Git-Tag: v2.3c1~4445 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=87eea88b5a198234cb18980d6f3a155de176ea6e;p=thirdparty%2FPython%2Fcpython.git After generating the Python file with definitions try to run it, so we catch errors during the build process in stead of later during runtime. --- diff --git a/Mac/Modules/ae/aescan.py b/Mac/Modules/ae/aescan.py index b406ce784f40..3a59ec8561ea 100644 --- a/Mac/Modules/ae/aescan.py +++ b/Mac/Modules/ae/aescan.py @@ -20,6 +20,8 @@ def main(): scanner = AppleEventsScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done Scanning and Generating, now doing 'import aesupport' ===" import aesupport print "=== Done 'import aesupport'. It's up to you to compile AEmodule.c ===" diff --git a/Mac/Modules/app/appscan.py b/Mac/Modules/app/appscan.py index 286d3ce5167d..695e0d94636b 100644 --- a/Mac/Modules/app/appscan.py +++ b/Mac/Modules/app/appscan.py @@ -17,6 +17,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/carbonevt/CarbonEvtscan.py b/Mac/Modules/carbonevt/CarbonEvtscan.py index 467b8a848af7..d3088fd0f230 100644 --- a/Mac/Modules/carbonevt/CarbonEvtscan.py +++ b/Mac/Modules/carbonevt/CarbonEvtscan.py @@ -19,6 +19,8 @@ def main(): scanner = CarbonEvents_Scanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "--done scanning, importing--" import CarbonEvtsupport print "done" diff --git a/Mac/Modules/cf/cfscan.py b/Mac/Modules/cf/cfscan.py index 0bcf914842e7..aa0ea3de434d 100644 --- a/Mac/Modules/cf/cfscan.py +++ b/Mac/Modules/cf/cfscan.py @@ -44,6 +44,8 @@ def main(): scanner.scan() scanner.gentypetest(SHORT+"typetest.py") scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/cg/cgscan.py b/Mac/Modules/cg/cgscan.py index 4ed2127be765..5d84500d6eb6 100755 --- a/Mac/Modules/cg/cgscan.py +++ b/Mac/Modules/cg/cgscan.py @@ -22,6 +22,8 @@ def main(): scanner.scan() scanner.gentypetest(SHORT+"typetest.py") scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/cm/cmscan.py b/Mac/Modules/cm/cmscan.py index c846eb00af7b..7ca15f24fb17 100644 --- a/Mac/Modules/cm/cmscan.py +++ b/Mac/Modules/cm/cmscan.py @@ -16,6 +16,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/ctl/ctlscan.py b/Mac/Modules/ctl/ctlscan.py index aac2cc444686..25250091e3a8 100644 --- a/Mac/Modules/ctl/ctlscan.py +++ b/Mac/Modules/ctl/ctlscan.py @@ -14,6 +14,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now doing 'import ctlsupport' ===" import ctlsupport print "=== Done. It's up to you to compile Ctlmodule.c ===" diff --git a/Mac/Modules/dlg/dlgscan.py b/Mac/Modules/dlg/dlgscan.py index 828fd5406921..770d4d218921 100644 --- a/Mac/Modules/dlg/dlgscan.py +++ b/Mac/Modules/dlg/dlgscan.py @@ -18,6 +18,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/drag/dragscan.py b/Mac/Modules/drag/dragscan.py index 1d62f6e70f4c..e305e04bd580 100644 --- a/Mac/Modules/drag/dragscan.py +++ b/Mac/Modules/drag/dragscan.py @@ -25,6 +25,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now doing 'import dragsupport' ===" import dragsupport print "=== Done. It's up to you to compile Dragmodule.c ===" diff --git a/Mac/Modules/evt/evtscan.py b/Mac/Modules/evt/evtscan.py index dcb9ee040de0..0c0ff4948fbb 100644 --- a/Mac/Modules/evt/evtscan.py +++ b/Mac/Modules/evt/evtscan.py @@ -17,6 +17,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/fm/fmscan.py b/Mac/Modules/fm/fmscan.py index 8deee504dd6c..2364980bfc9b 100644 --- a/Mac/Modules/fm/fmscan.py +++ b/Mac/Modules/fm/fmscan.py @@ -16,6 +16,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/help/helpscan.py b/Mac/Modules/help/helpscan.py index fdfd78028eb4..67a7e53f5962 100644 --- a/Mac/Modules/help/helpscan.py +++ b/Mac/Modules/help/helpscan.py @@ -17,6 +17,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/htmlrender/htmlscan.py b/Mac/Modules/htmlrender/htmlscan.py index ff2de327e356..81f107c2b1b2 100644 --- a/Mac/Modules/htmlrender/htmlscan.py +++ b/Mac/Modules/htmlrender/htmlscan.py @@ -19,6 +19,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/ibcarbon/IBCarbonscan.py b/Mac/Modules/ibcarbon/IBCarbonscan.py index c0dea7e90182..1f05217253f9 100644 --- a/Mac/Modules/ibcarbon/IBCarbonscan.py +++ b/Mac/Modules/ibcarbon/IBCarbonscan.py @@ -17,6 +17,8 @@ def main(): scanner = IBCarbon_Scanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "--done scanning, importing--" import IBCarbonsupport print "done" diff --git a/Mac/Modules/icn/icnscan.py b/Mac/Modules/icn/icnscan.py index 519d9e52e622..6ed3108831e5 100644 --- a/Mac/Modules/icn/icnscan.py +++ b/Mac/Modules/icn/icnscan.py @@ -17,6 +17,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/list/listscan.py b/Mac/Modules/list/listscan.py index d9638aa32ade..d835a688bed7 100644 --- a/Mac/Modules/list/listscan.py +++ b/Mac/Modules/list/listscan.py @@ -17,6 +17,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/menu/menuscan.py b/Mac/Modules/menu/menuscan.py index 625e7ed71a69..60c691525f1c 100644 --- a/Mac/Modules/menu/menuscan.py +++ b/Mac/Modules/menu/menuscan.py @@ -13,6 +13,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now doing 'import menusupport' ===" import menusupport print "=== Done. It's up to you to compile Menumodule.c ===" diff --git a/Mac/Modules/mlte/mltescan.py b/Mac/Modules/mlte/mltescan.py index e55f22270300..980a98e97c69 100644 --- a/Mac/Modules/mlte/mltescan.py +++ b/Mac/Modules/mlte/mltescan.py @@ -19,6 +19,8 @@ def main(): scanner.scan() scanner.gentypetest(SHORT+"typetest.py") scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/qd/qdscan.py b/Mac/Modules/qd/qdscan.py index 1258a303db14..4c69ab054315 100644 --- a/Mac/Modules/qd/qdscan.py +++ b/Mac/Modules/qd/qdscan.py @@ -40,6 +40,8 @@ def main(): ifp.close() ofp.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" import qdsupport print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/qdoffs/qdoffsscan.py b/Mac/Modules/qdoffs/qdoffsscan.py index b2b55b22fc5f..ae7070777d21 100644 --- a/Mac/Modules/qdoffs/qdoffsscan.py +++ b/Mac/Modules/qdoffs/qdoffsscan.py @@ -13,6 +13,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" import qdoffssupport print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/qt/qtscan.py b/Mac/Modules/qt/qtscan.py index bcd16d91d9ea..3edf870b1ce5 100644 --- a/Mac/Modules/qt/qtscan.py +++ b/Mac/Modules/qt/qtscan.py @@ -17,6 +17,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/res/resscan.py b/Mac/Modules/res/resscan.py index cf4bcb136f42..51bf38d4550e 100644 --- a/Mac/Modules/res/resscan.py +++ b/Mac/Modules/res/resscan.py @@ -19,6 +19,8 @@ def main(): scanner = ResourcesScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now doing 'import ressupport' ===" import ressupport print "=== Done 'import ressupport'. It's up to you to compile Resmodule.c ===" diff --git a/Mac/Modules/scrap/scrapscan.py b/Mac/Modules/scrap/scrapscan.py index dbb083b3643d..b54d09d4f450 100644 --- a/Mac/Modules/scrap/scrapscan.py +++ b/Mac/Modules/scrap/scrapscan.py @@ -19,6 +19,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/snd/sndscan.py b/Mac/Modules/snd/sndscan.py index fc665bb4bcda..fc358a047afa 100644 --- a/Mac/Modules/snd/sndscan.py +++ b/Mac/Modules/snd/sndscan.py @@ -16,6 +16,8 @@ def main(): scanner = SoundScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now doing 'import sndsupport' ===" import sndsupport print "=== Done. It's up to you to compile Sndmodule.c ===" diff --git a/Mac/Modules/te/tescan.py b/Mac/Modules/te/tescan.py index 5ad1f18ea776..ed37dbbe253d 100644 --- a/Mac/Modules/te/tescan.py +++ b/Mac/Modules/te/tescan.py @@ -17,6 +17,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/waste/wastescan.py b/Mac/Modules/waste/wastescan.py index d2f367dd5430..b0644ecf66fc 100644 --- a/Mac/Modules/waste/wastescan.py +++ b/Mac/Modules/waste/wastescan.py @@ -24,6 +24,8 @@ def main(): scanner.scan() ## scanner.gentypetest(SHORT+"typetest.py") scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" exec "import " + SHORT + "support" print "=== Done. It's up to you to compile it now! ===" diff --git a/Mac/Modules/win/winscan.py b/Mac/Modules/win/winscan.py index 0052fad60c06..06b421f830a7 100644 --- a/Mac/Modules/win/winscan.py +++ b/Mac/Modules/win/winscan.py @@ -13,6 +13,8 @@ def main(): scanner = MyScanner(input, output, defsoutput) scanner.scan() scanner.close() + print "=== Testing definitions output code ===" + execfile(defsoutput, {}, {}) print "=== Done scanning and generating, now importing the generated code... ===" import winsupport print "=== Done. It's up to you to compile it now! ==="