If you’re ever trapped in a burning building, just pray the firefighter climbing up to rescue you isn’t Rebecca Wax. Or someone like her, who’s been given an EZ-Pass through firefighting training for the sake of gender equity.

This week Wax, who repeatedly flunked the rigorous physical test required by the New York City Fire Department, will graduate anyway, The Post reported.

All over the nation, fire departments are easing physical standards, in response to litigation to increase the number of women firefighters.

It’s roiling fire departments, and the turmoil is a preview of what’s to come for the US military, which has committed to opening all combat roles to women by 2016.

Wax tried six times to pass New York’s Functional Skills Test within the 17-minute, 50-second deadline. Five times she couldn’t finish at all; on the sixth try, she needed 22 minutes. Women’s groups claim the test is needlessly difficult and unfairly bars women.

Trainees wearing 50 pounds of gear and breathing through an air tank must climb six stories, raise ladders, break down doors and drag a dummy through a dark tunnel, all at breakneck speed. Sounds like firefighting.

The city’s test is tougher than some tests elsewhere, but city buildings are higher. Nevertheless, Fire Commissioner Daniel Nigro gave Wax a pass because she had good performance on other measures, including academic tests.

Nigro wants to significantly boost the number of women in the FDNY — now only 0.5 percent of the rank-and-file — and he wants to do it before he’s staring at a court order.

Court orders are compelling Chicago to relax its standards. Two federal class-action lawsuits brought by women who flunked that city’s firefighting tests claimed that the exams required more than what is actually needed to be an effective firefighter.

Women account for 3.4 percent of the Chicago force, compared with 5.7 percent of firefighters nationally. Chicago authorities settled the case last month, admitting into training the previously rejected women and paying millions to others no longer eligible.

In Los Angeles, Mayor Eric Garcetti is plainly unhappy with this year’s all-male class of firefighting graduates.

There were four women among the 44 recruits who started last December, but they all dropped out.

Desperate to diversify, Garcetti paid the RAND Corp. a whopping $270,000 for advice. RAND’s brilliant insight was that LA should recruit women athletes who can take the grueling training. Well, duh!

That’s what San Marcos, Calif., learned upon hiring Siene Freeman.

Several other female recruits had washed out, but for her — a former marathoner and weight-lifter — the training was a piece of cake.

Municipalities that already have women firefighters are being hit with lawsuits.

But more often these are about sexual harassment rather than qualifications.

This year alone, Philadelphia, Tampa and at least a dozen other cities are being sued for allowing a culture of bawdy, suggestive behavior. Tampa’s fire department personnel chief, known as “Uncle Touchy,” just resigned after admitting he had hugged, massaged and flirted with female firefighters.

Many departments face the practical problem that firefighters — male and female — work 24 hour shifts, and sleep in an open bunk room, with no privacy curtains or separate changing area.

That’s hardly conducive for a professional working environment. Nigro says he is going to remedy these problems in New York.

Then again, the Tampa female firefighters are fanning the flames.

To raise money for burn victims, they put out a calendar. Trouble is, some of them posed in bikinis, sending a mixed message.

The touchy issue of women in traditional men’s occupations will be center stage this fall, when the Pentagon announces its “gender-neutral” rules for military assignments.

Some feminists argue that the Marine Corps’ grueling Combat Endurance Test is more of an “initiation rite” than a fair appraisal of physical ability, the same argument Wax’s supporters use about New York’s firefighting exam.

Joint Chiefs Chairman Martin Dempsey ominously announced at a Pentagon briefing that if “a particular standard is so high that a woman couldn’t make it, the burden is now on the service to come back and explain . . . does it really have to be that high?”

Military brass — like officials overseeing New York’s fire department — are too ready to lower standards, never mind the consequences in the field.

Is that really a victory for women?

Betsy McCaughey is a senior fellow at the London Center for Policy Research.