Can I claim foreign income exclusion as married person whose spouse worked in the U.S. for more than 30 days within the same calendar year?

I am a U.S. citizen posted in a foreign country and meet the physical presence test to qualify for foreign income exclusion tax credit; I do not believe that I qualify for the bona fide residence test.  However, I am married and my spouse worked in the U.S. for more than 30 days within the same calendar year that I qualified for the physical presence test.  Can I still claim the credit, apply it only to the income that I earned outside of the U.S., i,e. not the income that my spouse earned in the U.S. by filing married jointly?  Or can I claim it for my income earned outside of the U.S. as married filing separately?