DESC="Check if command option '-a0' is handeld correctly"

mkdir -p dep
DepFile=dep/Test.d

runtest()
{

  EXEC="${AGCC} -p ${TestSrcDir} -a0 -v2 -MF ${DepFile} -M ${TestSrcDir}/*.cc"
  if  ( ${EXEC} );then true;else
    ERR_MSG="Execution failed: '${EXEC}'"
    return 1
  fi

  if [ ! -f ${DepFile} ];then
    ERR_MSG="File with dependency information was not generated"
    return 1
  fi

  EXEC="${AGCC} -a ${TestSrcDir}/trace.ah -a0 -v2 -MF ${DepFile} -M ${TestSrcDir}/*.cc"
  if  (${EXEC});then
    ERR_MSG="Execution should have failed but succeeded: '${EXEC}'"
    return 1
  fi

  return 0
}
