From 43525343fc67bc16682fb5870b40235b598eea6e Mon Sep 17 00:00:00 2001 From: kaleb-himes Date: Fri, 2 Dec 2016 17:30:57 -0700 Subject: [PATCH] add RIOT tests to dist and make sure Makefiles are not excluded by .gitignore --- .gitignore | 2 +- Makefile.am | 1 + RIOT_Make/benchmark/Makefile.benchmark | 29 +++++++++++++++++++ RIOT_Make/benchmark/include.am | 7 +++++ .../benchmark/wolf-build-and-run-test.sh | 2 ++ RIOT_Make/include.am | 10 +++++++ RIOT_Make/testsuite/Makefile.testsuite | 29 +++++++++++++++++++ RIOT_Make/testsuite/include.am | 7 +++++ .../testsuite/wolf-build-and-run-test.sh | 2 ++ .../wolfcrypt-test/Makefile.wolfcrypttest | 29 +++++++++++++++++++ RIOT_Make/wolfcrypt-test/include.am | 7 +++++ .../wolfcrypt-test/wolf-build-and-run-test.sh | 2 ++ 12 files changed, 126 insertions(+), 1 deletion(-) create mode 100644 RIOT_Make/benchmark/Makefile.benchmark create mode 100644 RIOT_Make/benchmark/include.am create mode 100644 RIOT_Make/include.am create mode 100644 RIOT_Make/testsuite/Makefile.testsuite create mode 100644 RIOT_Make/testsuite/include.am create mode 100644 RIOT_Make/wolfcrypt-test/Makefile.wolfcrypttest create mode 100644 RIOT_Make/wolfcrypt-test/include.am diff --git a/.gitignore b/.gitignore index a421b91ec..cb2b9f28e 100644 --- a/.gitignore +++ b/.gitignore @@ -191,5 +191,5 @@ wrapper/CSharp/x64/ *.vscode # RIOT_OS workspace directories: -RIOT_Make/*/bin/* +RIOT_Make/*/bin/ RIOT_Make/*/*.c diff --git a/Makefile.am b/Makefile.am index 09e1e7219..220813a13 100644 --- a/Makefile.am +++ b/Makefile.am @@ -105,6 +105,7 @@ include mcapi/zlib.X/nbproject/include.am include tirtos/include.am include scripts/include.am include IDE/include.am +include RIOT_Make/include.am if USE_VALGRIND TESTS_ENVIRONMENT=./valgrind-error.sh diff --git a/RIOT_Make/benchmark/Makefile.benchmark b/RIOT_Make/benchmark/Makefile.benchmark new file mode 100644 index 000000000..cf36a1375 --- /dev/null +++ b/RIOT_Make/benchmark/Makefile.benchmark @@ -0,0 +1,29 @@ +# name of your application +APPLICATION = wolfbenchmark + +# If no BOARD is found in the environment, use this default: +BOARD ?= native + +# This has to be the absolute path to the RIOT base directory: +RIOTBASE ?= $(CURDIR)/../../../../ + +# Comment this out to disable code in RIOT that does safety checking +# which is not needed in a production environment but helps in the +# development process: +CFLAGS += -DDEVELHELP + +# Change this to 0 show compiler invocation lines by default: +QUIET ?= 1 + +# bindist specific stuff: +# +# build and use module "abc". +# use BINARY_DIRS instead of DIRS +#BINARY_DIRS += wolfssl/src +INCLUDES += -I$(RIOTBASE)/examples/wolfssl + +# list of files to include in binary distribution +# "bin/$(BOARD)/$(APPLICATION).elf" will automatically be added +DIST_FILES += Makefile + +include $(RIOTBASE)/Makefile.include diff --git a/RIOT_Make/benchmark/include.am b/RIOT_Make/benchmark/include.am new file mode 100644 index 000000000..d1cef6b88 --- /dev/null +++ b/RIOT_Make/benchmark/include.am @@ -0,0 +1,7 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +EXTRA_DIST+= RIOT_Make/benchmark/README +EXTRA_DIST+= RIOT_Make/benchmark/Makefile.benchmark +EXTRA_DIST+= RIOT_Make/benchmark/wolf-build-and-run-test.sh diff --git a/RIOT_Make/benchmark/wolf-build-and-run-test.sh b/RIOT_Make/benchmark/wolf-build-and-run-test.sh index ffc316d0a..214af842b 100755 --- a/RIOT_Make/benchmark/wolf-build-and-run-test.sh +++ b/RIOT_Make/benchmark/wolf-build-and-run-test.sh @@ -2,6 +2,7 @@ wolf_riot_setup () { #copy the test sources here +cp Makefile.benchmark Makefile cp ../../wolfcrypt/benchmark/benchmark.c ./ cp ../../wolfcrypt/src/*.c ./ @@ -15,6 +16,7 @@ wolf_riot_cleanup () { #leave this line in for testing. Comment it out when you want to build # a .elf for flashing to a device make clean &> /dev/null + rm Makefile } trap wolf_riot_cleanup INT TERM diff --git a/RIOT_Make/include.am b/RIOT_Make/include.am new file mode 100644 index 000000000..25eaac402 --- /dev/null +++ b/RIOT_Make/include.am @@ -0,0 +1,10 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +include RIOT_Make/benchmark/include.am +include RIOT_Make/testsuite/include.am +include RIOT_Make/wolfcrypt-test/include.am + +EXTRA_DIST+= RIOT_Make/benchmark RIOT_Make/testsuite RIOT_Make/wolfcrypt-test \ + RIOT_Make/test-all.sh RIOT_Make/README diff --git a/RIOT_Make/testsuite/Makefile.testsuite b/RIOT_Make/testsuite/Makefile.testsuite new file mode 100644 index 000000000..c4927bd91 --- /dev/null +++ b/RIOT_Make/testsuite/Makefile.testsuite @@ -0,0 +1,29 @@ +# name of your application +APPLICATION = wolftestsuite + +# If no BOARD is found in the environment, use this default: +BOARD ?= native + +# This has to be the absolute path to the RIOT base directory: +RIOTBASE ?= $(CURDIR)/../../../../ + +# Comment this out to disable code in RIOT that does safety checking +# which is not needed in a production environment but helps in the +# development process: +CFLAGS += -DDEVELHELP + +# Change this to 0 show compiler invocation lines by default: +QUIET ?= 1 + +# bindist specific stuff: +# +# build and use module "abc". +# use BINARY_DIRS instead of DIRS +#BINARY_DIRS += wolfssl/src +INCLUDES += -I$(RIOTBASE)/examples/wolfssl + +# list of files to include in binary distribution +# "bin/$(BOARD)/$(APPLICATION).elf" will automatically be added +DIST_FILES += Makefile + +include $(RIOTBASE)/Makefile.include diff --git a/RIOT_Make/testsuite/include.am b/RIOT_Make/testsuite/include.am new file mode 100644 index 000000000..cb8be4110 --- /dev/null +++ b/RIOT_Make/testsuite/include.am @@ -0,0 +1,7 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +EXTRA_DIST+= RIOT_Make/testsuite/README +EXTRA_DIST+= RIOT_Make/testsuite/Makefile.testsuite +EXTRA_DIST+= RIOT_Make/testsuite/wolf-build-and-run-test.sh diff --git a/RIOT_Make/testsuite/wolf-build-and-run-test.sh b/RIOT_Make/testsuite/wolf-build-and-run-test.sh index f64d3953e..523481059 100755 --- a/RIOT_Make/testsuite/wolf-build-and-run-test.sh +++ b/RIOT_Make/testsuite/wolf-build-and-run-test.sh @@ -2,6 +2,7 @@ wolf_riot_setup () { #copy the test sources here +cp Makefile.testsuite Makefile cp ../../wolfcrypt/test/test.c ./ cp ../../examples/server/server.c ./ cp ../../examples/client/client.c ./ @@ -21,6 +22,7 @@ wolf_riot_cleanup () { #leave this line in for testing. Comment it out when you want to build # a .elf for flashing to a device make clean &> /dev/null + rm Makefile } trap wolf_riot_cleanup INT TERM diff --git a/RIOT_Make/wolfcrypt-test/Makefile.wolfcrypttest b/RIOT_Make/wolfcrypt-test/Makefile.wolfcrypttest new file mode 100644 index 000000000..b42a17b81 --- /dev/null +++ b/RIOT_Make/wolfcrypt-test/Makefile.wolfcrypttest @@ -0,0 +1,29 @@ +# name of your application +APPLICATION = testwolfcrypt + +# If no BOARD is found in the environment, use this default: +BOARD ?= native + +# This has to be the absolute path to the RIOT base directory: +RIOTBASE ?= $(CURDIR)/../../../../ + +# Comment this out to disable code in RIOT that does safety checking +# which is not needed in a production environment but helps in the +# development process: +CFLAGS += -DDEVELHELP + +# Change this to 0 show compiler invocation lines by default: +QUIET ?= 1 + +# bindist specific stuff: +# +# build and use module "abc". +# use BINARY_DIRS instead of DIRS +#BINARY_DIRS += wolfssl/src +INCLUDES += -I$(RIOTBASE)/examples/wolfssl + +# list of files to include in binary distribution +# "bin/$(BOARD)/$(APPLICATION).elf" will automatically be added +DIST_FILES += Makefile + +include $(RIOTBASE)/Makefile.include diff --git a/RIOT_Make/wolfcrypt-test/include.am b/RIOT_Make/wolfcrypt-test/include.am new file mode 100644 index 000000000..aeee2ad17 --- /dev/null +++ b/RIOT_Make/wolfcrypt-test/include.am @@ -0,0 +1,7 @@ +# vim:ft=automake +# included from Top Level Makefile.am +# All paths should be given relative to the root + +EXTRA_DIST+= RIOT_Make/wolfcrypt-test/README +EXTRA_DIST+= RIOT_Make/wolfcrypt-test/Makefile.wolfcrypttest +EXTRA_DIST+= RIOT_Make/wolfcrypt-test/wolf-build-and-run-test.sh diff --git a/RIOT_Make/wolfcrypt-test/wolf-build-and-run-test.sh b/RIOT_Make/wolfcrypt-test/wolf-build-and-run-test.sh index 1f8100635..5188724e2 100755 --- a/RIOT_Make/wolfcrypt-test/wolf-build-and-run-test.sh +++ b/RIOT_Make/wolfcrypt-test/wolf-build-and-run-test.sh @@ -1,6 +1,7 @@ #!/bin/sh wolf_riot_setup () { + cp Makefile.wolfcrypttest Makefile #copy the test sources here cp ../../wolfcrypt/test/*.c ./ @@ -14,6 +15,7 @@ wolf_riot_cleanup () { #leave this line in for testing. Comment it out when you want to build # a .elf for flashing to a device make clean &> /dev/null + rm Makefile } BACKUPCFLAGS=${CFLAGS}