Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feedback from v4.0.0 beta.5 migration #223

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions script/migration/v4-rename-component-driver-prefix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,17 @@ function find_all() {
}

## c2a-core ref
header_org=("common_tlm_cmd_packet_for_driver_super.h" "eb90_frame_for_driver_super.h" "eb90_packet_for_driver_super.h")
header_new=("cdrv_common_tlm_cmd_packet.h" "cdrv_eb90_frame.h" "cdrv_eb90_packet.h")
src_org=("common_tlm_cmd_packet_for_driver_super" "eb90_frame_for_driver_super" "eb90_packet_for_driver_super")
src_new=("cdrv_common_tlm_cmd_packet" "cdrv_eb90_frame" "cdrv_eb90_packet")

echo "rename c2a-core header file name prefix & remove _for_driver_super suffix"
for i in ${!header_org[@]}; do
echo " ${header_org[$i]} -> ${header_new[$i]}"
find_all | xargs -0 sed -i -e "s#${header_org[$i]}#${header_new[$i]}#g"
for i in ${!src_org[@]}; do
echo " ${src_org[$i]}.h -> ${src_new[$i]}.h"
find_all | xargs -0 sed -i -e "s#${src_org[$i]}\.h#${src_new[$i]}\.h#g"

# rename c2a-core source impl ref for not CMake environment
echo " ${src_org[$i]}.c -> ${src_new[$i]}.c"
find_all | xargs -0 sed -i -e "s#${src_org[$i]}\.c#${src_new[$i]}\.c#g"
done

echo "rename init func"
Expand Down
6 changes: 4 additions & 2 deletions script/migration/v4-rename-if-list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ mv src/src_user/hal/if_list.c src/src_user/Settings/component_driver_super/hal_h
sed -i -e "s#IF_LIST_H_#HAL_HANDLER_REGISTRY_H_#g" src/src_user/Settings/component_driver_super/hal_handler_registry.h

### ref
sed -i -e "s#\"if_list\.h\"#\"hal_handler_registry\.h\"#g" src/src_user/Settings/component_driver_super/hal_handler_registry.c

find_all | xargs -0 sed -i -e "s#src_user/hal/if_list\.h#src_user/Settings/component_driver_super/hal_handler_registry\.h#g"
find_all | xargs -0 sed -i -e "s#src_user\\\hal\\\if_list\.h#src_user\\\Settings\\\component_driver_super\\\hal_handler_registry\.h#g"
find_all | xargs -0 sed -i -e "s#src_user\\\hal\\\if_list\.c#src_user\\\Settings\\\component_driver_super\\\hal_handler_registry\.c#g"

sed -i -e "s#\"if_list\.h\"#\"hal_handler_registry\.h\"#g" src/src_user/Settings/component_driver_super/hal_handler_registry.c

## CMake
echo "remove src/src_user/hal/if_list.c from CMakeLists.txt"
Expand Down
5 changes: 4 additions & 1 deletion script/migration/v4-rename-test-dir.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
echo "rename test top dir src/src_user/Test -> src/src_user/test"
mv src/src_user/Test src/src_user/test

echo "move test case files to test dir"
echo "move test case files to src/src_user/test"
mv src/src_user/test/test/* src/src_user/test

echo "remove test dir src/src_user/test/test"
rm -r src/src_user/test/test

sed -i 's#ROOT_PATH = "../"#ROOT_PATH = "./"#' src/src_user/test/conftest.py
Loading