diff --git a/tools/jenkins-scripts/gen_jsb.py b/tools/jenkins-scripts/gen_jsb.py index 0d18dbacf3..1403b49400 100644 --- a/tools/jenkins-scripts/gen_jsb.py +++ b/tools/jenkins-scripts/gen_jsb.py @@ -1,9 +1,16 @@ #!/usr/bin/python import os +import sys +ret = 0 genbindings_dirs = ['tolua'] for item in genbindings_dirs: os.chdir("tools/" + item) - os.system('python genbindings.py') + ret = os.system('python genbindings.py') os.chdir("../..") + if(ret != 0): + ret = 1 + break + +sys.exit(ret) diff --git a/tools/jenkins-scripts/pull-request-builder.py b/tools/jenkins-scripts/pull-request-builder.py index c9d753bffe..8b6b8909f6 100755 --- a/tools/jenkins-scripts/pull-request-builder.py +++ b/tools/jenkins-scripts/pull-request-builder.py @@ -103,16 +103,18 @@ def main(): # Generate binding glue codes if(branch == 'develop'): - os.system("python tools/jenkins-scripts/gen_jsb.py") + ret = os.system("python tools/jenkins-scripts/gen_jsb.py") elif(branch == 'master'): os.chdir('tools/tojs') if(platform.system() == 'Windows'): os.environ['NDK_ROOT'] = os.environ['NDK_ROOT_R8E'] - os.system("genbindings-win32.bat") + ret = os.system("genbindings-win32.bat") os.environ['NDK_ROOT'] = os.environ['NDK_ROOT_R9B'] else: - os.system("./genbindings.sh") + ret = os.system("./genbindings.sh") os.chdir('../..') + if(ret != 0): + return(1) #make temp dir print "current dir is: " + os.environ['WORKSPACE']