build: strip unneeded test env setting and fix test install