Skip to content

Commit

Permalink
Merge pull request #62 from nasa/integration-candidate
Browse files Browse the repository at this point in the history
Integration Candidate 2020-03-25
  • Loading branch information
astrogeco authored Apr 3, 2020
2 parents 4ed9063 + 8d343f9 commit 45eedc6
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 17 deletions.
52 changes: 43 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,35 +1,55 @@
os: linux
dist: bionic
sudo: required
language:
- c
language: c
compiler:
- gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- cmake
- cmake cppcheck doxygen lcov graphviz
env:
global:
- SIMULATION=native
- ENABLE_UNIT_TESTS=true
matrix:
- DEPLOY_DIR=$TRAVIS_BUILD_DIR/deploy
jobs:
- BUILDTYPE=release OMIT_DEPRECATED=true
- BUILDTYPE=release OMIT_DEPRECATED=false
- BUILDTYPE=debug OMIT_DEPRECATED=true
- BUILDTYPE=debug OMIT_DEPRECATED=false

before_install:
- sudo apt-get install cppcheck doxygen lcov graphviz
# Build the pdfs and copy to the deploy directory
before_deploy:
- sudo apt-get install texlive-latex-base texlive-fonts-recommended texlive-fonts-extra texlive-latex-extra
- mkdir $DEPLOY_DIR
- cd $TRAVIS_BUILD_DIR/build/doc/users_guide/latex
- make > build.txt
- cp refman.pdf $DEPLOY_DIR/cFE_Users_Guide.pdf
- cd $TRAVIS_BUILD_DIR/build/doc/osalguide/latex
- make > build.txt
- cp refman.pdf $DEPLOY_DIR/OSAL_Users_Guide.pdf
- cd $TRAVIS_BUILD_DIR

# Deploy documentation to github pages
deploy:
provider: pages
strategy: git
cleanup: false
token: $GITHUB_TOKEN # Set in personal repository, as a secure variable
keep_history: false
local_dir: $DEPLOY_DIR
on:
condition: $BUILDTYPE = release && $OMIT_DEPRECATED = false
edge: true

script:
# Check versions
- cppcheck --version
# Setup standard permissive build
- cp cfe/cmake/Makefile.sample Makefile
- cp -r cfe/cmake/sample_defs sample_defs
- sed -i 's/undef OSAL_DEBUG_PERMISSIVE_MODE/define OSAL_DEBUG_PERMISSIVE_MODE/g' sample_defs/default_osconfig.h
# Static code analysis
# Below is intent but fails - exit code bug in cppcheck 1.82
# - cppcheck --force --inline-suppr --quiet --error-exitcode=1 .
Expand Down Expand Up @@ -59,6 +79,7 @@ script:
cat make_doc_stderr.txt
exit -1
fi
# Eventually enforce no doxygen warnings
- make usersguide > make_usersguide_stdout.txt 2> make_usersguide_stderr.txt
- |
if [[ -s make_usersguide_stderr.txt ]]; then
Expand All @@ -67,6 +88,13 @@ script:
cat make_usersguide_stderr.txt
exit -1
fi
- |
if [[ -s build/doc/warnings.log ]]; then
echo "You must fix doxygen warnings for \"usersguide\" before submitting a pull request"
echo ""
cat build/doc/warnings.log
exit -1
fi
- make osalguide > make_osalguide_stdout.txt 2> make_osalguide_stderr.txt
- |
if [[ -s make_osalguide_stderr.txt ]]; then
Expand All @@ -75,7 +103,13 @@ script:
cat make_osalguide_stderr.txt
exit -1
fi
# Eventually enforce no doxygen warnings
- |
if [[ -s build/doc/warnings.log ]]; then
echo "You must fix doxygen warnings for \"osalguide\" before submitting a pull request"
echo ""
cat build/doc/warnings.log
exit -1
fi
# List cpu1 for core binary
- ls build/exe/cpu1/
# Start cFE (pipe output to file), pause, send reset command, check outputs
Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,24 +67,22 @@ Copy in the default makefile and definitions:
cp cfe/cmake/Makefile.sample Makefile
cp -r cfe/cmake/sample_defs sample_defs

If running on a standard linux build as a normal user, define OSAL_DEBUG_PERMISSIVE_MODE for best effort message queue depth and task priorities.

sed -i 's/undef OSAL_DEBUG_PERMISSIVE_MODE/define OSAL_DEBUG_PERMISSIVE_MODE/g' sample_defs/default_osconfig.h

## Build and Run

The cFS Framework including sample applications will build and run on the pc-linux platform support package (should run on most Linux distributions), via the steps described in https://github.com/nasa/cFE/tree/master/cmake/README.md. Quick-start is below:

To prep, compile, and run (from cFS directory above):
To prep, compile, and run on the host (from cFS directory above) as a normal user (best effort message queue depth and task priorities):

make prep
make SIMULATION=native prep
make
make install
cd build/exe/cpu1/
./core-cpu1

Should see startup messages, and CFE_ES_Main entering OPERATIONAL state. Note the code must be executed from the build/exe/cpu1 directory to find the startup script and shared objects.

Note: The steps above are for a debug, permissive mode build and includes deprecated elements. For a release build, recommendation is `make BUILDTYPE=release OMIT_DEPRECATED=true prep`. Unit tests can be added with `ENABLE_UNIT_TESTS=true`, run with `make test`, and coverage reported with `make lcov`.

## Send commands, receive telemetry

The cFS-GroundSystem tool can be used to send commands and receive telemetry (see https://github.com/nasa/cFS-GroundSystem/tree/master/Guide-GroundSystem.txt, the Guide-GroundSystem.txt). Note it depends on PyQt4 and PyZMQ:
Expand Down
2 changes: 1 addition & 1 deletion apps/sample_app
2 changes: 1 addition & 1 deletion osal

0 comments on commit 45eedc6

Please sign in to comment.