summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-05-06 14:33:27 +0200
committerLinus Nordberg <linus@nordberg.se>2015-05-06 14:33:27 +0200
commit1d8feb02887225a6cc5dc89bb0486424cb02e318 (patch)
tree1d5460b3ece7afee8dc23059826ee13e7df55324
parent4debec0f967d429f3cc9011eff898bc5e5585bda (diff)
Make check clean.
-rw-r--r--Emakefile9
-rw-r--r--Makefile4
-rw-r--r--README6
-rw-r--r--src/plop.erl13
-rw-r--r--src/sign.erl1
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),
<<SigLen:16, Signature/binary>>]).
-
-%%%%%%%%%%%%%%%%%%%%
-%% 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(),