From dbc461522c95add9fc0e3e506d934ba913ef35ae Mon Sep 17 00:00:00 2001 From: Giles Knap Date: Tue, 9 Apr 2024 19:32:46 +0000 Subject: [PATCH] fix include paths --- src/vdct2template/macros.py | 2 +- tests/results/dlsPLC_fastValve.template | 6 +-- tests/results/dlsPLC_feFastValve.template | 6 +-- tests/results/dlsPLC_genericDevice.template | 4 +- tests/results/dlsPLC_interlock.template | 2 +- .../results/dlsPLC_interlock_summary.template | 48 +++++++++---------- tests/results/dlsPLC_leakValve.template | 6 +-- tests/results/dlsPLC_mpsPermit.template | 2 +- tests/results/dlsPLC_vacPump.template | 4 +- tests/results/dlsPLC_vacValve.template | 6 +-- .../results/dlsPLC_vacValveBistable.template | 6 +-- .../results/dlsPLC_vacValveDebounce.template | 6 +-- .../dlsPLC_vacValveSoftOpening.template | 6 +-- 13 files changed, 52 insertions(+), 52 deletions(-) diff --git a/src/vdct2template/macros.py b/src/vdct2template/macros.py index d52c58a..c1c52d3 100644 --- a/src/vdct2template/macros.py +++ b/src/vdct2template/macros.py @@ -52,7 +52,7 @@ def render_include(self): for name, value in self.macros.items(): include += f'substitute "_{name}={value}"\n' - include += f'\ninclude "{self.template_path}"\n' + include += f'\ninclude "{self.template_path.name}"\n' return include diff --git a/tests/results/dlsPLC_fastValve.template b/tests/results/dlsPLC_fastValve.template index 1f5eb11..c841662 100644 --- a/tests/results/dlsPLC_fastValve.template +++ b/tests/results/dlsPLC_fastValve.template @@ -108,7 +108,7 @@ substitute "_sta_label5=$(sta_label5=Open Disarmed)" substitute "_sta_label6=$(sta_label6=)" substitute "_donecalc=0" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveCtrl.template" +include "dlsPLC_valveCtrl.template" substitute "_DIR=$(EMPTY=)" @@ -133,11 +133,11 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveGilk.template" +include "dlsPLC_valveGilk.template" # Operational/Service Mode diff --git a/tests/results/dlsPLC_feFastValve.template b/tests/results/dlsPLC_feFastValve.template index 786db5a..f58c606 100644 --- a/tests/results/dlsPLC_feFastValve.template +++ b/tests/results/dlsPLC_feFastValve.template @@ -88,7 +88,7 @@ substitute "_sta_label5=$(sta_label5=Open Disarmed)" substitute "_sta_label6=$(sta_label6=Partially Armed)" substitute "_donecalc=0" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveCtrl.template" +include "dlsPLC_valveCtrl.template" substitute "_DIR=$(EMPTY=)" @@ -113,11 +113,11 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" -include "/workspaces/vdct2template/tests/data/dlsPLC_fastvalveGilk.template" +include "dlsPLC_fastvalveGilk.template" # Operational/Service Mode diff --git a/tests/results/dlsPLC_genericDevice.template b/tests/results/dlsPLC_genericDevice.template index ac3c152..ff27f7b 100644 --- a/tests/results/dlsPLC_genericDevice.template +++ b/tests/results/dlsPLC_genericDevice.template @@ -69,7 +69,7 @@ substitute "_sta_label5=$(sta_label5=)" substitute "_sta_label6=$(sta_label6=)" substitute "_donecalc=((A=D)&(((A*2+1)=B)|A=2|C=0))?0:1" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveCtrl.template" +include "dlsPLC_valveCtrl.template" substitute "_DIR=ON" @@ -94,7 +94,7 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" diff --git a/tests/results/dlsPLC_interlock.template b/tests/results/dlsPLC_interlock.template index 569e685..a320daf 100644 --- a/tests/results/dlsPLC_interlock.template +++ b/tests/results/dlsPLC_interlock.template @@ -82,7 +82,7 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" diff --git a/tests/results/dlsPLC_interlock_summary.template b/tests/results/dlsPLC_interlock_summary.template index 2d0a318..72be0df 100644 --- a/tests/results/dlsPLC_interlock_summary.template +++ b/tests/results/dlsPLC_interlock_summary.template @@ -82,145 +82,145 @@ record(calc, "$(device):ILK:GLOBAL") { substitute "_N=1" substitute "_ilk=$(ilk1=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=2" substitute "_ilk=$(ilk2=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=3" substitute "_ilk=$(ilk3=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=4" substitute "_ilk=$(ilk4=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=5" substitute "_ilk=$(ilk5=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=6" substitute "_ilk=$(ilk6=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=7" substitute "_ilk=$(ilk7=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=8" substitute "_ilk=$(ilk8=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=9" substitute "_ilk=$(ilk9=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=10" substitute "_ilk=$(ilk10=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=11" substitute "_ilk=$(ilk11=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=12" substitute "_ilk=$(ilk12=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=13" substitute "_ilk=$(ilk13=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=14" substitute "_ilk=$(ilk14=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=15" substitute "_ilk=$(ilk15=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=16" substitute "_ilk=$(ilk16=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=17" substitute "_ilk=$(ilk17=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=18" substitute "_ilk=$(ilk18=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=19" substitute "_ilk=$(ilk19=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=20" substitute "_ilk=$(ilk20=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=21" substitute "_ilk=$(ilk21=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=22" substitute "_ilk=$(ilk22=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=23" substitute "_ilk=$(ilk23=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" substitute "_N=24" substitute "_ilk=$(ilk24=NO-INTERLOCK)" -include "/workspaces/vdct2template/tests/data/dlsPLC_interlock_check.template" +include "dlsPLC_interlock_check.template" diff --git a/tests/results/dlsPLC_leakValve.template b/tests/results/dlsPLC_leakValve.template index 6915050..b506e2c 100644 --- a/tests/results/dlsPLC_leakValve.template +++ b/tests/results/dlsPLC_leakValve.template @@ -91,7 +91,7 @@ substitute "_sta_label5=$(sta_label5=)" substitute "_sta_label6=$(sta_label6=)" substitute "_donecalc=((A=D)&(((A*2+1)=B)|A=2|C=0))?0:1" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveCtrl.template" +include "dlsPLC_valveCtrl.template" substitute "_DIR=$(EMPTY=)" @@ -116,11 +116,11 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveGilk.template" +include "dlsPLC_valveGilk.template" # Operational/Service Mode diff --git a/tests/results/dlsPLC_mpsPermit.template b/tests/results/dlsPLC_mpsPermit.template index 8b34caf..63b9454 100644 --- a/tests/results/dlsPLC_mpsPermit.template +++ b/tests/results/dlsPLC_mpsPermit.template @@ -35,7 +35,7 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" diff --git a/tests/results/dlsPLC_vacPump.template b/tests/results/dlsPLC_vacPump.template index 2dc3216..5b1ebd6 100644 --- a/tests/results/dlsPLC_vacPump.template +++ b/tests/results/dlsPLC_vacPump.template @@ -77,7 +77,7 @@ substitute "_sta_label5=$(sta_label5=)" substitute "_sta_label6=$(sta_label6=)" substitute "_donecalc=((A=D)&(((A*2+1)=B)|A=2|C=0))?0:1" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveCtrl.template" +include "dlsPLC_valveCtrl.template" substitute "_DIR=$(EMPTY=)" @@ -102,7 +102,7 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" # Operational/Service Mode diff --git a/tests/results/dlsPLC_vacValve.template b/tests/results/dlsPLC_vacValve.template index 98866e6..8e2869a 100644 --- a/tests/results/dlsPLC_vacValve.template +++ b/tests/results/dlsPLC_vacValve.template @@ -95,7 +95,7 @@ substitute "_sta_label5=$(sta_label5=)" substitute "_sta_label6=$(sta_label6=)" substitute "_donecalc=((A=D)&(((A*2+1)=B)|A=2|C=0))?0:1" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveCtrl.template" +include "dlsPLC_valveCtrl.template" substitute "_DIR=$(EMPTY=)" @@ -120,11 +120,11 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveGilk.template" +include "dlsPLC_valveGilk.template" # Operational/Service Mode diff --git a/tests/results/dlsPLC_vacValveBistable.template b/tests/results/dlsPLC_vacValveBistable.template index 105af0f..8e543a9 100644 --- a/tests/results/dlsPLC_vacValveBistable.template +++ b/tests/results/dlsPLC_vacValveBistable.template @@ -103,7 +103,7 @@ substitute "_sta_label5=$(sta_label5=)" substitute "_sta_label6=$(sta_label6=)" substitute "_donecalc=((A=D)&(((A*2+1)=B)|A=2|C=0))?0:1" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveCtrl.template" +include "dlsPLC_valveCtrl.template" # Override LASTCON to be selected bits of $(addr)+1 @@ -206,7 +206,7 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" substitute "_DIR=CLOSE" @@ -231,7 +231,7 @@ substitute "_ilk13=$(cilk13=unused)" substitute "_ilk14=$(cilk14=unused)" substitute "_ilk15=$(cilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" # Operational/Service Mode diff --git a/tests/results/dlsPLC_vacValveDebounce.template b/tests/results/dlsPLC_vacValveDebounce.template index 628ad4e..87c5c27 100644 --- a/tests/results/dlsPLC_vacValveDebounce.template +++ b/tests/results/dlsPLC_vacValveDebounce.template @@ -111,7 +111,7 @@ substitute "_sta_label5=$(sta_label5=)" substitute "_sta_label6=$(sta_label6=)" substitute "_donecalc=((A=D)&(((A*2+1)=B)|A=2|C=0))?0:1" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveCtrl.template" +include "dlsPLC_valveCtrl.template" substitute "_DIR=$(EMPTY=)" @@ -136,11 +136,11 @@ substitute "_ilk13=$(ilk13=unused)" substitute "_ilk14=$(ilk14=unused)" substitute "_ilk15=$(ilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveGilk.template" +include "dlsPLC_valveGilk.template" # Operational/Service Mode diff --git a/tests/results/dlsPLC_vacValveSoftOpening.template b/tests/results/dlsPLC_vacValveSoftOpening.template index b947ac5..20aac1b 100644 --- a/tests/results/dlsPLC_vacValveSoftOpening.template +++ b/tests/results/dlsPLC_vacValveSoftOpening.template @@ -87,7 +87,7 @@ substitute "_sta_label5=$(sta_label5=)" substitute "_sta_label6=$(sta_label6=)" substitute "_donecalc=((A=D)&(((A*2+1)=B)|A=2|C=0))?0:1" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveCtrl.template" +include "dlsPLC_valveCtrl.template" substitute "_DIR=$(EMPTY=)" @@ -112,7 +112,7 @@ substitute "_ilk13=$(softilk13=unused)" substitute "_ilk14=$(softilk14=unused)" substitute "_ilk15=$(softilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template" substitute "_DIR=$(EMPTY=)" substitute "_ILK=16" @@ -136,7 +136,7 @@ substitute "_ilk13=$(fullilk13=unused)" substitute "_ilk14=$(fullilk14=unused)" substitute "_ilk15=$(fullilk15=unused)" -include "/workspaces/vdct2template/tests/data/dlsPLC_valveIlk.template" +include "dlsPLC_valveIlk.template"