Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@elthariel
Copy link
Collaborator

As discussed quite some time ago with @jbkempf, I said I would start to add a bunch of tests to this little beast.

Very little of the interesting parts of the code can be tested this way, so it'll need to be paired with a higher level integration testing suite. But this is already something.


AM_CONDITIONAL([DEBUG], [test x"$enable_debug" == x"yes"])
AM_CONDITIONAL([PROGRAMS], [test x"$enable_programs" != x"no"])
AM_CONDITIONAL([TESTS], [test x"$enable_tests" != x"no"])
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this imply default=yes ?

AC_ARG_WITH([urandom],
[AS_HELP_STRING([--with-urandom=PATH],
AC_ARG_WITH([urandom],
[AS_HELP_STRING([--with-urandom=PATH],
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpicking, but unrelated

dsm_lookup_SOURCES = bin/lookup.c

if TESTS
bin_PROGRAMS += all_tests
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the test scenario you're aiming for something like

  • ../configure --enable-tests
  • make
  • ./tests

Or is make check considered?

To be honest I don't have a strong opinion on wether make check should be used when it's not actually running the tests, but this means writing a test harness for cmocka IIUC

@@ -0,0 +1,14 @@
#include <stdarg.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick: Missing license header

@jbkempf
Copy link
Contributor

jbkempf commented May 8, 2017

Seems a great idea!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants