Relax... breathe. Math tests can generally be pretty stressful.
If you want to relax, take a shower, eat a bit of your favorite food, go on a quick walk, or even browse cute picture of cats and dogs for about 10 minutes.
I know how it goes with math tests, but try not to let yourself become too stressed. If you're just outside taking your test now, grab a bit of water, take sips, walk around, and breathe.
If you're feeling unsure about your test and you still have time, see if you can have a family member or friend help you remember formulas or whatever it is you need to remember using flash cards. Review and study, but don't let yourself go without quick breaks. Even just a 10 minute break can really help and keep you from getting too tired about studying. Pace yourself, and try not to burn yourself out.
Best of luck to you with your test.