From 1d8feb02887225a6cc5dc89bb0486424cb02e318 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Wed, 6 May 2015 14:33:27 +0200 Subject: Make check clean. --- Emakefile | 9 ++------- Makefile | 4 ++++ README | 6 ++---- src/plop.erl | 13 ------------- src/sign.erl | 1 - 5 files changed, 8 insertions(+), 25 deletions(-) diff --git a/Emakefile b/Emakefile index 42c6d44..0b2c07a 100644 --- a/Emakefile +++ b/Emakefile @@ -1,11 +1,6 @@ %% erl -make (-*- erlang -*-) -{["src/*", "test/*"], +{["src/*"], [debug_info, - {i, "../"}, + {i, "../"}, % For hackney. {outdir, "ebin/"}, {parse_transform, lager_transform}]}. -{["test/src/*"], - [debug_info, - {i, "include/"}, - {outdir, "test/ebin/"}, - {parse_transform, lager_transform}]}. diff --git a/Makefile b/Makefile index 3573cae..7a67333 100644 --- a/Makefile +++ b/Makefile @@ -13,3 +13,7 @@ dialyze: build dialyzer ebin tags: etags src/*.[he]rl + +# Unit testing. +check: build + test/check.erl diff --git a/README b/README index d315080..d90daca 100644 --- a/README +++ b/README @@ -10,8 +10,6 @@ Compile the application $ make -Test the application +Run tests - [FIXME] - -TODO: -plop Keyfile "test/rsakey.pem" -plop Passphrase "sikrit" + $ make check diff --git a/src/plop.erl b/src/plop.erl index 1f9ddd0..b6d7ff1 100644 --- a/src/plop.erl +++ b/src/plop.erl @@ -34,7 +34,6 @@ -include("plop.hrl"). %%-include("db.hrl"). -include_lib("public_key/include/public_key.hrl"). --include_lib("eunit/include/eunit.hrl"). %%%%% moved from plop.hrl, maybe remove -define(PLOPVERSION, 0). @@ -369,15 +368,3 @@ serialise(#signature{ SigLen = size(Signature), list_to_binary([serialise(Algorithm), <>]). - -%%%%%%%%%%%%%%%%%%%% -%% Internal tests. For more tests see ../test/. -%% serialise_test_() -> -%% [?_assertEqual( -%% <<0:8, 0:8, 0:64, 0:16, "foo">>, -%% serialise(#spt_signed{ -%% version = 0, -%% signature_type = certificate_timestamp, -%% timestamp = 0, -%% entry_type = x509, -%% signed_entry = <<"foo">>}))]. diff --git a/src/sign.erl b/src/sign.erl index 1fb1c07..07c5047 100644 --- a/src/sign.erl +++ b/src/sign.erl @@ -22,7 +22,6 @@ -import(stacktrace, [call/2]). -include_lib("public_key/include/public_key.hrl"). --include_lib("eunit/include/eunit.hrl"). -record(state, {pubkey :: public_key:rsa_public_key(), privkey :: public_key:rsa_private_key(), -- cgit v1.1