mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-08-01 03:34:39 +02:00
merge with master and remove RIOT_Make directory, keep changes for working on Mac OS X
This commit is contained in:
@@ -1,23 +0,0 @@
|
||||
To test wolfSSL in RIOT build system get the RIOT source code from here:
|
||||
git clone https://github.com/RIOT-OS/RIOT
|
||||
|
||||
Then cd RIOT/examples
|
||||
|
||||
clone wolfssl in that directory. You should end up with RIOT/examples/wolfssl
|
||||
|
||||
git clone https://github.com/wolfssl/wolfssl
|
||||
|
||||
cd <path-to>/RIOT/examples/wolfssl/RIOT_Make
|
||||
|
||||
To test all three applications:
|
||||
|
||||
wolfbenchmark
|
||||
testsuite
|
||||
wolfcrypt-test
|
||||
|
||||
run the script in this directory: ./test-all.sh
|
||||
|
||||
See the README in each respecive directory for more information on wolfSSL and
|
||||
RIOT_OS!
|
||||
|
||||
|
@@ -1,31 +0,0 @@
|
||||
# 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 -DWOLFSSL_RIOT_OS
|
||||
|
||||
WERROR=0
|
||||
|
||||
# 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
|
@@ -1,49 +0,0 @@
|
||||
These are the steps to properly setup a test of wolfssl in RIOT OS:
|
||||
|
||||
To test wolfSSL in RIOT build system get the RIOT source code from here:
|
||||
git clone https://github.com/RIOT-OS/RIOT
|
||||
|
||||
Then cd RIOT/examples
|
||||
|
||||
clone wolfssl in that directory. You should end up with RIOT/examples/wolfssl
|
||||
|
||||
git clone https://github.com/wolfssl/wolfssl
|
||||
|
||||
cd <path-to>/RIOT/examples/wolfssl/RIOT_Make/benchmark
|
||||
|
||||
run the script ./wolf-build-and-run-test.sh
|
||||
|
||||
That script will perform the following steps:
|
||||
1. copy the source files from:
|
||||
<wolfssl-root>/src
|
||||
<wolfssl-root>/wolfcrypt/src
|
||||
<wolfssl-root>/wolfcrypt/benchmark
|
||||
|
||||
2. Use the provided Makefile to build the example application:
|
||||
"wolfbenchmark.elf"
|
||||
This application will be located here:
|
||||
<path-to>/RIOT/examples/wolfssl/RIOT_Make/wolfcrypt-test/bin/native/wolfbenchmark.elf
|
||||
|
||||
3. Execute that application. You should see a pass or fail.
|
||||
|
||||
4. Lastly that script will cleanup the source files it copied in for building.
|
||||
NOTE: this is HIGHLY RECOMMENDED to prevent making changes on temporary
|
||||
files. All development changes should be made to the actual source
|
||||
files located in their respective directories:
|
||||
<wolfssl-root>/src
|
||||
<wolfssl-root>/wolfcrypt/src
|
||||
<wolfssl-root>/wolfcrypt/benchmark
|
||||
Then the script "wolf-build-and-run-test.sh" should be run again to
|
||||
test those changes
|
||||
If you do make changes to the temporary files those changes will be
|
||||
ignored by <wolfssl-root>/.gitignore
|
||||
|
||||
|
||||
NOTE: This test is only for the "native" test. To build for a specific platform
|
||||
cd to RIOT directory and run "make doc" to generate doxygen docs.
|
||||
(You will need to install doxygen if you don't have it already)
|
||||
Then open the file: RIOT/doc/doxygen/html/index.html
|
||||
|
||||
This will provide you with the necessary help to setup and build for a
|
||||
specific platform
|
||||
|
@@ -1,7 +0,0 @@
|
||||
# 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
|
@@ -1,53 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
wolf_riot_setup () {
|
||||
#copy the test sources here
|
||||
cp Makefile.benchmark Makefile
|
||||
cp ../../wolfcrypt/benchmark/benchmark.c ./
|
||||
|
||||
cp ../../wolfcrypt/src/*.c ./
|
||||
|
||||
cp ../../src/*.c ./
|
||||
|
||||
}
|
||||
|
||||
wolf_riot_cleanup () {
|
||||
rm ./*.c
|
||||
#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
|
||||
|
||||
# copy the necessary files to this directory
|
||||
wolf_riot_setup
|
||||
|
||||
# build the test
|
||||
make &> /dev/null
|
||||
RESULT=$?
|
||||
[ $RESULT != 0 ] && echo "Make FAILED: running verbose make" &&
|
||||
make
|
||||
if [ $RESULT != 0 ];
|
||||
then
|
||||
wolf_riot_cleanup && echo "cleanup done" && exit 2
|
||||
fi
|
||||
|
||||
# run the test
|
||||
./bin/native/wolfbenchmark.elf
|
||||
|
||||
# confirm success or failure
|
||||
RESULT=$?
|
||||
[ $RESULT != 0 ] && echo "TEST FAILED" && wolf_riot_cleanup &&
|
||||
echo "cleanup done" && exit 2
|
||||
|
||||
echo "TEST PASSED!"
|
||||
|
||||
# cleanup. All changes made should be to the files in:
|
||||
# <wolfssl-root>/src
|
||||
# <wolfssl-root>/wolfcrypt/src
|
||||
# or other. Never make changes to the files copied here as they are only
|
||||
# temporary. Once changes are made, to test them just run this script again.
|
||||
wolf_riot_cleanup 0
|
||||
|
||||
|
@@ -1,10 +0,0 @@
|
||||
# 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
|
@@ -1,34 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
check_status () {
|
||||
if [ $1 != 0 ]
|
||||
then
|
||||
echo "$2 failed"
|
||||
echo ""
|
||||
fi
|
||||
}
|
||||
|
||||
echo "Running wolfssl testsuite with RIOT"
|
||||
cd testsuite/
|
||||
./wolf-build-and-run-test.sh
|
||||
RESULT=$?
|
||||
check_status $RESULT "testsuite"
|
||||
cd ..
|
||||
|
||||
echo ""
|
||||
echo "Running wolfcrypt tests with RIOT"
|
||||
cd wolfcrypt-test
|
||||
./wolf-build-and-run-test.sh
|
||||
RESULT=$?
|
||||
check_status $RESULT "wolfcrypt test"
|
||||
cd ..
|
||||
|
||||
echo ""
|
||||
echo "Running wolfcrypt benchmark with RIOT"
|
||||
cd benchmark
|
||||
./wolf-build-and-run-test.sh
|
||||
RESULT=$?
|
||||
check_status $RESULT "wolfcrypt benchmark"
|
||||
cd ..
|
||||
|
||||
exit 0
|
@@ -1,31 +0,0 @@
|
||||
# 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 -DNO_MAIN_DRIVER -DWOLFSSL_RIOT_OS
|
||||
|
||||
WERROR=0
|
||||
|
||||
# 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
|
@@ -1,53 +0,0 @@
|
||||
These are the steps to properly setup a test of wolfssl in RIOT OS:
|
||||
|
||||
To test wolfSSL in RIOT build system get the RIOT source code from here:
|
||||
git clone https://github.com/RIOT-OS/RIOT
|
||||
|
||||
Then cd RIOT/examples
|
||||
|
||||
clone wolfssl in that directory. You should end up with RIOT/examples/wolfssl
|
||||
|
||||
git clone https://github.com/wolfssl/wolfssl
|
||||
|
||||
cd <path-to>/RIOT/examples/wolfssl/RIOT_Make/testsuite
|
||||
|
||||
run the script ./wolf-build-and-run-test.sh
|
||||
|
||||
That script will perform the following steps:
|
||||
1. copy the source files from:
|
||||
<wolfssl-root>/src
|
||||
<wolfssl-root>/wolfcrypt/src
|
||||
<wolfssl-root>/wolfcrypt/test
|
||||
<wolfssl-root>/testsuite
|
||||
<wolfssl-root>/examples/[ echoserver/echoclient/client/server ]
|
||||
|
||||
2. Use the provided Makefile to build the example application:
|
||||
"testwolfcrypt.elf"
|
||||
This application will be located here:
|
||||
<path-to>/RIOT/examples/wolfssl/RIOT_Make/wolfcrypt-test/bin/native/testsuite.elf
|
||||
|
||||
3. Execute that application. You should see a pass or fail.
|
||||
|
||||
4. Lastly that script will cleanup the source files it copied in for building.
|
||||
NOTE: this is HIGHLY RECOMMENDED to prevent making changes on temporary
|
||||
files. All development changes should be made to the actual source
|
||||
files located in their respective directories:
|
||||
<wolfssl-root>/src
|
||||
<wolfssl-root>/wolfcrypt/src
|
||||
<wolfssl-root>/wolfcrypt/test
|
||||
<wolfssl-root>/testsuite
|
||||
<wolfssl-root>/examples/[ echoserver/echoclient/client/server ]
|
||||
Then the script "wolf-build-and-run-test.sh" should be run again to
|
||||
test those changes
|
||||
If you do make changes to the temporary files those changes will be
|
||||
ignored by <wolfssl-root>/.gitignore
|
||||
|
||||
|
||||
NOTE: This test is only for the "native" test. To build for a specific platform
|
||||
cd to RIOT directory and run "make doc" to generate doxygen docs.
|
||||
(You will need to install doxygen if you don't have it already)
|
||||
Then open the file: RIOT/doc/doxygen/html/index.html
|
||||
|
||||
This will provide you with the necessary help to setup and build for a
|
||||
specific platform
|
||||
|
@@ -1,7 +0,0 @@
|
||||
# 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
|
@@ -1,64 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
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 ./
|
||||
cp ../../examples/echoserver/echoserver.c ./
|
||||
cp ../../examples/echoclient/echoclient.c ./
|
||||
|
||||
cp ../../testsuite/testsuite.c ./
|
||||
|
||||
cp ../../wolfcrypt/src/*.c ./
|
||||
|
||||
cp ../../src/*.c ./
|
||||
|
||||
}
|
||||
|
||||
wolf_riot_cleanup () {
|
||||
rm ./*.c
|
||||
#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
|
||||
|
||||
# copy the necessary files to this directory
|
||||
wolf_riot_setup
|
||||
|
||||
# build the test
|
||||
make &> /dev/null
|
||||
RESULT=$?
|
||||
[ $RESULT != 0 ] && echo "Make FAILED: running verbose make" &&
|
||||
make
|
||||
if [ $RESULT != 0 ];
|
||||
then
|
||||
wolf_riot_cleanup && echo "cleanup done" && exit 2
|
||||
fi
|
||||
|
||||
# run the test
|
||||
RESULT=`./bin/native/wolftestsuite.elf`
|
||||
# confirm success or failure
|
||||
errstring="error"
|
||||
if test "${RESULT#*$errstring}" != "$RESULT"
|
||||
then
|
||||
echo "$RESULT"
|
||||
echo "TEST FAILED" && wolf_riot_cleanup && echo "cleanup done" &&
|
||||
exit 2
|
||||
else
|
||||
echo "$RESULT"
|
||||
fi
|
||||
|
||||
echo "TEST PASSED!"
|
||||
|
||||
# cleanup. All changes made should be to the files in:
|
||||
# <wolfssl-root>/src
|
||||
# <wolfssl-root>/wolfcrypt/src
|
||||
# or other. Never make changes to the files copied here as they are only
|
||||
# temporary. Once changes are made, to test them just run this script again.
|
||||
wolf_riot_cleanup 0
|
||||
|
||||
|
@@ -1,31 +0,0 @@
|
||||
# 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 -DWOLFSSL_RIOT_OS
|
||||
|
||||
WERROR=0
|
||||
|
||||
# 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
|
@@ -1,49 +0,0 @@
|
||||
These are the steps to properly setup a test of wolfssl in RIOT OS:
|
||||
|
||||
To test wolfSSL in RIOT build system get the RIOT source code from here:
|
||||
git clone https://github.com/RIOT-OS/RIOT
|
||||
|
||||
Then cd RIOT/examples
|
||||
|
||||
clone wolfssl in that directory. You should end up with RIOT/examples/wolfssl
|
||||
|
||||
git clone https://github.com/wolfssl/wolfssl
|
||||
|
||||
cd <path-to>/RIOT/examples/wolfssl/RIOT_Make/wolfcrypt-test
|
||||
|
||||
run the script ./wolf-build-and-run-test.sh
|
||||
|
||||
That script will perform the following steps:
|
||||
1. copy the source files from:
|
||||
<wolfssl-root>/src
|
||||
<wolfssl-root>/wolfcrypt/src
|
||||
<wolfssl-root>/wolfcrypt/test
|
||||
|
||||
2. Use the provided Makefile to build the example application:
|
||||
"testwolfcrypt.elf"
|
||||
This application will be located here:
|
||||
<path-to>/RIOT/examples/wolfssl/RIOT_Make/wolfcrypt-test/bin/native/testwolfcrypt.elf
|
||||
|
||||
3. Execute that application. You should see a pass or fail.
|
||||
|
||||
4. Lastly that script will cleanup the source files it copied in for building.
|
||||
NOTE: this is HIGHLY RECOMMENDED to prevent making changes on temporary
|
||||
files. All development changes should be made to the actual source
|
||||
files located in their respective directories:
|
||||
<wolfssl-root>/src
|
||||
<wolfssl-root>/wolfcrypt/src
|
||||
<wolfssl-root>/wolfcrypt/test
|
||||
Then the script "build-and-run-test.sh" should be run again to test
|
||||
those changes
|
||||
If you do make changes to the temporary files those changes will be
|
||||
ignored by <wolfssl-root>/.gitignore
|
||||
|
||||
.
|
||||
NOTE: This test is only for the "native" test. To build for a specific platform
|
||||
cd to RIOT directory and run "make doc" to generate doxygen docs.
|
||||
(You will need to install doxygen if you don't have it already)
|
||||
Then open the file: RIOT/doc/doxygen/html/index.html
|
||||
|
||||
This will provide you with the necessary help to setup and build for a
|
||||
specific platform
|
||||
|
@@ -1,7 +0,0 @@
|
||||
# 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
|
@@ -1,63 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
wolf_riot_setup () {
|
||||
cp Makefile.wolfcrypttest Makefile
|
||||
#copy the test sources here
|
||||
cp ../../wolfcrypt/test/*.c ./
|
||||
|
||||
cp ../../wolfcrypt/src/*.c ./
|
||||
|
||||
cp ../../src/*.c ./
|
||||
}
|
||||
|
||||
wolf_riot_cleanup () {
|
||||
rm ./*.c
|
||||
#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
|
||||
}
|
||||
|
||||
# copy the necessary files to this directory
|
||||
wolf_riot_setup
|
||||
|
||||
# build the test
|
||||
# change next line to just "make" to see verbose output
|
||||
# NOTE: will throw a warning on every file that is empty if that feature
|
||||
# is not enabled in wolfssl.
|
||||
make &> /dev/null
|
||||
RESULT=$?
|
||||
[ $RESULT != 0 ] && echo "Make FAILED: running verbose make" &&
|
||||
make
|
||||
|
||||
if [ $RESULT != 0 ];
|
||||
then
|
||||
wolf_riot_cleanup && echo "cleanup done" && exit 2
|
||||
fi
|
||||
|
||||
# run the test
|
||||
RESULT=`./bin/native/testwolfcrypt.elf`
|
||||
|
||||
# confirm success or failure
|
||||
errstring="error"
|
||||
if test "${RESULT#*$errstring}" != "$RESULT"
|
||||
then
|
||||
echo "$RESULT"
|
||||
echo "TEST FAILED" && wolf_riot_cleanup && echo "cleanup done" &&
|
||||
exit 2
|
||||
else
|
||||
echo "$RESULT"
|
||||
fi
|
||||
|
||||
echo "ALL TEST PASSED!"
|
||||
|
||||
# cleanup. All changes made should be to the files in:
|
||||
# <wolfssl-root>/src
|
||||
# <wolfssl-root>/wolfcrypt/src
|
||||
# or other. Never make changes to the files copied here as they are only
|
||||
# temporary. Once changes are made, to test them just run this script again.
|
||||
wolf_riot_cleanup
|
||||
|
||||
exit 0
|
||||
|
||||
|
Reference in New Issue
Block a user