diff --git a/tests/Makefile.tests_common b/tests/Makefile.tests_common
index bb1feb44d57c38831d90d066f88afa55c14def4f..7bfc0a285828623b343aabba66e19044f44cc250 100644
--- a/tests/Makefile.tests_common
+++ b/tests/Makefile.tests_common
@@ -1,7 +1,7 @@
-ifneq (,$(filter driver_%,$(APPLICATION)))
+APPLICATION ?= tests_$(notdir $(patsubst %/,%,$(CURDIR)))
+ifneq (,$(filter tests_driver_%,$(APPLICATION)))
     BOARD ?= samr21-xpro
 endif
 BOARD ?= native
 RIOTBASE ?= $(CURDIR)/../..
 QUIET ?= 1
-APPLICATION := tests_$(APPLICATION)