DESC="Generate dependencies and compile source code without specifying the dependency file"

runtest()
{
  mkdir -p dep obj

  DepFile="dep/Test.d"
  ObjFile="obj/Test.o"


  EXEC="${AGCC} --path ${TestSrcDir} -v2  -MD -c -o ${ObjFile} ${TestSrcDir}/Test.cc"
  
  echo "Executing '${EXEC}'"

  if  ( ${EXEC} );then true;else
    ERR_MSG="Failed executing  '${EXEC}'"
    return 1
  fi

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

  # if [ ! -f ${ObjFile} ];then
  #   ERR_MSG="Object file '${ObjFile}' was not created"
  #   return 1
  # fi;

  # DepRefFile="dep/Test.ref.d"
  # g++ -include "${TestSrcDir}/trace.ah" -M  -o Test.ref.o "${TestSrcDir}/Test.cc"

  # echo -e "\nDIFF BETWEEN FILES '${DepRefFile}' and '${DepFile}': \n"
  # if ( diff "${DepRefFile}" "${DepFile}" );then
  #   echo  " none"
  #   return 0
  # else
  #   ERR_MSG="Dependency information differs between 'g++' and 'ag++' (files: '${DepRefFile}' and '${DepFile}')"
  #   return 1
  # fi
}


