Skip to content

Commit

Permalink
Added seed module unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
italo-sampaio committed Oct 14, 2024
1 parent cca426d commit 5ce32f6
Show file tree
Hide file tree
Showing 3 changed files with 464 additions and 1 deletion.
2 changes: 1 addition & 1 deletion firmware/src/hal/sgx/test/run-all.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash
BASEDIR=$(dirname $0)
TESTDIRS="nvmem secret_store"
TESTDIRS="nvmem secret_store seed"
TESTDIRS=${1:-"$TESTDIRS"}

for d in $TESTDIRS; do
Expand Down
39 changes: 39 additions & 0 deletions firmware/src/hal/sgx/test/seed/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# The MIT License (MIT)
#
# Copyright (c) 2021 RSK Labs Ltd
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is furnished to do
# so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

include ../common/common.mk

PROG = test.out
OBJS = seed.o test_seed.o mock_secret_store.o log.o
LIBS = -lsecp256k1

all: $(PROG)

$(PROG): $(OBJS)
$(CC) $(COVFLAGS) -o $@ $^ $(LIBS)

.PHONY: clean test
clean:
rm -f $(PROG) *.o $(COVFILES)

test: all
./$(PROG)
Loading

0 comments on commit 5ce32f6

Please sign in to comment.