Skip to content
Snippets Groups Projects
Unverified Commit 052fea24 authored by Koen Zandberg's avatar Koen Zandberg
Browse files

tests/hacl: Move from unittests to regular test

parent ed1eb8ed
No related branches found
No related tags found
No related merge requests found
include ../Makefile.tests_common
BOARD_BLACKLIST := arduino-duemilanove arduino-mega2560 arduino-uno \
jiminy-mega256rfr2 mega-xplained waspmote-pro \
chronos msb-430 msb-430h telosb wsn430-v1_3b wsn430-v1_4 z1
BOARD_INSUFFICIENT_MEMORY := nucleo-f031k6 nucleo-f042k6
TEST_ON_CI_WHITELIST += all
CFLAGS += -DTHREAD_STACKSIZE_MAIN=\(5*THREAD_STACKSIZE_DEFAULT\)
USEPKG += hacl
USEMODULE += random
USEMODULE += embunit
include $(RIOTBASE)/Makefile.include
......@@ -22,8 +22,8 @@
#include <string.h>
#include <haclnacl.h>
#include "random.h"
#include "embUnit.h"
#include "tests-hacl.h"
static const char message[] = "0123456789abcdef";
static char r[sizeof(message)];
......@@ -74,7 +74,7 @@ static void test_hacl_01(void)
TEST_ASSERT_EQUAL_STRING((const char*)message, (const char*)r);
}
Test *tests_hacl_all(void)
Test *tests_hacl(void)
{
EMB_UNIT_TESTFIXTURES(fixtures) {
new_TestFixture(test_hacl_01)
......@@ -84,7 +84,10 @@ Test *tests_hacl_all(void)
return (Test*)&hacl_tests;
}
void tests_hacl(void)
int main(void)
{
TESTS_RUN(tests_hacl_all());
TESTS_START();
TESTS_RUN(tests_hacl());
TESTS_END();
return 0;
}
#!/usr/bin/env python3
# Copyright (C) 2017 Freie Universität Berlin
#
# 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 sys
from testrunner import run
def testfunc(child):
child.expect('OK \(\d+ tests\)')
if __name__ == "__main__":
sys.exit(run(testfunc))
......@@ -235,7 +235,6 @@ ifneq (, $(filter $(AVR_BOARDS), $(BOARD)))
LARGE_STACK_TESTS += tests-qDSA
endif
LARGE_STACK_TESTS += tests-hacl
LARGE_STACK_TESTS += tests-tweetnacl
ifneq (,$(filter $(LARGE_STACK_TESTS), $(UNIT_TESTS)))
CFLAGS += -DTHREAD_STACKSIZE_MAIN=\(4*THREAD_STACKSIZE_DEFAULT+THREAD_EXTRA_STACKSIZE_PRINTF\)
......
include $(RIOTBASE)/Makefile.base
USEMODULE += random
USEPKG += hacl
/*
* Copyright (C) 2018 INRIA
*
* 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.
*/
/**
* @addtogroup unittests
* @{
*
* @file
* @brief Unittests for the ``hacl`` package
*
* @author Benjamin Beurdouche <benjamin.beurdouche@inria.fr>
*/
#ifndef TESTS_HACL_H
#define TESTS_HACL_H
#include "embUnit/embUnit.h"
#include "random.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @brief The entry point of this test suite.
*/
void tests_hacl(void);
#ifdef __cplusplus
}
#endif
#endif /* TESTS_HACL_H */
/** @} */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment