Skip to content

Commit

Permalink
update to open source v1.7
Browse files Browse the repository at this point in the history
  • Loading branch information
blueoceanwater committed Mar 13, 2023
1 parent 9823110 commit cd3f7f4
Show file tree
Hide file tree
Showing 196 changed files with 8,678 additions and 3,013 deletions.
83 changes: 82 additions & 1 deletion ReadMe.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,87 @@ in the `CTF Documentation` directory of the CTF releases' Assets (https://github

## Release Notes

### v1.7
01/24/2023
* CTF Core Changes
* Improve label resolution in conditional branching and looping instructions.

* Add a new `test_variable` section in config file to initialize user-defined variables.

* Fix a bug in importing OS environment variables when reading config files.

* Fix an error when disabling the last instruction in a test.

* Minor improvements and bug fixes.

* CTF Plugins Changes

* Updates to CFS Plugin
* Log telemetry packet errors and the raw data to the tlm log file.

* Fix killing CFS processes for SSH targets.

* Fix capturing CFS standard output file in test results for SSH targets.

* CCSDS Plugin
* Add detection of inconsistent data type definitions in CCDD JSON files.

* Add support for arrays of multi-byte primitives.

* Updates to Variable Plugin
* Add an optional argument `variable_type` to `SetUserVariableFromTlm` and `SetUserVariableFromTlmHeader` instructions for explicit type conversion.

* CTF Editor Changes
* Add tolerance support for the editable fields of `CheckTlmValue` instruction.


* CTF Tool and Scripts Changes
* Update CTF build environment: replace Anaconda with PyEnv.

* Provide a script `tools/re_order.py` to order test scripts attributes consistently.

* Update example test scripts.

* Update sample cFS workspace.

* Update CTF documents.


### v1.6.1
09/26/2022

* CTF Core Changes
* Allow user-defined variable in `wait` attribute of instructions.

* Minor improvements and bug fixes.

* CTF Plugins Changes
* Updates to Validation Plugin
* Allow `SearchStr` instruction to search text string in binary file.

* Remove `SaveFileAsText` instruction from the plugin.

* Add `CheckFileExists` instruction, which checks whether a file or folder exists on the host file system.

* Updates to Variable Plugin
* Allow additional operators on `SetUserVariable` instruction, such as "%", "//", "**", "<<", ">>", "&", "|", "^".

* Updates to CFS Plugin
* Change cFS shutdown behavior for Linux and SSH targets to more reliably detect and kill processes.

* Improve `SendCfsCommand` instruction: the header argument could be any header field name defined by CCSDS packet header.

* Log tlm header's sequence_count field for debug purpose.

* Minor improvements and bug fixes.


* CTF Tool and Scripts Changes
* Update configs and scripts to work with the current sample cFS workspace.

* Consolidate and clean up example config files.


### v1.6
07/20/2022

Expand Down Expand Up @@ -531,7 +612,7 @@ Major backend updates to improve reliability/maintainability of CTF.

MSC-26646-1, "Core Flight System Test Framework (CTF)"

Copyright (c) 2019-2022 United States Government as represented by the
Copyright (c) 2019-2023 United States Government as represented by the
Administrator of the National Aeronautics and Space Administration. All Rights Reserved.

This software is governed by the NASA Open Source Agreement (NOSA) License and may be used,
Expand Down
111 changes: 3 additions & 108 deletions activate_ctf_env.sh
Original file line number Diff line number Diff line change
@@ -1,109 +1,4 @@
#!/bin/bash
# activate python virtual environment
source ~/ctf_env/bin/activate
python -V


if [[ -d $1 ]]; then
export INSTALL_DIR=$1
elif [[ -f $1 ]]; then
export INSTALL_DIR=$(dirname $1)
else
export INSTALL_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
fi

echo "INSTALL_DIR=$INSTALL_DIR"

export ANACONDA_VERSION='anaconda3'

platform='unknown'
unamestr=`uname`
if [[ "$unamestr" == 'Linux' ]]; then
platform='linux'
elif [[ "$unamestr" == 'Darwin' ]]; then
platform='darwin'
else
platform='windows'
fi

PREFIX=`grep 'prefix:' $INSTALL_DIR/pythonEnvironment*.yml | tail -n1 | awk '{print $2}' | sed 's/\/envs\/pythonEnv3//g'`

