If the battery is bad enough it won't supply the alternator with enough juice to keep the field functional. At that point the ECM and other bike electronics would pull the power down until the ECM and various relays would drop out and the bike would die and not restart. How long it would run, really depends on how bad the battery is. If the battery started the bike, then it probably won't be bad enough to kill it. Usually a dead cell in the battery will cause it to be weak enough to not crank the motor and keep the electronics working for it to start.