Commit d6f66d17 authored by Robert Maynard's avatar Robert Maynard
Browse files

Testing run methods now take argc/argv to init logging/runtime device

`vtkm::cont::testing` now initializes with logging enabled and support
for device being passed on the command line, `vtkm::testing` only
enables logging.
parent cbf913ad
......@@ -47,7 +47,7 @@ void TestControlSignatures()
} // anonymous namespace
int UnitTestControlSignatureTag(int, char* [])
int UnitTestControlSignatureTag(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestControlSignatures);
return vtkm::cont::testing::Testing::Run(TestControlSignatures, argc, argv);
}
......@@ -89,7 +89,7 @@ void TestArrayInTransport()
} // Anonymous namespace
int UnitTestTransportArrayIn(int, char* [])
int UnitTestTransportArrayIn(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestArrayInTransport);
return vtkm::cont::testing::Testing::Run(TestArrayInTransport, argc, argv);
}
......@@ -97,7 +97,7 @@ void TestArrayInOutTransport()
} // anonymous namespace
int UnitTestTransportArrayInOut(int, char* [])
int UnitTestTransportArrayInOut(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestArrayInOutTransport);
return vtkm::cont::testing::Testing::Run(TestArrayInOutTransport, argc, argv);
}
......@@ -87,7 +87,7 @@ void TestArrayOutTransport()
} // Anonymous namespace
int UnitTestTransportArrayOut(int, char* [])
int UnitTestTransportArrayOut(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestArrayOutTransport);
return vtkm::cont::testing::Testing::Run(TestArrayOutTransport, argc, argv);
}
......@@ -96,7 +96,7 @@ void UnitTestCellSetIn()
} // Anonymous namespace
int UnitTestTransportCellSetIn(int, char* [])
int UnitTestTransportCellSetIn(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(UnitTestCellSetIn);
return vtkm::cont::testing::Testing::Run(UnitTestCellSetIn, argc, argv);
}
......@@ -112,7 +112,7 @@ void TestExecObjectTransport()
} // Anonymous namespace
int UnitTestTransportExecObject(int, char* [])
int UnitTestTransportExecObject(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestExecObjectTransport);
return vtkm::cont::testing::Testing::Run(TestExecObjectTransport, argc, argv);
}
......@@ -207,7 +207,7 @@ void TestWholeArrayTransport()
} // Anonymous namespace
int UnitTestTransportWholeArray(int, char* [])
int UnitTestTransportWholeArray(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestWholeArrayTransport);
return vtkm::cont::testing::Testing::Run(TestWholeArrayTransport, argc, argv);
}
......@@ -87,7 +87,7 @@ void TestCheckArray()
} // anonymous namespace
int UnitTestTypeCheckArray(int, char* [])
int UnitTestTypeCheckArray(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestCheckArray);
return vtkm::cont::testing::Testing::Run(TestCheckArray, argc, argv);
}
......@@ -59,7 +59,7 @@ void TestCheckCellSet()
} // anonymous namespace
int UnitTestTypeCheckCellSet(int, char* [])
int UnitTestTypeCheckCellSet(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestCheckCellSet);
return vtkm::cont::testing::Testing::Run(TestCheckCellSet, argc, argv);
}
......@@ -55,7 +55,7 @@ void TestCheckExecObject()
} // anonymous namespace
int UnitTestTypeCheckExecObject(int, char* [])
int UnitTestTypeCheckExecObject(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestCheckExecObject);
return vtkm::cont::testing::Testing::Run(TestCheckExecObject, argc, argv);
}
......@@ -55,7 +55,7 @@ void TestCheckKeys()
} // anonymous namespace
int UnitTestTypeCheckKeys(int, char* [])
int UnitTestTypeCheckKeys(int argc, char* argv[])
{
return vtkm::cont::testing::Testing::Run(TestCheckKeys);
return vtkm::cont::testing::Testing::Run(TestCheckKeys, argc, argv);
}
......@@ -26,9 +26,10 @@
#include <vtkm/cont/cuda/DeviceAdapterCuda.h>
#include <vtkm/cont/testing/TestingArrayHandles.h>
int UnitTestCudaArrayHandle(int, char* [])
int UnitTestCudaArrayHandle(int argc, char* argv[])
{
auto tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker();
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
return vtkm::cont::testing::TestingArrayHandles<vtkm::cont::DeviceAdapterTagCuda>::Run();
return vtkm::cont::testing::TestingArrayHandles<vtkm::cont::DeviceAdapterTagCuda>::Run(argc,
argv);
}
......@@ -28,11 +28,11 @@
#include <vtkm/cont/cuda/internal/testing/Testing.h>
#include <vtkm/cont/testing/TestingFancyArrayHandles.h>
int UnitTestCudaArrayHandleFancy(int, char* [])
int UnitTestCudaArrayHandleFancy(int argc, char* argv[])
{
auto tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker();
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
int result =
vtkm::cont::testing::TestingFancyArrayHandles<vtkm::cont::DeviceAdapterTagCuda>::Run();
int result = vtkm::cont::testing::TestingFancyArrayHandles<vtkm::cont::DeviceAdapterTagCuda>::Run(
argc, argv);
return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result);
}
......@@ -26,10 +26,10 @@
#include <vtkm/cont/cuda/DeviceAdapterCuda.h>
#include <vtkm/cont/testing/TestingArrayHandleVirtualCoordinates.h>
int UnitTestCudaArrayHandleVirtualCoordinates(int, char* [])
int UnitTestCudaArrayHandleVirtualCoordinates(int argc, char* argv[])
{
auto tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker();
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
return vtkm::cont::testing::TestingArrayHandleVirtualCoordinates<
vtkm::cont::DeviceAdapterTagCuda>::Run();
vtkm::cont::DeviceAdapterTagCuda>::Run(argc, argv);
}
......@@ -25,10 +25,10 @@
#include <vtkm/cont/testing/TestingCellLocatorRectilinearGrid.h>
int UnitTestCudaCellLocatorRectilinearGrid(int, char* [])
int UnitTestCudaCellLocatorRectilinearGrid(int argc, char* argv[])
{
auto tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker();
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
return vtkm::cont::testing::Testing::Run(
TestingCellLocatorRectilinearGrid<vtkm::cont::DeviceAdapterTagCuda>());
TestingCellLocatorRectilinearGrid<vtkm::cont::DeviceAdapterTagCuda>(), argc, argv);
}
......@@ -25,10 +25,10 @@
#include <vtkm/cont/testing/TestingCellLocatorTwoLevelUniformGrid.h>
int UnitTestCudaCellLocatorTwoLevelUniformGrid(int, char* [])
int UnitTestCudaCellLocatorTwoLevelUniformGrid(int argc, char* argv[])
{
auto tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker();
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
return vtkm::cont::testing::Testing::Run(
TestingCellLocatorTwoLevelUniformGrid<vtkm::cont::DeviceAdapterTagCuda>);
TestingCellLocatorTwoLevelUniformGrid<vtkm::cont::DeviceAdapterTagCuda>, argc, argv);
}
......@@ -25,10 +25,10 @@
#include <vtkm/cont/testing/TestingCellLocatorUniformGrid.h>
int UnitTestCudaCellLocatorUniformGrid(int, char* [])
int UnitTestCudaCellLocatorUniformGrid(int argc, char* argv[])
{
auto tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker();
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
return vtkm::cont::testing::Testing::Run(
TestingCellLocatorUniformGrid<vtkm::cont::DeviceAdapterTagCuda>());
TestingCellLocatorUniformGrid<vtkm::cont::DeviceAdapterTagCuda>(), argc, argv);
}
......@@ -27,9 +27,9 @@
#include <vtkm/cont/testing/TestingColorTable.h>
int UnitTestCudaColorTable(int, char* [])
int UnitTestCudaColorTable(int argc, char* argv[])
{
auto tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker();
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
return vtkm::cont::testing::TestingColorTable<vtkm::cont::DeviceAdapterTagCuda>::Run();
return vtkm::cont::testing::TestingColorTable<vtkm::cont::DeviceAdapterTagCuda>::Run(argc, argv);
}
......@@ -28,10 +28,11 @@
#include <vtkm/cont/cuda/internal/testing/Testing.h>
#include <vtkm/cont/testing/TestingComputeRange.h>
int UnitTestCudaComputeRange(int, char* [])
int UnitTestCudaComputeRange(int argc, char* argv[])
{
auto tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker();
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
int result = vtkm::cont::testing::TestingComputeRange<vtkm::cont::DeviceAdapterTagCuda>::Run();
int result =
vtkm::cont::testing::TestingComputeRange<vtkm::cont::DeviceAdapterTagCuda>::Run(argc, argv);
return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result);
}
......@@ -27,10 +27,11 @@
#include <vtkm/cont/cuda/internal/testing/Testing.h>
#include <vtkm/cont/testing/TestingDataSetExplicit.h>
int UnitTestCudaDataSetExplicit(int, char* [])
int UnitTestCudaDataSetExplicit(int argc, char* argv[])
{
auto tracker = vtkm::cont::GetGlobalRuntimeDeviceTracker();
tracker.ForceDevice(vtkm::cont::DeviceAdapterTagCuda{});
int result = vtkm::cont::testing::TestingDataSetExplicit<vtkm::cont::DeviceAdapterTagCuda>::Run();
int result =
vtkm::cont::testing::TestingDataSetExplicit<vtkm::cont::DeviceAdapterTagCuda>::Run(argc, argv);
return vtkm::cont::cuda::internal::Testing::CheckCudaBeforeExit(result);
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment