diff --git a/compiler/tools/fpp-to-cpp/test/top/defs.sh b/compiler/tools/fpp-to-cpp/test/top/defs.sh index 29a9c4d80..bd1b35fc2 100644 --- a/compiler/tools/fpp-to-cpp/test/top/defs.sh +++ b/compiler/tools/fpp-to-cpp/test/top/defs.sh @@ -2,6 +2,7 @@ export COMPILER_ROOT=`cd ../../../..; pwd` +export TOP_DIR=$PWD export FPRIME_DIR=`cd ../fprime; pwd` export FPRIME_DEPS="$FPRIME_DIR/config/FpConfig.fpp,$FPRIME_DIR/Platform/PlatformTypes.fpp,$FPRIME_DIR/Fw/Prm/Prm.fpp,$FPRIME_DIR/Fw/Cmd/Cmd.fpp" export FPRIME_GCC=$COMPILER_ROOT/scripts/fprime-gcc diff --git a/compiler/tools/fpp-to-cpp/test/top/nested_namespaces.ref.txt b/compiler/tools/fpp-to-cpp/test/top/nested_namespaces.ref.txt deleted file mode 100644 index e69de29bb..000000000 diff --git a/compiler/tools/fpp-to-cpp/test/top/run.sh b/compiler/tools/fpp-to-cpp/test/top/run.sh index 77fe10728..755ab1f6a 100644 --- a/compiler/tools/fpp-to-cpp/test/top/run.sh +++ b/compiler/tools/fpp-to-cpp/test/top/run.sh @@ -1,49 +1,49 @@ basic() { - cd basic + cd $TOP_DIR/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 + cd $TOP_DIR/commands run_test "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp" topology && \ diff_cpp CommandsTopology - cd .. } health() { - cd health + cd $TOP_DIR/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() { - run_test "-p $PWD" nested_namespaces && \ + cd $TOP_DIR/nested_namespaces + run_test "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp" topology && \ diff_cpp NestedNamespacesTopology } no_namespace() { + cd $TOP_DIR run_test "-p $PWD" no_namespace && \ diff_cpp NoNamespaceTopology } params() { + cd $TOP_DIR run_test "-i builtin.fpp -p $PWD" params && \ diff_cpp ParamsTopology } tlm_packets() { + cd $TOP_DIR run_test "-i builtin.fpp -p $PWD" tlm_packets && \ diff_cpp NoInstancesTopology && \ diff_cpp NoInstances_P1TlmPackets && \ @@ -58,6 +58,7 @@ tlm_packets() typed_ports_active() { + cd $TOP_DIR src_dir=$PWD/typed_ports_active run_test "-d $src_dir -p $PWD,$src_dir -i $src_dir/components.fpp" \ $src_dir/topology && \ @@ -66,6 +67,7 @@ typed_ports_active() typed_ports_passive() { + cd $TOP_DIR src_dir=$PWD/typed_ports_passive run_test "-d $src_dir -p $PWD,$src_dir -i $src_dir/components.fpp" \ $src_dir/topology && \ @@ -74,6 +76,7 @@ typed_ports_passive() typed_ports_queued() { + cd $TOP_DIR src_dir=$PWD/typed_ports_queued run_test "-d $src_dir -p $PWD,$src_dir -i $src_dir/components.fpp" \ $src_dir/topology && \ diff --git a/compiler/tools/fpp-to-cpp/test/top/update-ref.sh b/compiler/tools/fpp-to-cpp/test/top/update-ref.sh index c6ccbd22f..392c809bf 100644 --- a/compiler/tools/fpp-to-cpp/test/top/update-ref.sh +++ b/compiler/tools/fpp-to-cpp/test/top/update-ref.sh @@ -25,8 +25,10 @@ health() nested_namespaces() { - update "-p $PWD" nested_namespaces + cd nested_namespaces + update "-p $PWD -i $FPRIME_DEPS,../phases.fpp,components.fpp" topology move_cpp NestedNamespacesTopology + cd .. } no_namespace()