add missing ceedling latest version files

This commit is contained in:
hathach 2019-11-01 19:26:33 +07:00
parent 79fbc0b23c
commit b6ee180b66
No known key found for this signature in database
GPG Key ID: 2FA891220FBFD581
7 changed files with 179 additions and 0 deletions

View File

@ -0,0 +1,16 @@
require 'ceedling/plugin'
require 'ceedling/streaminator'
require 'ceedling/constants'
class ColourReport < Plugin
def setup
@ceedling[:stream_wrapper].stdout_override(&ColourReport.method(:colour_stdout))
end
def self.colour_stdout(string)
require 'colour_reporter.rb'
report string
end
end

View File

@ -0,0 +1,36 @@
junit_tests_report
====================
## Overview
The junit_tests_report plugin creates an XML file of test results in JUnit
format, which is handy for Continuous Integration build servers or as input
into other reporting tools. The XML file is output to the appropriate
`<build_root>/artifacts/` directory (e.g. `artifacts/test/` for test tasks,
`artifacts/gcov/` for gcov, or `artifacts/bullseye/` for bullseye runs).
## Setup
Enable the plugin in your project.yml by adding `junit_tests_report`
to the list of enabled plugins.
``` YAML
:plugins:
:enabled:
- junit_tests_report
```
## Configuration
Optionally configure the output / artifact filename in your project.yml with
the `artifact_filename` configuration option. The default filename is
`report.xml`.
You can also configure the path that this artifact is stored. This can be done
by setting `path`. The default is that it will be placed in a subfolder under
the `build` directory.
``` YAML
:junit_tests_report:
:artifact_filename: report_junit.xml
```

View File

@ -0,0 +1,36 @@
xml_tests_report
====================
## Overview
The xml_tests_report plugin creates an XML file of test results in xUnit
format, which is handy for Continuous Integration build servers or as input
into other reporting tools. The XML file is output to the appropriate
`<build_root>/artifacts/` directory (e.g. `artifacts/test/` for test tasks,
`artifacts/gcov/` for gcov, or `artifacts/bullseye/` for bullseye runs).
## Setup
Enable the plugin in your project.yml by adding `xml_tests_report` to the list
of enabled plugins.
``` YAML
:plugins:
:enabled:
- xml_tests_report
```
## Configuration
Optionally configure the output / artifact filename in your project.yml with
the `artifact_filename` configuration option. The default filename is
`report.xml`.
You can also configure the path that this artifact is stored. This can be done
by setting `path`. The default is that it will be placed in a subfolder under
the `build` directory.
``` YAML
:xml_tests_report:
:artifact_filename: report_xunit.xml
```

View File

@ -0,0 +1,17 @@
###################################################################################
# #
# NAME: meson.build #
# #
# AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. #
# WRITTEN BY: Michael Brockus. #
# #
# License: MIT #
# #
###################################################################################
cmock_dir = include_directories('.')
cmock_lib = static_library(meson.project_name(),
sources: ['cmock.c'],
dependencies: [unity_dep],
include_directories: cmock_dir)

View File

@ -0,0 +1,36 @@
/*=======Test Runner Used To Run Each Test=====*/
static void run_test(UnityTestFunction func, const char* name, int line_num)
{
Unity.CurrentTestName = name;
Unity.CurrentTestLineNumber = line_num;
#ifdef UNITY_USE_COMMAND_LINE_ARGS
if (!UnityTestMatches())
return;
#endif
Unity.NumberOfTests++;
UNITY_CLR_DETAILS();
UNITY_EXEC_TIME_START();
CMock_Init();
if (TEST_PROTECT())
{
<% if @options[:plugins].include?(:cexception) %>
CEXCEPTION_T e;
Try {
<% end %>
<%= @options[:setup_name] %>();
func();
<% if @options[:plugins].include?(:cexception) %>
} Catch(e) {
TEST_ASSERT_EQUAL_HEX32_MESSAGE(CEXCEPTION_NONE, e, "Unhandled Exception!");
}
<% end %>
}
if (TEST_PROTECT())
{
<%= @options[:teardown_name] %>();
CMock_Verify();
}
CMock_Destroy();
UNITY_EXEC_TIME_STOP();
UnityConcludeTest();
}

View File

@ -0,0 +1,22 @@
###################################################################################
# #
# NAME: CMakeLists.txt #
# #
# AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. #
# WRITTEN BY: Michael Brockus. #
# #
# License: MIT #
# #
###################################################################################
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
add_library(unity STATIC "unity.c")
install(TARGETS unity EXPORT unityConfig
ARCHIVE DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}"
LIBRARY DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_LIBDIR}"
RUNTIME DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/${CMAKE_INSTALL_BINDIR}"
INCLUDES DESTINATION "${CMAKE_INSTALL_LIBDIR}")

View File

@ -0,0 +1,16 @@
###################################################################################
# #
# NAME: meson.build #
# #
# AUTHOR: Mike Karlesky, Mark VanderVoord, Greg Williams. #
# WRITTEN BY: Michael Brockus. #
# #
# License: MIT #
# #
###################################################################################
unity_dir = include_directories('.')
unity_lib = static_library(meson.project_name(),
sources: ['unity.c'],
include_directories: unity_dir)