Revise top tests

This commit is contained in:
Rob Bocchino 2025-12-04 18:33:25 -08:00
parent 6847034e67
commit cdbe834ea2
11 changed files with 59 additions and 77 deletions

View File

@ -1,25 +1,5 @@
#!/bin/sh -e
dir=`dirname $0`
dir=`cd $dir; pwd`
. `dirname $0`/../check_topology.sh
cd $dir/../..
. ./defs.sh
cd $dir
echo ' removing old files'
./clean
echo ' generating C++'
(
cd $dir/../../basic;
$FPP_TO_CPP -p $PWD -i $FPRIME_DEPS,../phases.fpp -d $dir components.fpp topology.fpp
)
flags="-I$FPRIME_DIR -I$FPRIME_DIR/fprime/config -Wno-unused-parameter -c"
echo ' compiling C++'
for variable_flags in '' '-DFW_DIRECT_PORT_CALLS'
do
echo " variable_flags=$variable_flags"
$FPRIME_GCC $variable_flags $flags BasicTopologyAc.cpp
done
check_topology basic Basic

View File

@ -1,25 +1,5 @@
#!/bin/sh -e
dir=`dirname $0`
dir=`cd $dir; pwd`
. `dirname $0`/../check_topology.sh
cd $dir/../..
. ./defs.sh
cd $dir
echo ' removing old files'
./clean
echo ' generating C++'
(
cd $dir/../../commands;
$FPP_TO_CPP -p $PWD -i $FPRIME_DEPS,../phases.fpp -d $dir components.fpp topology.fpp
)
flags="-I$FPRIME_DIR -I$FPRIME_DIR/fprime/config -Wno-unused-parameter -c"
echo ' compiling C++'
for variable_flags in '' '-DFW_DIRECT_PORT_CALLS'
do
echo " variable_flags=$variable_flags"
$FPRIME_GCC $variable_flags $flags CommandsTopologyAc.cpp
done
check_topology commands Commands

View File

@ -1,22 +1,5 @@
#!/bin/sh -e
echo ' removing old files'
./clean
. `dirname $0`/../check_topology.sh
echo ' generating C++'
(
cd ../..;
fpp_to_cpp=../../../../bin/fpp-to-cpp
fprime_dir=../fprime
$fpp_to_cpp -p $PWD -i $fprime_dir/config/FpConfig.fpp,$fprime_dir/Platform/PlatformTypes.fpp,$fprime_dir/Fw/Prm/Prm.fpp,phases.fpp \
$fprime_dir/Fw/Cmd/Cmd.fpp -d check-cpp-dir/Health health.fpp
)
fprime_gcc=../../../../../../scripts/fprime-gcc
flags="-I.. -I../../../fprime -I../../../fprime/config -Wno-unused-parameter -c"
echo ' compiling C++'
for variable_flags in '' '-DFW_DIRECT_PORT_CALLS'
do
echo " variable_flags=$variable_flags"
$fprime_gcc $variable_flags $flags HealthTopologyAc.cpp
done
check_topology health Health

View File

@ -0,0 +1,31 @@
check_topology()
{
top_dir=$1
top_name=$2
dir=`dirname $0`
dir=`cd $dir; pwd`
cd $dir/../..
. ./defs.sh
cd $dir
echo ' removing old files'
./clean
echo ' generating C++'
(
cd $dir/../../$top_dir;
$FPP_TO_CPP -p $PWD -i $FPRIME_DEPS,../phases.fpp -d $dir components.fpp topology.fpp
)
flags="-I$FPRIME_DIR -I$FPRIME_DIR/fprime/config -Wno-unused-parameter -c"
echo ' compiling C++'
for variable_flags in '' '-DFW_DIRECT_PORT_CALLS'
do
echo " variable_flags=$variable_flags"
$FPRIME_GCC $variable_flags $flags $top_name'TopologyAc.cpp'
done
}

View File

@ -15,16 +15,4 @@ module M {
output port pingOut: Svc.Ping
}
instance $health: Svc.Health base id 0x100
instance c1: C base id 0x200
instance c2: C base id 0x300
topology Health {
instance $health
instance c1
instance c2
health connections instance $health
}
}

View File

@ -0,0 +1,15 @@
module M {
instance $health: Svc.Health base id 0x100
instance c1: C base id 0x200
instance c2: C base id 0x300
topology Health {
instance $health
instance c1
instance c2
health connections instance $health
}
}

View File

@ -11,14 +11,17 @@ commands()
{
cd commands
run_test "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp" topology && \
diff_cpp CommandsTopology
diff_cpp CommandsTopology
cd ..
}
health()
{
cd health
run_test "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp" topology && \
run_test "-i builtin.fpp -p $PWD" health && \
diff_cpp HealthTopology
cd ..
}
nested_namespaces()

View File

@ -17,8 +17,10 @@ commands()
health()
{
update "-i builtin.fpp -p $PWD" health
cd health
update "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp" topology
move_cpp HealthTopology
cd ..
}
nested_namespaces()