Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87eea88

Browse files
committed
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.
1 parent 8120415 commit 87eea88

27 files changed

Lines changed: 54 additions & 0 deletions

File tree

Mac/Modules/ae/aescan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ def main():
2020
scanner = AppleEventsScanner(input, output, defsoutput)
2121
scanner.scan()
2222
scanner.close()
23+
print "=== Testing definitions output code ==="
24+
execfile(defsoutput, {}, {})
2325
print "=== Done Scanning and Generating, now doing 'import aesupport' ==="
2426
import aesupport
2527
print "=== Done 'import aesupport'. It's up to you to compile AEmodule.c ==="

Mac/Modules/app/appscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def main():
1717
scanner = MyScanner(input, output, defsoutput)
1818
scanner.scan()
1919
scanner.close()
20+
print "=== Testing definitions output code ==="
21+
execfile(defsoutput, {}, {})
2022
print "=== Done scanning and generating, now importing the generated code... ==="
2123
exec "import " + SHORT + "support"
2224
print "=== Done. It's up to you to compile it now! ==="

Mac/Modules/carbonevt/CarbonEvtscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ def main():
1919
scanner = CarbonEvents_Scanner(input, output, defsoutput)
2020
scanner.scan()
2121
scanner.close()
22+
print "=== Testing definitions output code ==="
23+
execfile(defsoutput, {}, {})
2224
print "--done scanning, importing--"
2325
import CarbonEvtsupport
2426
print "done"

Mac/Modules/cf/cfscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ def main():
4444
scanner.scan()
4545
scanner.gentypetest(SHORT+"typetest.py")
4646
scanner.close()
47+
print "=== Testing definitions output code ==="
48+
execfile(defsoutput, {}, {})
4749
print "=== Done scanning and generating, now importing the generated code... ==="
4850
exec "import " + SHORT + "support"
4951
print "=== Done. It's up to you to compile it now! ==="

Mac/Modules/cg/cgscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ def main():
2222
scanner.scan()
2323
scanner.gentypetest(SHORT+"typetest.py")
2424
scanner.close()
25+
print "=== Testing definitions output code ==="
26+
execfile(defsoutput, {}, {})
2527
print "=== Done scanning and generating, now importing the generated code... ==="
2628
exec "import " + SHORT + "support"
2729
print "=== Done. It's up to you to compile it now! ==="

Mac/Modules/cm/cmscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def main():
1616
scanner = MyScanner(input, output, defsoutput)
1717
scanner.scan()
1818
scanner.close()
19+
print "=== Testing definitions output code ==="
20+
execfile(defsoutput, {}, {})
1921
print "=== Done scanning and generating, now importing the generated code... ==="
2022
exec "import " + SHORT + "support"
2123
print "=== Done. It's up to you to compile it now! ==="

Mac/Modules/ctl/ctlscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ def main():
1414
scanner = MyScanner(input, output, defsoutput)
1515
scanner.scan()
1616
scanner.close()
17+
print "=== Testing definitions output code ==="
18+
execfile(defsoutput, {}, {})
1719
print "=== Done scanning and generating, now doing 'import ctlsupport' ==="
1820
import ctlsupport
1921
print "=== Done. It's up to you to compile Ctlmodule.c ==="

Mac/Modules/dlg/dlgscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ def main():
1818
scanner = MyScanner(input, output, defsoutput)
1919
scanner.scan()
2020
scanner.close()
21+
print "=== Testing definitions output code ==="
22+
execfile(defsoutput, {}, {})
2123
print "=== Done scanning and generating, now importing the generated code... ==="
2224
exec "import " + SHORT + "support"
2325
print "=== Done. It's up to you to compile it now! ==="

Mac/Modules/drag/dragscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ def main():
2525
scanner = MyScanner(input, output, defsoutput)
2626
scanner.scan()
2727
scanner.close()
28+
print "=== Testing definitions output code ==="
29+
execfile(defsoutput, {}, {})
2830
print "=== Done scanning and generating, now doing 'import dragsupport' ==="
2931
import dragsupport
3032
print "=== Done. It's up to you to compile Dragmodule.c ==="

Mac/Modules/evt/evtscan.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ def main():
1717
scanner = MyScanner(input, output, defsoutput)
1818
scanner.scan()
1919
scanner.close()
20+
print "=== Testing definitions output code ==="
21+
execfile(defsoutput, {}, {})
2022
print "=== Done scanning and generating, now importing the generated code... ==="
2123
exec "import " + SHORT + "support"
2224
print "=== Done. It's up to you to compile it now! ==="

0 commit comments

Comments
 (0)