Revise top/basic test

This commit is contained in:
Rob Bocchino 2025-12-04 16:56:29 -08:00
parent 7d107720d8
commit 0e50a7da7d
11 changed files with 34 additions and 35 deletions

View File

@ -1,8 +0,0 @@
ActiveComponentAc.cpp
ActiveComponentAc.hpp
BasicTopologyAc.cpp
BasicTopologyAc.hpp
PPortAc.cpp
PPortAc.hpp
PassiveComponentAc.cpp
PassiveComponentAc.hpp

View File

@ -0,0 +1,2 @@
BasicTopologyAc.cpp
BasicTopologyAc.hpp

View File

@ -0,0 +1,17 @@
module M {
port P
active component Active {
async input port p: P
}
passive component Passive {
output port p: P
}
}

View File

@ -1,21 +1,3 @@
module M {
port P
active component Active {
async input port p: P
}
passive component Passive {
output port p: P
}
}
instance active1: M.Active base id 0x100 \
at "Active.hpp" \
queue size 10 stack size 1024 priority 1 cpu 0

View File

@ -1,15 +1,17 @@
#!/bin/sh -e
cd ../..
. ./defs.sh
cd check-cpp-dir/Basic
echo ' removing old files'
./clean
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/Basic basic.fpp
cd ../../basic;
fpp_to_cpp=../../../../../bin/fpp-to-cpp
$fpp_to_cpp -p $PWD -i $FPRIME_DEPS,../phases.fpp -d ../check-cpp-dir/Basic components.fpp topology.fpp
)
fprime_gcc=../../../../../../scripts/fprime-gcc

View File

@ -4,7 +4,7 @@
clean
rm -f default-tests.sh default-update-ref.sh
for file in `find . -name '*o' -or -name '*Ac.hpp' -or -name '*Ac.cpp'`
for file in `find . -name '*o' -or -name '*Ac.hpp' -or -name '*Ac.cpp' -or -name '*.names.txt'`
do
rm $file
done

View File

@ -1,14 +1,16 @@
basic()
{
run_test "-i builtin.fpp -n basic.names.txt -p $PWD" basic && \
cd basic
run_test "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp -n basic.names.txt" topology && \
diff -u basic.names.txt basic.names.ref.txt && \
diff_cpp BasicTopology
cd ..
}
commands()
{
cd commands
run_test "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp" topology
run_test "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp" topology && \
diff_cpp CommandsTopology
cd ..
}

View File

@ -1,8 +1,10 @@
basic()
{
update "-i builtin.fpp -n basic.names.txt -p $PWD" basic
cd basic
update "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp -n basic.names.txt" topology
mv basic.names.txt basic.names.ref.txt
move_cpp BasicTopology
cd ..
}
commands()