if [ ! -d "$PREFIX/envs/pythonEnv3" ]; then
printf "The install location '%s' is not valid from yml file.\\n" "$PREFIX"
PREFIX=$HOME/anaconda3
printf "\\n"
printf "%s install location:\\n" "$ANACONDA_VERSION"
printf "%s\\n" "$PREFIX"
printf "\\n"
printf " - Press ENTER to confirm %s install location\\n" "$ANACONDA_VERSION"
printf " - Press CTRL-C to abort the activation\\n"
printf " - Or specify a different location below\\n"
printf "\\n"
printf "[%s] >>> " "$PREFIX"
read -r user_prefix
if [ "$user_prefix" != "" ]; then
case "$user_prefix" in
*\ * )
printf "ERROR: Cannot install into directories with spaces\\n" >&2
exit 1
;;
*)
eval PREFIX="$user_prefix"
;;
esac
fi
fi

# See if conda is already setup on this system
if [ `which conda` ]; then
PYTHONENV=`conda env list | grep pythonEnv3`
if [ "$PYTHONENV" ]; then
echo 'activate! 1'
if [[ "$platform" == "windows" ]]; then
source $PREFIX/Scripts/activate pythonEnv3
else
source $PREFIX/bin/activate pythonEnv3
fi
else
if [[ "$platform" == 'darwin' ]]; then
$PREFIX/bin/conda env create -n pythonEnv3 -f=$INSTALL_DIR/pythonEnvironmentMac3.yml
elif [[ "$platform" == 'linux' ]]; then
if [[ "$unamemstr" == 'i686' ]]; then
$PREFIX/bin/conda env create -n pythonEnv3 -f=$INSTALL_DIR/pythonEnvironmentLinuxX86.yml
else
$PREFIX/bin/conda env create -n pythonEnv3 -f=$INSTALL_DIR/pythonEnvironmentLinux3.yml
fi
else
$PREFIX/Scripts/conda env create -n pythonEnv3 -f=$INSTALL_DIR/pythonEnvironmentWindows3.yml
fi
echo 'activate! 2'
if [[ "$platform" == "windows" ]]; then
source $PREFIX/Scripts/activate pythonEnv3
else
source $PREFIX/bin/activate pythonEnv3
fi
fi
# If not in system, check if it's installed already
elif [ -d "$PREFIX" ]; then
# Install anaconda
if [ ! -d "$PREFIX/envs/pythonEnv3" ]; then
if [[ "$platform" == 'darwin' ]]; then
$PREFIX/bin/conda env create -n pythonEnv3 -f=$INSTALL_DIR/pythonEnvironmentMac3.yml
elif [[ "$platform" == 'linux' ]]; then
if [[ "$unamemstr" == 'i686' ]]; then
$PREFIX/bin/conda env create -n pythonEnv3 -f=$INSTALL_DIR/pythonEnvironmentLinuxX86.yml
else
$PREFIX/bin/conda env create -n pythonEnv3 -f=$INSTALL_DIR/pythonEnvironmentLinux3.yml
fi
else
$PREFIX/Scripts/conda env create -n pythonEnv3 -f=$INSTALL_DIR/pythonEnvironmentWindows3.yml
fi
fi
echo 'activate! 3'
if [[ "$platform" == "windows" ]]; then
source $PREFIX/Scripts/activate pythonEnv3
else
source $PREFIX/bin/activate pythonEnv3
fi

# If not installed on the system, install it in the home directory
else
echo 'Anaconda not installed'
fi
61 changes: 0 additions & 61 deletions conda_installed_packages.txt

This file was deleted.

5 changes: 4 additions & 1 deletion configs/ci_config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ build_cfs = true
cfs_build_dir = ${cfs:workspace_dir}

# Build command to run
cfs_build_cmd = make; make install
cfs_build_cmd = make disclean; make TARGET=lx1 install

# Run directory for the CFS project
cfs_run_dir = ${cfs:workspace_dir}/build/exe/lx1
Expand Down Expand Up @@ -217,6 +217,9 @@ evs_event_mid_name = CFE_EVS_LONG_EVENT_MSG_MID
# Name of MID to collect cfe EVS short messages
evs_short_event_mid_name = CFE_EVS_SHORT_EVENT_MSG_MID

# CFS command includes crc checksum?
send_crc = false

#################################
#
#################################
Expand Down
Loading

0 comments on commit cd3f7f4

Please sign in to comment.