Skip to content

Commit

Permalink
Modify scripts to handle type dependencies for COSMOS test scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
Jbsco committed Sep 21, 2024
1 parent 8bc9f2d commit 42948d8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
8 changes: 8 additions & 0 deletions gnd/cosmos/build_cosmos_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,12 @@ assembly_dir=$1
cd $assembly_dir
plugin=`redo what 2>&1 | grep "cosmos" | awk '{ print $2 }'`
echo $plugin | xargs redo-ifchange
record_type=`redo what 2>&1 | grep "parameter_table_record.py" | awk '{ print $2 }'`
echo $record_type | xargs redo-ifchange
cd '../../../../adamant/src/types/parameter'
record_type=`redo what 2>&1 | grep "parameter_table_header.py" | awk '{ print $2 }'`
echo $record_type | xargs redo-ifchange
cd '../packed_types'
record_type=`redo what 2>&1 | grep "packed_f32.py" | awk '{ print $2 }'`
echo $record_type | xargs redo-ifchange
cd - >/dev/null
6 changes: 6 additions & 0 deletions gnd/cosmos/install_cosmos_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ adamant_assembly_name_upper=$(tr [:lower:] [:upper:] <<< "$adamant_assembly_name
adamant_assembly_cmdtlm_dir=`realpath $adamant_assembly_dir/build/cosmos/plugin`
adamant_assembly_plugin_dir=`realpath $adamant_assembly_dir/main/cosmos/plugin`
adamant_protocol_dir=`realpath $this_dir/../../../adamant/gnd/cosmos`
adamant_dir=`realpath $this_dir/../../../adamant`

# Copy all protocol files (plugins compile with only needed protocols):
echo "Copying over plugin files..."
Expand All @@ -59,6 +60,11 @@ do_copy "$adamant_script_dir/update-param-sys.py" $cosmos_script_dir/update-para
do_copy "$adamant_script_dir/validate-param-sys.py" $cosmos_script_dir/validate-param-sys.py
do_copy "$adamant_script_dir/test_setup.py" $cosmos_script_dir/test_setup.py
do_copy "$adamant_script_dir/crc_16.py" $cosmos_script_dir/crc_16.py
do_copy "$adamant_assembly_dir/build/py/${adamant_assembly_name}_parameter_table_record.py" $cosmos_script_dir/${adamant_assembly_name}_parameter_table_record.py
mkdir -p $cosmos_script_dir/base_classes
do_copy "$adamant_dir/src/types/parameter/build/py/parameter_table_header.py" $cosmos_script_dir/parameter_table_header.py
do_copy "$adamant_dir/src/types/packed_types/build/py/packed_f32.py" $cosmos_script_dir/packed_f32.py
do_copy "$adamant_dir/gnd/base_classes/packed_type_base.py" $cosmos_script_dir/base_classes/packed_type_base.py
echo "Success."
echo "Plugin files copied to $cosmos_plugin_dir."
echo "Script files copied to $cosmos_script_dir."

0 comments on commit 42948d8

Please sign in to comment.