daily_automated

This commit is contained in:
paolo.iocco
2023-03-09 12:51:54 +00:00
parent 37cd9379ef
commit 565036fa09
122 changed files with 8658 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
#!/usr/bin/env python
import subprocess
import sys
import os
actionLine = sys.argv[1]
projectFile = sys.argv[2]
codeFile = open(projectFile+".gcb", 'r')
startLine = codeFile.readline()[3:].strip()
boardLine = codeFile.readline()[3:].strip()
endLine = codeFile.readline()[3:].strip()
codeFile.close()
# print projectFile
# print startLine
# print actionLine
# print boardLine
# print portLine
# print endLine
family=boardLine.split(':')[0]
processor=boardLine.split(':')[1]
#projectFile=projectFile.split(".")[0]
if (startLine != "########### start ###########" or endLine != "########### end ###########"):
print("\n Buddy: Error in build-commands - can't process file")
sys.exit()
if actionLine=="flash":
actionLine=actionLine+"_" + family
gcbCommand = "make " + actionLine + " file=" + projectFile + " cpu=" + processor
print(gcbCommand)
#print("\n\n -- GreatCowBasic Command --")
#print(gcbCommand)
#
#print("-- Starting %s --\n" %(actionLine))
#
presult = subprocess.call(gcbCommand, shell=True)
#presult = os.system(gcbCommand)
if presult != 0:
print("\n Buddy: Failed - result code = %s --" %(presult))
else:
print("\n Buddy: -- Success --")