mirror of
https://github.com/nasa/fpp.git
synced 2025-12-10 00:40:22 -06:00
Revise top/basic test
This commit is contained in:
parent
7d107720d8
commit
0e50a7da7d
@ -1,8 +0,0 @@
|
||||
ActiveComponentAc.cpp
|
||||
ActiveComponentAc.hpp
|
||||
BasicTopologyAc.cpp
|
||||
BasicTopologyAc.hpp
|
||||
PPortAc.cpp
|
||||
PPortAc.hpp
|
||||
PassiveComponentAc.cpp
|
||||
PassiveComponentAc.hpp
|
||||
@ -0,0 +1,2 @@
|
||||
BasicTopologyAc.cpp
|
||||
BasicTopologyAc.hpp
|
||||
17
compiler/tools/fpp-to-cpp/test/top/basic/components.fpp
Normal file
17
compiler/tools/fpp-to-cpp/test/top/basic/components.fpp
Normal file
@ -0,0 +1,17 @@
|
||||
module M {
|
||||
|
||||
port P
|
||||
|
||||
active component Active {
|
||||
|
||||
async input port p: P
|
||||
|
||||
}
|
||||
|
||||
passive component Passive {
|
||||
|
||||
output port p: P
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -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
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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 ..
|
||||
}
|
||||
|
||||
@ -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()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user