10w40 motor oil on really old motors helps the pass inspections as its harder to sneak past worn seals compared to lighter weight oils (probl is when you do a cold start it may wanna die once or twice before idling well)
clean your air filter so it breathes easier...a tune up (new plugs wires) and valve adjustments would do the best measure
make sure when you bring it to the test it is fully warmed up
also find out what area you failed as it could be an emissions item malfunctioning