Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

Add testing infrastructure #17

Merged
merged 5 commits into from
Feb 6, 2018
Merged

Add testing infrastructure #17

merged 5 commits into from
Feb 6, 2018

Conversation

rogersm
Copy link
Contributor

@rogersm rogersm commented Feb 5, 2018

Some small steps to add testing infrastructure to close Issue #11:

  1. For the tests to run Check needs to be installed in your OS or vagrant.
  2. Tests should be written in the $(ROOT)/tests/ directory using the check syntax.
    Additional info can be found reading the man page:
# man checkmk
  1. Also, tests can be coded directly in C in $(ROOT)/tests/ directory, no problem with that. I plan to add a sample shortly, but if you do it before me and the Makefile is unable to compile them, please open an issue and I'll check.
  2. Test samples are fairly inconsequential :)
  3. The Makefile doesn't run the tests, this has to be done manually or via CI running the binaries compiled by the Makefile in $(ROOT)/tests/ directory. They can be identified by the .run extension. @zachflower can you add them to Travis CI?

Makefile Outdated
@@ -1,27 +1,40 @@
CC = gcc
C_FLAGS = -Wall -g -pedantic -Werror
C_FLAGS = -Wall -pedantic -Werror
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are you disabling -g? I'd think we'd want debugging information in the binaries so core dumps are readable.

Copy link
Member

@zachflower zachflower left a comment

Choose a reason for hiding this comment

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

I think requiring check in macOS is fine, but let's make sure to keep the development environment in Vagrant up to date, since it can be provisioned automatically. Would you add a check provisioner, please?

There are two places to do this, the first is the provisioner script (take a look at vagrant/provisioners/c.sh for a solid example) and the second is in the Vagrantfile itself (where the provisioner scripts are executed).

@zachflower zachflower merged commit 5e2825a into mudcoders:develop Feb 6, 2018
@rogersm rogersm deleted the tests-issue-11 branch February 6, 2018 20:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add test suite
3 participants