Add cancel inference tests

These tests are run with a special custom firmware

Change-Id: I0dfcae1fbaa1287d4b52fd8f6c802bebb5248d3b
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 37b7d8b..4b18862 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -20,18 +20,23 @@
 
 file(GLOB models LIST_DIRECTORIES true "${CORE_PLATFORM_PATH}/applications/baremetal/models/${ETHOSU_TARGET_NPU_CONFIG}/*")
 
-# Build executable
-foreach(model ${models})
-    get_filename_component(modelname ${model} NAME)
+function(add_test_executable testname)
+    # Build executable
+    foreach(model ${models})
+        get_filename_component(modelname ${model} NAME)
 
-    add_executable(lds_${modelname}_tests "main.cpp")
+        add_executable(lds_${testname}_${modelname} ${testname}.cpp)
 
-    target_include_directories(lds_${modelname}_tests PRIVATE
-        ${model})
+        target_include_directories(lds_${testname}_${modelname} PRIVATE
+            ${model})
 
-    # Link agains ethosu library
-    target_link_libraries(lds_${modelname}_tests PRIVATE ethosu)
+        # Link agains ethosu library
+        target_link_libraries(lds_${testname}_${modelname} PRIVATE ethosu)
 
-    # Install target
-    install(TARGETS lds_${modelname}_tests DESTINATION "bin")
-endforeach()
+        # Install target
+        install(TARGETS lds_${testname}_${modelname} DESTINATION "bin")
+    endforeach()
+endfunction()
+
+add_test_executable(run_inference_test)
+add_test_executable(cancel_inference_test)