Carpenter holds on to win IndyCar race at Texas Motor Speedway