You're Toyota pickup can not pass the smog test if the check engine light is turned on. You'll need to have a smog check repair station extract the trouble code(s) which are causing the check engine light to illuminate and repair the faults. The trouble code(s) will guide the repair technician in diagnosing and repairing the problem. Once the fault (s) have been repaired they will reset the engine computer and the light should turn off. You'll be asked to drive your Toyota pickup for 2 to 3 days in order to "complete" the readiness monitors. Once the readiness monitors are complete your pickup will be ready to be administered a smog check and if no new trouble codes exist, the check engine light remains off, and your Toyota produces low emissions it will pass the smog inspection.