Permalink
Browse files

[asn1] Refactor test cases and remove extra suites

  • Loading branch information...
Adam Lindberg
Adam Lindberg committed Feb 16, 2012
1 parent 79d2f28 commit 9ec0a0babace0932d78accf7c10b237a32dc801c
Showing with 1,684 additions and 3,354 deletions.
  1. +2 −2 lib/asn1/c_src/asn1_erl_nif.c
  2. +3 −36 lib/asn1/test/Makefile
  3. +1,511 −0 lib/asn1/test/asn1_SUITE.erl
  4. +0 −2,347 lib/asn1/test/asn1_SUITE.erl.src
  5. +0 −2 lib/asn1/test/asn1_bin_particular_SUITE.erl.src
  6. +0 −95 lib/asn1/test/asn1_common_SUITE.erl.src
  7. +0 −10 lib/asn1/test/asn1_particular_SUITE.erl.src
  8. +47 −3 lib/asn1/test/asn1_test_lib.erl
  9. +18 −112 lib/asn1/test/h323test.erl
  10. +20 −274 lib/asn1/test/{asn1_bin_v2_particular_SUITE.erl.src → pem_performance.erl}
  11. +1 −14 lib/asn1/test/testChoOptional.erl
  12. +1 −13 lib/asn1/test/testChoOptionalImplicitTag.erl
  13. +1 −12 lib/asn1/test/testChoRecursive.erl
  14. +1 −13 lib/asn1/test/testChoTypeRefCho.erl
  15. +1 −13 lib/asn1/test/testChoTypeRefPrim.erl
  16. +1 −12 lib/asn1/test/testChoTypeRefSeq.erl
  17. +1 −12 lib/asn1/test/testChoTypeRefSet.erl
  18. +1 −14 lib/asn1/test/testChoiceIndefinite.erl
  19. +0 −8 lib/asn1/test/testCompactBitString.erl
  20. +1 −12 lib/asn1/test/testDef.erl
  21. +0 −10 lib/asn1/test/testParamBasic.erl
  22. +1 −18 lib/asn1/test/testPrimStrings.erl
  23. +0 −50 lib/asn1/test/testRANAP.erl
  24. +1 −14 lib/asn1/test/testSeqOf.erl
  25. +1 −13 lib/asn1/test/testSeqOfCho.erl
  26. +1 −33 lib/asn1/test/testSeqOfIndefinite.erl
  27. +1 −14 lib/asn1/test/testSeqOfTag.erl
  28. +1 −12 lib/asn1/test/testSeqOptional.erl
  29. +1 −11 lib/asn1/test/testSeqPrim.erl
  30. +1 −12 lib/asn1/test/testSeqTypeRefCho.erl
  31. +1 −13 lib/asn1/test/testSetExternal.erl
  32. +2 −14 lib/asn1/test/testSetOptional.erl
  33. +1 −11 lib/asn1/test/testSetPrim.erl
  34. +1 −12 lib/asn1/test/testSetTag.erl
  35. +5 −4 lib/asn1/test/testTCAP.erl
  36. +1 −7 lib/asn1/test/testTimer.erl
  37. +33 −36 lib/asn1/test/testTypeValueNotation.erl
  38. +0 −29 lib/asn1/test/test_bad_values.erl
  39. +1 −6 lib/asn1/test/test_modified_x420.erl
  40. +21 −25 lib/asn1/test/test_undecoded_rest.erl
  41. +0 −6 lib/asn1/test/test_x691.erl
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 2002-2011. All Rights Reserved.
* Copyright Ericsson AB 2002-2012. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -1197,7 +1197,7 @@ static ERL_NIF_TERM encode_per_complete(ErlNifEnv* env, int argc,
ErlNifBinary out_binary;
int complete_len;
if (!enif_inspect_iolist_as_binary(env, argv[0], &in_binary))
return enif_make_atom(env, "badarg");
return enif_make_badarg(env);
if (!enif_alloc_binary(in_binary.size, &out_binary))
return enif_make_atom(env, "alloc_binary_failed");
View
@@ -29,9 +29,9 @@ MODULES= \
choice_extension \
ber_decode_error \
testPrim \
testPrimStrings \
testPrimStrings \
testCompactBitString \
testPrimExternal \
testPrimExternal \
testChoPrim \
testChoExtension \
testChoExternal \
@@ -85,7 +85,6 @@ MODULES= \
testMergeCompile \
testDeepTConstr \
testTimer \
testRANAP \
testMegaco \
testSeqSetDefaultVal \
testParamBasic \
@@ -105,7 +104,6 @@ MODULES= \
test_inline \
testTcapsystem \
testNBAPsystem \
test_bad_values \
test_compile_options \
testDoubleEllipses \
test_modified_x420 \
@@ -115,16 +113,9 @@ MODULES= \
asn1_app_test \
asn1_appup_test \
asn1_wrapper \
asn1_SUITE \
asn1_bin_SUITE \
asn1_bin_v2_SUITE
asn1_SUITE
SUITE= asn1_SUITE.erl
SUITE_BIN= asn1_bin_SUITE.erl
SUITE_BIN_V2= asn1_bin_v2_SUITE.erl
SUITE_SRC= asn1_SUITE.erl.src
SUITE_BIN_SRC= asn1_bin_SUITE.erl.src
SUITE_BIN_V2_SRC= asn1_bin_SUITE.erl.src
ERL_FILES= $(MODULES:%=%.erl)
@@ -153,30 +144,10 @@ $(EMAKEFILE): $(ERL_FILES) $(HRL_FILES)
tests debug opt: $(SUITE) $(SUITE_BIN) $(SUITE_BIN_V2) $(EMAKEFILE)
clean:
rm -f $(SUITE) $(SUITE_BIN) $(SUITE_BIN_V2)
rm -f core
docs:
#-----------------------------------------------------
# Special Targets
#-----------------------------------------------------
$(SUITE): $(SUITE_SRC) asn1_common_SUITE.erl.src asn1_particular_SUITE.erl.src
sed -e 's;%BIN%;;' -e 's;%PER%;per;' -e 's;%BER%;ber;' $< > $@
cat asn1_common_SUITE.erl.src >> $@
cat asn1_particular_SUITE.erl.src >> $@
$(SUITE_BIN): $(SUITE_SRC) asn1_bin_particular_SUITE.erl.src
sed -e 's;%BIN%;bin_;' -e 's;%PER%;per_bin;' -e 's;%BER%;ber_bin;' $< > $@
echo "common() -> []." >> $@
cat asn1_bin_particular_SUITE.erl.src >> $@
$(SUITE_BIN_V2): $(SUITE_SRC) asn1_bin_v2_particular_SUITE.erl.src
sed -e 's;%BIN%;bin_v2_;' -e 's;%PER%;per_bin;' -e 's;%BER%;ber_bin_v2;' $< > $@
echo "common() -> []." >> $@
cat asn1_bin_v2_particular_SUITE.erl.src >> $@
# ----------------------------------------------------
# Release Target
# ----------------------------------------------------
@@ -187,15 +158,11 @@ release_spec: opt
release_tests_spec: opt
$(INSTALL_DIR) $(RELSYSDIR)
$(INSTALL_DIR) $(RELSYSDIR)/asn1_SUITE_data
$(INSTALL_DIR) $(RELSYSDIR)/asn1_bin_SUITE_data
$(INSTALL_DIR) $(RELSYSDIR)/asn1_bin_v2_SUITE_data
$(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)
$(INSTALL_DATA) asn1.spec asn1.cover $(INSTALL_PROGS) $(RELSYSDIR)
chmod -R u+w $(RELSYSDIR)
cd asn1_SUITE_data; tar cfh $(RELSYSDIR)/asn1_SUITE_data.tar *
cd $(RELSYSDIR)/asn1_SUITE_data; tar xf $(RELSYSDIR)/asn1_SUITE_data.tar
cd $(RELSYSDIR)/asn1_bin_SUITE_data; tar xf $(RELSYSDIR)/asn1_SUITE_data.tar
cd $(RELSYSDIR)/asn1_bin_v2_SUITE_data; tar xf $(RELSYSDIR)/asn1_SUITE_data.tar
rm $(RELSYSDIR)/asn1_SUITE_data.tar
release_docs_spec:
Oops, something went wrong.

0 comments on commit 9ec0a0b

Please sign in to comment.