• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //
2 // Copyright © 2017 Arm Ltd. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 
6 #include "DynamicBackendTests.hpp"
7 
8 #include <UnitTests.hpp>
9 
10 #include <doctest/doctest.h>
11 
12 TEST_SUITE("DynamicBackendTests")
13 {
14 ARMNN_SIMPLE_TEST_CASE(OpenCloseHandle, OpenCloseHandleTestImpl);
15 ARMNN_SIMPLE_TEST_CASE(CloseInvalidHandle, CloseInvalidHandleTestImpl);
16 ARMNN_SIMPLE_TEST_CASE(OpenEmptyFileName, OpenEmptyFileNameTestImpl);
17 ARMNN_SIMPLE_TEST_CASE(OpenNotExistingFile, OpenNotExistingFileTestImpl);
18 ARMNN_SIMPLE_TEST_CASE(GetValidEntryPoint, GetValidEntryPointTestImpl);
19 ARMNN_SIMPLE_TEST_CASE(GetNameMangledEntryPoint, GetNameMangledEntryPointTestImpl);
20 ARMNN_SIMPLE_TEST_CASE(GetNoExternEntryPoint, GetNoExternEntryPointTestImpl);
21 ARMNN_SIMPLE_TEST_CASE(GetNotExistingEntryPoint, GetNotExistingEntryPointTestImpl);
22 
23 ARMNN_SIMPLE_TEST_CASE(BackendVersioning, BackendVersioningTestImpl);
24 
25 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendObjectInvalidHandle,
26                        CreateDynamicBackendObjectInvalidHandleTestImpl);
27 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendObjectInvalidInterface1,
28                        CreateDynamicBackendObjectInvalidInterface1TestImpl);
29 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendObjectInvalidInterface2,
30                        CreateDynamicBackendObjectInvalidInterface2TestImpl);
31 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendObjectInvalidInterface3,
32                        CreateDynamicBackendObjectInvalidInterface3TestImpl);
33 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendObjectInvalidInterface4,
34                        CreateDynamicBackendObjectInvalidInterface4TestImpl);
35 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendObjectInvalidInterface5,
36                        CreateDynamicBackendObjectInvalidInterface5TestImpl);
37 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendObjectInvalidInterface6,
38                        CreateDynamicBackendObjectInvalidInterface6TestImpl);
39 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendObjectInvalidInterface7,
40                        CreateDynamicBackendObjectInvalidInterface7TestImpl);
41 
42 ARMNN_SIMPLE_TEST_CASE(OpenNotSharedObjectFile, OpenNotSharedObjectTestImpl);
43 ARMNN_SIMPLE_TEST_CASE(GetSharedObjects, GetSharedObjectsTestImpl);
44 
45 ARMNN_SIMPLE_TEST_CASE(GetBackendPaths, GetBackendPathsTestImpl)
46 ARMNN_SIMPLE_TEST_CASE(GetBackendPathsOverride, GetBackendPathsOverrideTestImpl)
47 
48 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackends, CreateDynamicBackendsTestImpl);
49 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendsNoPaths, CreateDynamicBackendsNoPathsTestImpl);
50 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendsAllInvalid, CreateDynamicBackendsAllInvalidTestImpl);
51 ARMNN_SIMPLE_TEST_CASE(CreateDynamicBackendsMixedTypes, CreateDynamicBackendsMixedTypesTestImpl);
52 
53 ARMNN_SIMPLE_TEST_CASE(RegisterMultipleInvalidDynamicBackends, RegisterMultipleInvalidDynamicBackendsTestImpl);
54 
55 #if !defined(ARMNN_DYNAMIC_BACKEND_ENABLED)
56 ARMNN_SIMPLE_TEST_CASE(RuntimeEmpty, RuntimeEmptyTestImpl);
57 #endif
58 ARMNN_SIMPLE_TEST_CASE(RuntimeDynamicBackends, RuntimeDynamicBackendsTestImpl);
59 ARMNN_SIMPLE_TEST_CASE(RuntimeDuplicateDynamicBackends, RuntimeDuplicateDynamicBackendsTestImpl);
60 ARMNN_SIMPLE_TEST_CASE(RuntimeInvalidDynamicBackends, RuntimeInvalidDynamicBackendsTestImpl);
61 ARMNN_SIMPLE_TEST_CASE(RuntimeInvalidOverridePath, RuntimeInvalidOverridePathTestImpl);
62 
63 #if defined(ARMNNREF_ENABLED)
64 
65 // This test unit needs the reference backend, it's not available if the reference backend is not built
66 
67 ARMNN_SIMPLE_TEST_CASE(CreateReferenceDynamicBackend, CreateReferenceDynamicBackendTestImpl);
68 ARMNN_SIMPLE_TEST_CASE(CreateValidDynamicBackendObject, CreateValidDynamicBackendObjectTestImpl);
69 ARMNN_SIMPLE_TEST_CASE(RegisterSingleDynamicBackend, RegisterSingleDynamicBackendTestImpl);
70 ARMNN_SIMPLE_TEST_CASE(RegisterMultipleDynamicBackends, RegisterMultipleDynamicBackendsTestImpl);
71 ARMNN_SIMPLE_TEST_CASE(RegisterMixedDynamicBackends, RegisterMixedDynamicBackendsTestImpl);
72 
73 #endif
74 
75 #if defined(SAMPLE_DYNAMIC_BACKEND_ENABLED)
76 ARMNN_SIMPLE_TEST_CASE(CreateSampleDynamicBackend, CreateSampleDynamicBackendTestImpl);
77 ARMNN_SIMPLE_TEST_CASE(SampleDynamicBackendEndToEnd, SampleDynamicBackendEndToEndTestImpl);
78 #endif
79 
80 }
81