-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nasa#501, add PIC library for ut assert
Add a position independent code (PIC) variant of the ut_assert library, which can be dynamically loaded into other applications rather than running as a standalone OSAL application. This enables loading UT assert as a CFE library. This required moving some symbols/functions around. Mainly, the PIC library does _not_ contain the "utbsp.c" file which has the bindings to the OSAL BSP when running as a standalone app, but everything else should be the same.
- Loading branch information
Showing
8 changed files
with
243 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
** | ||
** File: uttest.c | ||
** | ||
** Copyright 2012-2013 United States Government as represented by the | ||
** Administrator of the National Aeronautics and Space Administration. | ||
** All Other Rights Reserved. | ||
** | ||
** This software was created at NASA's Goddard Space Flight Center. | ||
** This software is governed by the NASA Open Source Agreement and may be | ||
** used, distributed and modified only pursuant to the terms of that | ||
** agreement. | ||
** | ||
** Purpose: This file contains functions to implement a standard way to execute unit tests. | ||
** | ||
*/ | ||
|
||
/* | ||
* Includes | ||
*/ | ||
|
||
#ifndef INCLUDE_UTASSERT_GLOBAL_H_ | ||
#define INCLUDE_UTASSERT_GLOBAL_H_ | ||
|
||
#include "osapi.h" | ||
#include "utassert.h" | ||
#include "utlist.h" | ||
#include "utbsp.h" | ||
#include "uttest.h" | ||
#include "utstubs.h" | ||
|
||
/* | ||
* Type Definitions | ||
*/ | ||
|
||
typedef struct | ||
{ | ||
void (*Test)(void); | ||
void (*Setup)(void); | ||
void (*Teardown)(void); | ||
|
||
/* Note - the name entry should be long enough to support a GroupName.TestName pattern, | ||
* hence why it uses double the OS_MAX_API_NAME length */ | ||
char TestName[OS_MAX_API_NAME*2]; | ||
} UtTestDataBaseEntry_t; | ||
|
||
typedef struct | ||
{ | ||
UtListHead_t DataBase; | ||
uint32 ExecutedCount; | ||
} UtAssert_Global_t; | ||
|
||
/* | ||
* Global Test Data | ||
*/ | ||
extern UtAssert_Global_t UtAssert_Global; | ||
|
||
#endif /* INCLUDE_UTASSERT_GLOBAL_H_ */ | ||
|
Oops, something went wrong.