diff --git a/tests/nhdp/Makefile b/tests/nhdp/Makefile index 9f1b70992f231fb940d507ecbfee47d06aa24940..89e25b2241569c6f005ef7b3585912ffc16660eb 100644 --- a/tests/nhdp/Makefile +++ b/tests/nhdp/Makefile @@ -12,3 +12,6 @@ USEMODULE += gnrc_sock_udp USEMODULE += nhdp include $(RIOTBASE)/Makefile.include + +test: + tests/01-run.py diff --git a/tests/nhdp/main.c b/tests/nhdp/main.c index ed402de8909e11ea1e97c081a7b4455b3661ef66..7af2a82c3ae4a54d21eb7ea3754fff86009f30a5 100644 --- a/tests/nhdp/main.c +++ b/tests/nhdp/main.c @@ -18,6 +18,6 @@ int main(void) { - puts("NHDP compiled!"); + puts("SUCCESS: NHDP compiled!"); return 0; } diff --git a/tests/nhdp/tests/01-run.py b/tests/nhdp/tests/01-run.py new file mode 100755 index 0000000000000000000000000000000000000000..ffbbecfe97b09430897d316431b19e256b799642 --- /dev/null +++ b/tests/nhdp/tests/01-run.py @@ -0,0 +1,20 @@ +#!/usr/bin/env python3 + +# Copyright (C) 2016 Kaspar Schleiser <kaspar@schleiser.de> +# +# This file is subject to the terms and conditions of the GNU Lesser +# General Public License v2.1. See the file LICENSE in the top level +# directory for more details. + +import os +import sys + +sys.path.append(os.path.join(os.environ['RIOTBASE'], 'dist/tools/testrunner')) +import testrunner + + +def testfunc(child): + child.expect_exact('SUCCESS: NHDP compiled!') + +if __name__ == "__main__": + sys.exit(testrunner.run(testfunc))