1
0
mirror of https://github.com/meekrosoft/fff synced 2026-01-28 02:34:28 +01:00

Migrate build to CMake and standard github workflows

Replace makefiles with CMakeLists.txt. This will allow for IDE and
platform agnostic builds of FFF.

Update the CI for FFF to use github workflows which don't depend on MS VC.
The workflow added will verify the pull requests sent to master buy
running 'buildandtest' which mirrors the developer workflow.

Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
Yuval Peress
2022-08-03 09:27:25 -06:00
parent ff70585de8
commit 2eb067e5a1
71 changed files with 303 additions and 1586 deletions

View File

@@ -0,0 +1,10 @@
#ifndef _AUTOFAKE_BUS_H
#define _AUTOFAKE_BUS_H
#include "fff.h"
#include "bus.h"
DECLARE_FAKE_VALUE_FUNC( bool, bus_read_write, uint8_t, uint8_t, uint8_t*, int, bool );
DECLARE_FAKE_VALUE_FUNC( bool, bus_write, uint8_t, uint8_t, const uint8_t*, int, bool );
#endif // _AUTOFAKE_BUS_H

View File

@@ -0,0 +1,10 @@
#ifndef _AUTOFAKE_DISPLAY_H
#define _AUTOFAKE_DISPLAY_H
#include "fff.h"
#include "display.h"
DECLARE_FAKE_VALUE_FUNC( bool, display_init );
DECLARE_FAKE_VOID_FUNC( display_update, const char* );
#endif // _AUTOFAKE_DISPLAY_H

View File

@@ -0,0 +1,10 @@
#ifndef _AUTOFAKE_ERROR_H
#define _AUTOFAKE_ERROR_H
#include "fff.h"
#include "error.h"
DECLARE_FAKE_VOID_FUNC( runtime_error, const char* );
DECLARE_FAKE_VALUE_FUNC( char*, runtime_error_nice_print, const char* );
#endif // _AUTOFAKE_ERROR_H

View File

@@ -0,0 +1,13 @@
#ifndef _AUTOMOCK_SENSOR_H
#define _AUTOMOCK_SENSOR_H
#include "fff.h"
#include "sensor.h"
DECLARE_FAKE_VALUE_FUNC( bool, sensor_init );
DECLARE_FAKE_VALUE_FUNC( float, sensor_read );
void TEST_sensor_generate_data( char* buffer, float value );
#endif // _AUTOMOCK_SENSOR_H

View File

@@ -0,0 +1,13 @@
#pragma once
#include <assert.h>
#include <stdio.h>
#include "fff.h"
#include "bus.fake.h"
#include "error.fake.h"
void init_tests();
extern char GLOBAL_TEST_bus_read_ret[32];