1.
good luck, do your best, hang in there
An expression of encouragement. It comes from the verb 頑張る (to persevere, to do one's best). Used to cheer someone on.
試験、頑張って!
Good luck on your exam!
頑張って is the te-form of 頑張る used as an expression of encouragement. It's very commonly used before tests, competitions, or any challenging situation. The polite form is 頑張ってください. Note that in Western culture 'good luck' implies chance, but 頑張って implies effort and perseverance.