mirror of
https://github.com/ThrowTheSwitch/CMock.git
synced 2026-10-03 07:27:36 +00:00
Merge pull request #344 from ThrowTheSwitch/test/switch_to_actions
Switch to github actions
This commit is contained in:
@@ -0,0 +1,41 @@
|
|||||||
|
---
|
||||||
|
# Continuous Integration Workflow: Test case suite run + validation build check
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
# Controls when the action will run.
|
||||||
|
# Triggers the workflow on push or pull request events but only for the master branch
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# Job: Unit test suite
|
||||||
|
unit-tests:
|
||||||
|
name: "Unit Tests"
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
# Install Multilib
|
||||||
|
- name: Install Multilib
|
||||||
|
run: |
|
||||||
|
sudo apt-get install --assume-yes --quiet gcc-multilib
|
||||||
|
|
||||||
|
# Checks out repository under $GITHUB_WORKSPACE
|
||||||
|
- name: Checkout Latest Repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
|
||||||
|
# Install Ruby Testing Tools
|
||||||
|
- name: Setup Ruby Testing Tools
|
||||||
|
run: |
|
||||||
|
sudo gem install bundler
|
||||||
|
sudo gem install rspec
|
||||||
|
sudo gem install rubocop -v 0.57.2
|
||||||
|
bundle install
|
||||||
|
|
||||||
|
# Run Tests
|
||||||
|
- name: Run All Unit Tests
|
||||||
|
run: |
|
||||||
|
cd test && rake ci
|
||||||
@@ -1,6 +1,7 @@
|
|||||||
test/system/build
|
test/system/build
|
||||||
test/system/generated
|
test/system/generated
|
||||||
*.sublime-project
|
*.sublime-project
|
||||||
|
*.sublime-workspace
|
||||||
Gemfile.lock
|
Gemfile.lock
|
||||||
.rake_t_cache
|
.rake_t_cache
|
||||||
.DS_Store
|
.DS_Store
|
||||||
|
|||||||
-28
@@ -1,28 +0,0 @@
|
|||||||
sudo: required
|
|
||||||
language: ruby c
|
|
||||||
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
#- os: osx
|
|
||||||
# compiler: clang
|
|
||||||
# osx_image: xcode7.3
|
|
||||||
- os: linux
|
|
||||||
dist: trusty
|
|
||||||
rvm: "2.4"
|
|
||||||
compiler: gcc
|
|
||||||
- os: linux
|
|
||||||
dist: xenial
|
|
||||||
rvm: "2.7"
|
|
||||||
compiler: clang
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- sudo apt-get install --assume-yes --quiet gcc-multilib
|
|
||||||
|
|
||||||
install:
|
|
||||||
- gem install bundler
|
|
||||||
- bundle install
|
|
||||||
- gem install rspec
|
|
||||||
- gem install rubocop -v 0.57.2
|
|
||||||
|
|
||||||
script:
|
|
||||||
- cd test && rake ci
|
|
||||||
@@ -1,7 +1,12 @@
|
|||||||
CMock - Mock/stub generator for C
|
CMock 
|
||||||
=================================
|
=====
|
||||||
|
CMock is a mock and stub generator and runtime for unit testing C. It's been designed
|
||||||
|
to work smoothly with Unity Test, another of the embedded-software testing tools
|
||||||
|
developed by ThrowTheSwitch.org. CMock automagically parses your C headers and creates
|
||||||
|
useful and usable mock interfaces for unit testing. Give it a try!
|
||||||
|
|
||||||
[](https://travis-ci.org/ThrowTheSwitch/CMock)
|
If you don't care to manage unit testing builds yourself, consider checking out Ceedling,
|
||||||
|
a test-centered build manager for unit testing C code.
|
||||||
|
|
||||||
Getting Started
|
Getting Started
|
||||||
================
|
================
|
||||||
|
|||||||
+4
-5
@@ -87,16 +87,15 @@ if $0 == __FILE__
|
|||||||
options = {}
|
options = {}
|
||||||
filelist = []
|
filelist = []
|
||||||
ARGV.each do |arg|
|
ARGV.each do |arg|
|
||||||
if (arg =~ /^-o\"?([a-zA-Z0-9@._\\\/:\s]+)\"?/)
|
if arg =~ /^-o\"?([a-zA-Z0-9@._\\\/:\s]+)\"?/
|
||||||
options.merge! CMockConfig.load_config_file_from_yaml(arg.gsub(/^-o/, ''))
|
options.merge! CMockConfig.load_config_file_from_yaml(arg.gsub(/^-o/, ''))
|
||||||
elsif (arg == '--skeleton')
|
elsif arg == '--skeleton'
|
||||||
options[:skeleton] = true
|
options[:skeleton] = true
|
||||||
elsif (arg =~ /^--strippables=\"?(.*)\"?/)
|
elsif arg =~ /^--strippables=\"?(.*)\"?/
|
||||||
# --strippables are dealt with separately since the user is allowed to
|
# --strippables are dealt with separately since the user is allowed to
|
||||||
# enter any valid regular expression as argument
|
# enter any valid regular expression as argument
|
||||||
options = option_maker(options, 'strippables', Regexp.last_match(1))
|
options = option_maker(options, 'strippables', Regexp.last_match(1))
|
||||||
elsif (arg =~ /^--([a-zA-Z0-9._\\\/:\s]+)=
|
elsif arg =~ /^--([a-zA-Z0-9._\\\/:\s]+)=\"?([a-zA-Z0-9._\-\\\/:\s\;]*)\"?/x
|
||||||
\"?([a-zA-Z0-9._\-\\\/:\s\;]*)\"?/x)
|
|
||||||
options = option_maker(options, Regexp.last_match(1),
|
options = option_maker(options, Regexp.last_match(1),
|
||||||
Regexp.last_match(2))
|
Regexp.last_match(2))
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -2245,7 +2245,7 @@ describe CMockHeaderParser, "Verify CMockHeaderParser Module" do
|
|||||||
"#include \"cmock.h\"\n" +
|
"#include \"cmock.h\"\n" +
|
||||||
"#include \"YetAnotherHeader.h\"\n" +
|
"#include \"YetAnotherHeader.h\"\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"/* Ignore the following warnings since we are copying code */\n" +
|
"\n" + #The comments are now removed
|
||||||
"#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n" +
|
"#if defined(__GNUC__) && !defined(__ICC) && !defined(__TMS470__)\n" +
|
||||||
"#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0)))\n" +
|
"#if __GNUC__ > 4 || (__GNUC__ == 4 && (__GNUC_MINOR__ > 6 || (__GNUC_MINOR__ == 6 && __GNUC_PATCHLEVEL__ > 0)))\n" +
|
||||||
"#pragma GCC diagnostic push\n" +
|
"#pragma GCC diagnostic push\n" +
|
||||||
|
|||||||
Reference in New Issue
Block a user