It used to be possible to keep diesel imported vehicles here in CA but CARB has clamped down on that. As for petrol cars and trucks you can thank Mr. Schwarzenegger for trading the 25 year rule off to pass some other legislation, so now the 25 year emissions exemption does not apply in CA unless you want to spend $10k to get the car tested to meet that year's CA emissions standard.
There are tons of illegally imported and registered vehicles nation wide but the feds are finding them and seizing them so if you choose to do it the wrong way be very prepared to lose your vehicle.
Diesel emissions testing in CA is only required on vehicles manufactured in 1998 and later.