Skip to content

Commit 62e5bc5

Browse files
committed
added unit-test fixtures
1 parent 4863b22 commit 62e5bc5

File tree

6 files changed

+102
-1
lines changed

6 files changed

+102
-1
lines changed

clang_format.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22

33
# Directories to process
4-
directories=(".")
4+
directories=("src" "test")
55

66
# Log file
77
log_file="clang-format.log"

project.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
3+
# Notes:
4+
# Sample project C code is not presently written to produce a release artifact.
5+
# As such, release build options are disabled.
6+
# This sample, therefore, only demonstrates running a collection of unit tests.
7+
8+
:project:
9+
:use_exceptions: FALSE
10+
:use_test_preprocessor: TRUE
11+
:use_auxiliary_dependencies: TRUE
12+
:build_root: build
13+
# :release_build: TRUE
14+
:test_file_prefix: test_
15+
:which_ceedling: gem
16+
:ceedling_version: 0.31.1
17+
:default_tasks:
18+
- test:all
19+
20+
#:test_build:
21+
# :use_assembly: TRUE
22+
23+
#:release_build:
24+
# :output: MyApp.out
25+
# :use_assembly: FALSE
26+
27+
:environment:
28+
29+
:extension:
30+
:executable: .out
31+
32+
:paths:
33+
:test:
34+
- +:test/**
35+
- -:test/support
36+
:source:
37+
- src/**
38+
:support:
39+
- test/support
40+
:libraries: []
41+
42+
:defines:
43+
# in order to add common defines:
44+
# 1) remove the trailing [] from the :common: section
45+
# 2) add entries to the :common: section (e.g. :test: has TEST defined)
46+
:common: &common_defines []
47+
:test:
48+
- *common_defines
49+
- TEST
50+
:test_preprocess:
51+
- *common_defines
52+
- TEST
53+
54+
:cmock:
55+
:mock_prefix: mock_
56+
:when_no_prototypes: :warn
57+
:enforce_strict_ordering: TRUE
58+
:plugins:
59+
- :ignore
60+
- :callback
61+
:treat_as:
62+
uint8: HEX8
63+
uint16: HEX16
64+
uint32: UINT32
65+
int8: INT8
66+
bool: UINT8
67+
68+
# Add -gcov to the plugins list to make sure of the gcov plugin
69+
# You will need to have gcov and gcovr both installed to make it work.
70+
# For more information on these options, see docs in plugins/gcov
71+
:gcov:
72+
:reports:
73+
- HtmlDetailed
74+
:gcovr:
75+
:html_medium_threshold: 75
76+
:html_high_threshold: 90
77+
78+
#:tools:
79+
# Ceedling defaults to using gcc for compiling, linking, etc.
80+
# As [:tools] is blank, gcc will be used (so long as it's in your system path)
81+
# See documentation to configure a given toolchain for use
82+
83+
# LIBRARIES
84+
# These libraries are automatically injected into the build process. Those specified as
85+
# common will be used in all types of builds. Otherwise, libraries can be injected in just
86+
# tests or releases. These options are MERGED with the options in supplemental yaml files.
87+
:libraries:
88+
:placement: :end
89+
:flag: "-l${1}"
90+
:path_flag: "-L ${1}"
91+
:system: [] # for example, you might list 'm' to grab the math library
92+
:test: []
93+
:release: []
94+
95+
:plugins:
96+
:load_paths:
97+
- "#{Ceedling.load_path}"
98+
:enabled:
99+
- stdout_pretty_tests_report
100+
- module_generator
101+
...
File renamed without changes.

lsm303.c renamed to src/lsm303.c

File renamed without changes.

lsm303.h renamed to src/lsm303.h

File renamed without changes.

test/support/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)