Corrupt artifacts


I'm using teamcity to build a project but the output binaries(.elf) in artifacts are corrupt. The build runner is executing a python script which in turn executes a shell script in cygwin that starts the make process. If I run the python script by it self in the build agent then binaries are correct, but when executing it from teamcity the binaries are corrupt. I know this is a odd one, but any ideas or suggestions would be much appreciated.

More info:

Agent Os: Windows XP
Compiler: Freescale Codewarrior HSC08
Build runner: Command line
Command executable: C:\Python27\python.exe

Snippet python script:

def buildBaseBandBinary(cygwinPath, path):
  aPath = os.getcwd()
  #convert to Unix path
  uPath = "/cygdrive/" + (aPath[0:1]).lower() + (aPath.replace(aPath[0:1]+":\\", "/")).replace("\\", "/")
  uPath = uPath + "/" + path.replace("\\", "/")
  f = open("", 'wb') #make shure binary so that line endings are preserved
  f.write("cd " + uPath + "\n")
  f.write("make -f  cleanall\n")
  f.write("make -f\n")
  print os.environ.get('PATH', '')
  os.system(cygwinPath + " -i -l " + aPath + "\\")

1 comment
Comment actions Permalink

Please for testing purposes create static shell script and start it directly without calling Python.

Do you use any output redirect within script?


Please sign in to leave a comment.