There is no need to drive your vehicle longer than a quick warm-up before the smog check. Changing the engine oil is a great idea to help pass a smog inspection. The only time it is necessary to drive a vehicle before a smog test (100+ miles) is when the battery has been disconnected or the computer codes erased.
Typically, during an oil change, neither the vehicle's battery requires to be disconnected nor is the engine control computer reset.