aboutsummaryrefslogtreecommitdiffstats
path: root/test/afb-test
diff options
context:
space:
mode:
authorRomain Forlot <romain.forlot@iot.bzh>2018-09-12 16:01:59 +0200
committerRomain Forlot <romain.forlot@iot.bzh>2018-09-12 16:01:59 +0200
commit3e6d3fa8be349b40d6fd03d198b5e033cc7719e2 (patch)
treec51b7129383be221140ab423a53251080a848c10 /test/afb-test
parent01715613f16113017529c51703f3e5d90918c4c5 (diff)
Reach fixture files in all cases.
Depending if you are executing tests on a board or natively with one or more binders you have to reliably be able to reach your fixtures files. Using the bindingRootDir you always point to the right directory and know exactly where are your files. Change-Id: I61e7cd9d7ff43637dff6e63ffc82a7485cf92443 Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'test/afb-test')
-rw-r--r--test/afb-test/tests/low-can_BasicAPITest.lua5
-rw-r--r--test/afb-test/tests/low-can_FilterTest01.lua6
2 files changed, 5 insertions, 6 deletions
diff --git a/test/afb-test/tests/low-can_BasicAPITest.lua b/test/afb-test/tests/low-can_BasicAPITest.lua
index bda5bf0e..59e10d0e 100644
--- a/test/afb-test/tests/low-can_BasicAPITest.lua
+++ b/test/afb-test/tests/low-can_BasicAPITest.lua
@@ -58,13 +58,12 @@ _AFT.describe("Diagnostic_engine_speed_simulation", function()
_AFT.assertIsTrue(data.name == "diagnostic_messages.engine.speed")
end)
- local ret = os.execute("./var/replay_launcher.sh ./var/test1.canreplay")
+ local ret = os.execute("bash ".._AFT.bindingRootDir.."/var/replay_launcher.sh ".._AFT.bindingRootDir.."/var/test1.canreplay")
_AFT.assertIsTrue(ret)
_AFT.assertEvtReceived(api .."/diagnostic_messages", 1000000)
_AFT.assertVerbStatusSuccess("low-can","unsubscribe", { event = evt })
-
end)
_AFT.describe("Subscribe_all", function()
@@ -77,7 +76,7 @@ _AFT.describe("Subscribe_all", function()
_AFT.assertVerbStatusSuccess(api,"subscribe", { event = "*" })
- local ret = os.execute("./var/replay_launcher.sh ./var/test2-3.canreplay")
+ local ret = os.execute("bash ".._AFT.bindingRootDir.."/var/replay_launcher.sh ".._AFT.bindingRootDir.."/var/test2-3.canreplay")
_AFT.assertIsTrue(ret)
_AFT.assertEvtReceived(api .."/".. evt, 5000000);
diff --git a/test/afb-test/tests/low-can_FilterTest01.lua b/test/afb-test/tests/low-can_FilterTest01.lua
index 10e870e2..fac56950 100644
--- a/test/afb-test/tests/low-can_FilterTest01.lua
+++ b/test/afb-test/tests/low-can_FilterTest01.lua
@@ -47,7 +47,7 @@ _AFT.describe("Filter_Test_01/Step_1", function()
end)
_AFT.assertVerbStatusSuccess(api ,"subscribe", { event = evt, filter = { min = 30, max = 100}})
- os.execute("./var/replay_launcher.sh ./var/testFilter01filteredOut.canreplay");
+ os.execute("bash ".._AFT.bindingRootDir.."/var/replay_launcher.sh ".._AFT.bindingRootDir.."/var/testFilter01filteredOut.canreplay");
_AFT.assertEvtNotReceived(api .. "/" ..evt, 1000000)
end)
@@ -62,7 +62,7 @@ _AFT.describe("Filter_Test_01/Step_2", function()
end)
_AFT.assertVerbStatusSuccess(api ,"subscribe", { event = evt, filter = {min = 30, max = 100}})
- os.execute("./var/replay_launcher.sh ./var/testFilter01pass.canreplay");
+ os.execute("bash ".._AFT.bindingRootDir.."/var/replay_launcher.sh ".._AFT.bindingRootDir.."/var/testFilter01pass.canreplay");
_AFT.assertEvtReceived(api .. "/" ..evt, 1000000)
_AFT.assertVerbStatusSuccess(api,"unsubscribe", { event = evt, filter = {min = 30, max = 100} })
@@ -83,7 +83,7 @@ _AFT.describe("Filter_Test_01/Step_3", function()
end)
_AFT.assertVerbStatusSuccess(api ,"subscribe", { event = evt, filter = { frequency = 1 , min = 30, max = 100}})
- os.execute("./var/replay_launcher.sh ./var/testFilter01pass.canreplay");
+ os.execute("bash ".._AFT.bindingRootDir.."/var/replay_launcher.sh ".._AFT.bindingRootDir.."/var/testFilter01pass.canreplay");
_AFT.assertEvtGrpReceived({[api .."/"..evt]= 2}, 5000000)
_AFT.assertVerbStatusSuccess(api,"unsubscribe", { event = evt, filter = { frequency = 1 , min = 30, max = 100}})