diff options
| author | J08nY | 2021-04-10 14:54:57 +0200 |
|---|---|---|
| committer | J08nY | 2021-04-10 15:00:08 +0200 |
| commit | 5ed1f3f15acb12617dc7da25ec2642a0f70cbf12 (patch) | |
| tree | 45e8797a479f8db9b8d02019bc03482685cde972 /test | |
| parent | 7e3be900daaae1586ac4a53192dfc7bcc18da34e (diff) | |
| download | ecgen-5ed1f3f15acb12617dc7da25ec2642a0f70cbf12.tar.gz ecgen-5ed1f3f15acb12617dc7da25ec2642a0f70cbf12.tar.zst ecgen-5ed1f3f15acb12617dc7da25ec2642a0f70cbf12.zip | |
Diffstat (limited to 'test')
| -rw-r--r-- | test/Makefile | 2 | ||||
| -rw-r--r-- | test/common.sh | 2 | ||||
| -rwxr-xr-x | test/criterion.sh | 12 | ||||
| -rwxr-xr-x | test/ecgen.sh | 9 |
4 files changed, 23 insertions, 2 deletions
diff --git a/test/Makefile b/test/Makefile index 4f495d9..e5fdfd3 100644 --- a/test/Makefile +++ b/test/Makefile @@ -10,7 +10,7 @@ test: ecgen unittest: unit ecgen unit: - cd lib/criterion && mkdir -p build && cd build && cmake .. >/dev/null && cmake --build . >/dev/null + ./criterion.sh +$(MAKE) -C src all ecgen: diff --git a/test/common.sh b/test/common.sh index c7fbb6e..42978a3 100644 --- a/test/common.sh +++ b/test/common.sh @@ -40,4 +40,4 @@ strip_num() { canonical_num() { num=$(strip_num "$1") echo "ibase=16;${num^^}" | bc -}
\ No newline at end of file +} diff --git a/test/criterion.sh b/test/criterion.sh new file mode 100755 index 0000000..c5c1f04 --- /dev/null +++ b/test/criterion.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +if [ ! -f "lib/criterion/CMakeLists.txt" ]; then + echo "lib/criterion is missing. It is a git submodule from https://github.com/Snaipe/Criterion at a64b860."; + exit 1; +fi + +cd lib/criterion +mkdir -p build +cd build +cmake .. >/dev/null +cmake --build . >/dev/null diff --git a/test/ecgen.sh b/test/ecgen.sh index e9a1d85..0adf90d 100755 --- a/test/ecgen.sh +++ b/test/ecgen.sh @@ -185,6 +185,15 @@ function secg() { test_order secp160k1 fp 160 } +if [ ! -f $ASSERT ]; then + echo "$ASSERT not found. It is a git submodule from https://github.com/J08nY/assert.sh @679ed66 that should be at $(dirname $ASSERT)." + exit 1 +fi +if [ ! -f $JSON ]; then + echo "$JSON not found. It is a git submodule from https://github.com/jimklimov/JSON.sh @679ed66 that should be at $(dirname $JSON)." + exit 1 +fi + . ${ASSERT} -v start_suite runs |
