From 42948d8cea797db68d31707beb117741cd022fcc Mon Sep 17 00:00:00 2001 From: Jacob Seman <90524106+Jbsco@users.noreply.github.com> Date: Sat, 21 Sep 2024 16:15:15 -0600 Subject: [PATCH] Modify scripts to handle type dependencies for COSMOS test scripts --- gnd/cosmos/build_cosmos_plugin.sh | 8 ++++++++ gnd/cosmos/install_cosmos_plugin.sh | 6 ++++++ 2 files changed, 14 insertions(+) diff --git a/gnd/cosmos/build_cosmos_plugin.sh b/gnd/cosmos/build_cosmos_plugin.sh index 33fb411..88a4f6a 100755 --- a/gnd/cosmos/build_cosmos_plugin.sh +++ b/gnd/cosmos/build_cosmos_plugin.sh @@ -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 diff --git a/gnd/cosmos/install_cosmos_plugin.sh b/gnd/cosmos/install_cosmos_plugin.sh index cf90d42..f9329f9 100755 --- a/gnd/cosmos/install_cosmos_plugin.sh +++ b/gnd/cosmos/install_cosmos_plugin.sh @@ -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..." @@ -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."