diff --git a/.github/workflows/local_unit_test.yml b/.github/workflows/local_unit_test.yml index ac7657da5..e82f04cec 100644 --- a/.github/workflows/local_unit_test.yml +++ b/.github/workflows/local_unit_test.yml @@ -5,8 +5,23 @@ on: pull_request: jobs: + #Checks for duplicate actions. Skips push actions if there is a matching or duplicate pull-request action. + check-for-duplicates: + runs-on: ubuntu-latest + # Map a step output to a job output + outputs: + should_skip: ${{ steps.skip_check.outputs.should_skip }} + steps: + - id: skip_check + uses: fkirc/skip-duplicate-actions@master + with: + concurrent_skipping: 'same_content' + skip_after_successful_duplicate: 'true' + do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' Local-Unit-Test: + needs: check-for-duplicates + if: ${{ needs.check-for-duplicates.outputs.should_skip != 'true' }} runs-on: ubuntu-18.04 timeout-minutes: 15 diff --git a/README.md b/README.md index 7d1deac5e..cbbb80a25 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,18 @@ The autogenerated OSAL user's guide can be viewed at and + + ### Development Build: v5.1.0-rc1+dev619 - Enable symbol api test and MIR dump too large @@ -18,6 +30,7 @@ The autogenerated OSAL user's guide can be viewed at and + ### Development Build: v5.1.0-rc1+dev604 - Add typecast to memchr call diff --git a/src/os/inc/common_types.h b/src/os/inc/common_types.h index 411407452..277c85ec9 100644 --- a/src/os/inc/common_types.h +++ b/src/os/inc/common_types.h @@ -118,6 +118,11 @@ extern "C" */ typedef uint32 osal_objtype_t; + /** + * The preferred type to represent OSAL status codes defined in osapi-error.h + */ + typedef int32 osal_status_t; + /** * @brief General purpose OSAL callback function * @@ -155,5 +160,6 @@ extern "C" #define OSAL_BLOCKCOUNT_C(X) ((osal_blockcount_t)(X)) #define OSAL_INDEX_C(X) ((osal_index_t)(X)) #define OSAL_OBJTYPE_C(X) ((osal_objtype_t)(X)) +#define OSAL_STATUS_C(X) ((osal_status_t)(X)) #endif /* COMMON_TYPES_H */ diff --git a/src/os/inc/osapi-error.h b/src/os/inc/osapi-error.h index f71e97eb7..53db5c3c5 100644 --- a/src/os/inc/osapi-error.h +++ b/src/os/inc/osapi-error.h @@ -138,6 +138,22 @@ typedef char os_err_name_t[OS_ERROR_NAME_LENGTH]; * @{ */ +/*-------------------------------------------------------------------------------------*/ +/** + * @brief Convert a status code to a native "long" type + * + * For printing or logging purposes, this converts the given status code + * to a "long" (signed integer) value. It should be used in conjunction + * with the "%ld" conversion specifier in printf-style statements. + * + * @param[in] Status Execution status, see @ref OSReturnCodes + * @return Same status value converted to the "long" data type + */ +static inline long OS_StatusToInteger(osal_status_t Status) +{ + return (long)Status; +} + /*-------------------------------------------------------------------------------------*/ /** * @brief Convert an error number to a string diff --git a/src/os/inc/osapi-version.h b/src/os/inc/osapi-version.h index 9c1ad5b6e..6e4ce779a 100644 --- a/src/os/inc/osapi-version.h +++ b/src/os/inc/osapi-version.h @@ -36,8 +36,8 @@ /* * Development Build Macro Definitions */ -#define OS_BUILD_NUMBER 619 -#define OS_BUILD_BASELINE "v5.1.0-rc1" +#define OS_BUILD_NUMBER 15 +#define OS_BUILD_BASELINE "v6.0.0-rc4" /* * Version Macro Definitions @@ -68,7 +68,7 @@ /*! @brief Version code name * All modular components which are tested/validated together should share the same code name */ -#define OS_VERSION_CODENAME "Bootes" +#define OS_VERSION_CODENAME "Draco" /*! @brief Development Build Version String. * @details Reports the current development build's baseline, number, and name. Also includes a note about the latest diff --git a/src/os/portable/os-impl-posix-gettime.c b/src/os/portable/os-impl-posix-gettime.c index 0bd232200..07fd7e3f9 100644 --- a/src/os/portable/os-impl-posix-gettime.c +++ b/src/os/portable/os-impl-posix-gettime.c @@ -22,7 +22,7 @@ * \file os-impl-posix-gettime.c * \author joseph.p.hickey@nasa.gov * - * This file contains implementation for OS_GetTime() and OS_SetTime() + * This file contains implementation for OS_GetLocalTime() and OS_SetLocalTime() * that map to the C library clock_gettime() and clock_settime() calls. * This should be usable on any OS that supports those standard calls. * The OS-specific code must \#include the correct headers that define the diff --git a/src/unit-test-coverage/ut-stubs/src/vxworks-intLib-stubs.c b/src/unit-test-coverage/ut-stubs/src/vxworks-intLib-stubs.c index 2b22aba0b..bae886686 100644 --- a/src/unit-test-coverage/ut-stubs/src/vxworks-intLib-stubs.c +++ b/src/unit-test-coverage/ut-stubs/src/vxworks-intLib-stubs.c @@ -54,10 +54,12 @@ OCS_VOIDFUNCPTR *OCS_INUM_TO_IVEC(unsigned int ui) OCS_VOIDFUNCPTR * VecTbl; static OCS_VOIDFUNCPTR DummyVec; size_t VecTblSize; + void * GenericPtr; if (Status == 0) { - UT_GetDataBuffer(UT_KEY(OCS_INUM_TO_IVEC), (void **)&VecTbl, &VecTblSize, NULL); + UT_GetDataBuffer(UT_KEY(OCS_INUM_TO_IVEC), &GenericPtr, &VecTblSize, NULL); + VecTbl = GenericPtr; if (VecTbl != NULL && ui < (VecTblSize / sizeof(OCS_VOIDFUNCPTR))) { VecTbl += ui; diff --git a/ut_assert/scripts/generate_stubs.pl b/ut_assert/scripts/generate_stubs.pl index 4a0792a24..ea3ca210c 100755 --- a/ut_assert/scripts/generate_stubs.pl +++ b/ut_assert/scripts/generate_stubs.pl @@ -110,6 +110,7 @@ my $file = ""; my $file_boilerplate; my $file_variadic; + my @ifdef_level = (1); # All header files start with some legal boilerplate comments # Take the first one and save it, so it can be put into the output. @@ -125,7 +126,31 @@ # so it will be in a single "line" in the result. chomp if (s/\\$//); } - push(@lines, $_); + + # detect "#ifdef" lines - some may need to be recognized. + # at the very least, any C++-specific bits need to be skipped. + # for now this just specifically looks for __cplusplus + if (/^\#(if\w+)\s+(.*)$/) { + my $check = $1; + my $cond = $2; + my $result = $ifdef_level[0]; + + if ($cond eq "__cplusplus" && $check eq "ifdef") { + $result = 0; + } + + unshift(@ifdef_level, $result); + } + elsif (/^\#else/) { + # invert the last preprocessor condition + $ifdef_level[0] = $ifdef_level[0] ^ $ifdef_level[1]; + } + elsif (/^\#endif/) { + shift(@ifdef_level); + } + elsif ($ifdef_level[0]) { + push(@lines, $_) ; + } } close(HDR); @@ -164,7 +189,6 @@ next if (/\btypedef\b/); # ignore typedefs next if (/\bstatic inline\b/); # ignore - # discard "extern" qualifier # (but other qualifiers like "const" are OK and should be preserved, as # it is part of return type). @@ -327,7 +351,7 @@ if ($fileapi->{$funcname}->{variadic}) { $args .= ", va_list"; } - print OUT "extern void ".$handler_func->{$funcname}."($args);\n"; + print OUT "void ".$handler_func->{$funcname}."($args);\n"; } } @@ -408,4 +432,3 @@ print "Generated $stubfile\n"; } -