summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorCraig Scott <craig.scott@crascit.com>2019-11-05 06:27:58 (GMT)
committerBrad King <brad.king@kitware.com>2019-11-05 17:08:35 (GMT)
commitc544cb66984f16cc63ebace16ccd911adc550b9d (patch)
tree013f0d741970ec4efe01e0e22c6ed42dcab050b9 /Tests
parent6ce27d3a2efad4e40d4354a7d17e4259fb4c1e24 (diff)
downloadCMake-c544cb66984f16cc63ebace16ccd911adc550b9d.zip
CMake-c544cb66984f16cc63ebace16ccd911adc550b9d.tar.gz
CMake-c544cb66984f16cc63ebace16ccd911adc550b9d.tar.bz2
CTest: Rename hardware -> resources for source code
Diffstat (limited to 'Tests')
-rw-r--r--Tests/CMakeLib/CMakeLists.txt6
-rw-r--r--Tests/CMakeLib/testCTestBinPacker.cxx18
-rw-r--r--Tests/CMakeLib/testCTestResourceAllocator.cxx (renamed from Tests/CMakeLib/testCTestHardwareAllocator.cxx)66
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec.cxx (renamed from Tests/CMakeLib/testCTestHardwareSpec.cxx)16
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec1.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec1.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec10.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec10.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec11.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec11.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec12.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec12.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec13.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec13.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec14.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec14.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec15.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec15.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec16.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec16.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec17.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec17.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec18.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec18.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec2.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec2.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec3.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec3.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec4.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec4.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec5.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec5.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec6.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec6.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec7.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec7.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec8.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec8.json)0
-rw-r--r--Tests/CMakeLib/testCTestResourceSpec_data/spec9.json (renamed from Tests/CMakeLib/testCTestHardwareSpec_data/spec9.json)0
-rw-r--r--Tests/RunCMake/CTestHardwareAllocation/cthwalloc.cxx34
23 files changed, 70 insertions, 70 deletions
diff --git a/Tests/CMakeLib/CMakeLists.txt b/Tests/CMakeLib/CMakeLists.txt
index 8e11fdf..840afc1 100644
--- a/Tests/CMakeLib/CMakeLists.txt
+++ b/Tests/CMakeLib/CMakeLists.txt
@@ -8,8 +8,8 @@ include_directories(
set(CMakeLib_TESTS
testArgumentParser.cxx
testCTestBinPacker.cxx
- testCTestHardwareAllocator.cxx
- testCTestHardwareSpec.cxx
+ testCTestResourceAllocator.cxx
+ testCTestResourceSpec.cxx
testCTestResourceGroups.cxx
testGeneratedFileStream.cxx
testRST.cxx
@@ -32,7 +32,7 @@ add_executable(testUVProcessChainHelper testUVProcessChainHelper.cxx)
set(testRST_ARGS ${CMAKE_CURRENT_SOURCE_DIR})
set(testUVProcessChain_ARGS $<TARGET_FILE:testUVProcessChainHelper>)
set(testUVStreambuf_ARGS $<TARGET_FILE:cmake>)
-set(testCTestHardwareSpec_ARGS ${CMAKE_CURRENT_SOURCE_DIR})
+set(testCTestResourceSpec_ARGS ${CMAKE_CURRENT_SOURCE_DIR})
if(WIN32)
list(APPEND CMakeLib_TESTS
diff --git a/Tests/CMakeLib/testCTestBinPacker.cxx b/Tests/CMakeLib/testCTestBinPacker.cxx
index 62ea55b..6f09af2 100644
--- a/Tests/CMakeLib/testCTestBinPacker.cxx
+++ b/Tests/CMakeLib/testCTestBinPacker.cxx
@@ -5,12 +5,12 @@
#include <vector>
#include "cmCTestBinPacker.h"
-#include "cmCTestHardwareAllocator.h"
+#include "cmCTestResourceAllocator.h"
struct ExpectedPackResult
{
std::vector<int> SlotsNeeded;
- std::map<std::string, cmCTestHardwareAllocator::Resource> Hardware;
+ std::map<std::string, cmCTestResourceAllocator::Resource> Resources;
bool ExpectedReturnValue;
std::vector<cmCTestBinPackerAllocation> ExpectedRoundRobinAllocations;
std::vector<cmCTestBinPackerAllocation> ExpectedBlockAllocations;
@@ -233,18 +233,18 @@ bool TestExpectedPackResult(const ExpectedPackResult& expected)
roundRobinAllocations.push_back({ index++, n, "" });
}
- bool roundRobinResult = cmAllocateCTestHardwareRoundRobin(
- expected.Hardware, roundRobinAllocations);
+ bool roundRobinResult = cmAllocateCTestResourcesRoundRobin(
+ expected.Resources, roundRobinAllocations);
if (roundRobinResult != expected.ExpectedReturnValue) {
std::cout
- << "cmAllocateCTestHardwareRoundRobin did not return expected value"
+ << "cmAllocateCTestResourcesRoundRobin did not return expected value"
<< std::endl;
return false;
}
if (roundRobinResult &&
roundRobinAllocations != expected.ExpectedRoundRobinAllocations) {
- std::cout << "cmAllocateCTestHardwareRoundRobin did not return expected "
+ std::cout << "cmAllocateCTestResourcesRoundRobin did not return expected "
"allocations"
<< std::endl;
return false;
@@ -258,15 +258,15 @@ bool TestExpectedPackResult(const ExpectedPackResult& expected)
}
bool blockResult =
- cmAllocateCTestHardwareBlock(expected.Hardware, blockAllocations);
+ cmAllocateCTestResourcesBlock(expected.Resources, blockAllocations);
if (blockResult != expected.ExpectedReturnValue) {
- std::cout << "cmAllocateCTestHardwareBlock did not return expected value"
+ std::cout << "cmAllocateCTestResourcesBlock did not return expected value"
<< std::endl;
return false;
}
if (blockResult && blockAllocations != expected.ExpectedBlockAllocations) {
- std::cout << "cmAllocateCTestHardwareBlock did not return expected"
+ std::cout << "cmAllocateCTestResourcesBlock did not return expected"
" allocations"
<< std::endl;
return false;
diff --git a/Tests/CMakeLib/testCTestHardwareAllocator.cxx b/Tests/CMakeLib/testCTestResourceAllocator.cxx
index 6f05d03..33d6b91 100644
--- a/Tests/CMakeLib/testCTestHardwareAllocator.cxx
+++ b/Tests/CMakeLib/testCTestResourceAllocator.cxx
@@ -3,24 +3,24 @@
#include <string>
#include <vector>
-#include "cmCTestHardwareAllocator.h"
-#include "cmCTestHardwareSpec.h"
+#include "cmCTestResourceAllocator.h"
+#include "cmCTestResourceSpec.h"
-static const cmCTestHardwareSpec spec{ { {
+static const cmCTestResourceSpec spec{ { {
/* clang-format off */
{ "gpus", { { "0", 4 }, { "1", 8 }, { "2", 0 }, { "3", 8 } } },
/* clang-format on */
} } };
-bool testInitializeFromHardwareSpec()
+bool testInitializeFromResourceSpec()
{
bool retval = true;
- cmCTestHardwareAllocator allocator;
- allocator.InitializeFromHardwareSpec(spec);
+ cmCTestResourceAllocator allocator;
+ allocator.InitializeFromResourceSpec(spec);
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected{
/* clang-format off */
{ "gpus", {
@@ -43,11 +43,11 @@ bool testAllocateResource()
{
bool retval = true;
- cmCTestHardwareAllocator allocator;
- allocator.InitializeFromHardwareSpec(spec);
+ cmCTestResourceAllocator allocator;
+ allocator.InitializeFromResourceSpec(spec);
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected1{
/* clang-format off */
{ "gpus", {
@@ -70,7 +70,7 @@ bool testAllocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected2{
/* clang-format off */
{ "gpus", {
@@ -93,7 +93,7 @@ bool testAllocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected3{
/* clang-format off */
{ "gpus", {
@@ -116,7 +116,7 @@ bool testAllocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected4{
/* clang-format off */
{ "gpus", {
@@ -145,7 +145,7 @@ bool testAllocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected5{
/* clang-format off */
{ "gpus", {
@@ -168,7 +168,7 @@ bool testAllocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected6{
/* clang-format off */
{ "gpus", {
@@ -191,7 +191,7 @@ bool testAllocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected7{
/* clang-format off */
{ "gpus", {
@@ -220,11 +220,11 @@ bool testDeallocateResource()
{
bool retval = true;
- cmCTestHardwareAllocator allocator;
- allocator.InitializeFromHardwareSpec(spec);
+ cmCTestResourceAllocator allocator;
+ allocator.InitializeFromResourceSpec(spec);
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected1{
/* clang-format off */
{ "gpus", {
@@ -253,7 +253,7 @@ bool testDeallocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected2{
/* clang-format off */
{ "gpus", {
@@ -276,7 +276,7 @@ bool testDeallocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected3{
/* clang-format off */
{ "gpus", {
@@ -299,7 +299,7 @@ bool testDeallocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected4{
/* clang-format off */
{ "gpus", {
@@ -322,7 +322,7 @@ bool testDeallocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected5{
/* clang-format off */
{ "gpus", {
@@ -345,7 +345,7 @@ bool testDeallocateResource()
}
static const std::map<
- std::string, std::map<std::string, cmCTestHardwareAllocator::Resource>>
+ std::string, std::map<std::string, cmCTestResourceAllocator::Resource>>
expected6{
/* clang-format off */
{ "gpus", {
@@ -374,23 +374,23 @@ bool testResourceFree()
{
bool retval = true;
- const cmCTestHardwareAllocator::Resource r1{ 5, 0 };
+ const cmCTestResourceAllocator::Resource r1{ 5, 0 };
if (r1.Free() != 5) {
- std::cout << "cmCTestHardwareAllocator::Resource::Free() did not return "
+ std::cout << "cmCTestResourceAllocator::Resource::Free() did not return "
"expected value for { 5, 0 }\n";
retval = false;
}
- const cmCTestHardwareAllocator::Resource r2{ 3, 2 };
+ const cmCTestResourceAllocator::Resource r2{ 3, 2 };
if (r2.Free() != 1) {
- std::cout << "cmCTestHardwareAllocator::Resource::Free() did not return "
+ std::cout << "cmCTestResourceAllocator::Resource::Free() did not return "
"expected value for { 3, 2 }\n";
retval = false;
}
- const cmCTestHardwareAllocator::Resource r3{ 4, 4 };
+ const cmCTestResourceAllocator::Resource r3{ 4, 4 };
if (r3.Free() != 0) {
- std::cout << "cmCTestHardwareAllocator::Resource::Free() did not return "
+ std::cout << "cmCTestResourceAllocator::Resource::Free() did not return "
"expected value for { 4, 4 }\n";
retval = false;
}
@@ -398,12 +398,12 @@ bool testResourceFree()
return retval;
}
-int testCTestHardwareAllocator(int, char** const)
+int testCTestResourceAllocator(int, char** const)
{
int retval = 0;
- if (!testInitializeFromHardwareSpec()) {
- std::cout << "in testInitializeFromHardwareSpec()\n";
+ if (!testInitializeFromResourceSpec()) {
+ std::cout << "in testInitializeFromResourceSpec()\n";
retval = -1;
}
diff --git a/Tests/CMakeLib/testCTestHardwareSpec.cxx b/Tests/CMakeLib/testCTestResourceSpec.cxx
index 3e3eccc..e4bc770 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec.cxx
+++ b/Tests/CMakeLib/testCTestResourceSpec.cxx
@@ -2,16 +2,16 @@
#include <string>
#include <vector>
-#include "cmCTestHardwareSpec.h"
+#include "cmCTestResourceSpec.h"
struct ExpectedSpec
{
std::string Path;
bool ParseResult;
- cmCTestHardwareSpec Expected;
+ cmCTestResourceSpec Expected;
};
-static const std::vector<ExpectedSpec> expectedHardwareSpecs = {
+static const std::vector<ExpectedSpec> expectedResourceSpecs = {
/* clang-format off */
{"spec1.json", true, {{{
{"gpus", {
@@ -44,9 +44,9 @@ static const std::vector<ExpectedSpec> expectedHardwareSpecs = {
};
static bool testSpec(const std::string& path, bool expectedResult,
- const cmCTestHardwareSpec& expected)
+ const cmCTestResourceSpec& expected)
{
- cmCTestHardwareSpec actual;
+ cmCTestResourceSpec actual;
bool result = actual.ReadFromJSONFile(path);
if (result != expectedResult) {
std::cout << "ReadFromJSONFile(\"" << path << "\") returned " << result
@@ -63,7 +63,7 @@ static bool testSpec(const std::string& path, bool expectedResult,
return true;
}
-int testCTestHardwareSpec(int argc, char** const argv)
+int testCTestResourceSpec(int argc, char** const argv)
{
if (argc < 2) {
std::cout << "Invalid arguments.\n";
@@ -71,9 +71,9 @@ int testCTestHardwareSpec(int argc, char** const argv)
}
int retval = 0;
- for (auto const& spec : expectedHardwareSpecs) {
+ for (auto const& spec : expectedResourceSpecs) {
std::string path = argv[1];
- path += "/testCTestHardwareSpec_data/";
+ path += "/testCTestResourceSpec_data/";
path += spec.Path;
if (!testSpec(path, spec.ParseResult, spec.Expected)) {
retval = -1;
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec1.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec1.json
index ee3d0ce..ee3d0ce 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec1.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec1.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec10.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec10.json
index 22105d7..22105d7 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec10.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec10.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec11.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec11.json
index 1e37ef5..1e37ef5 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec11.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec11.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec12.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec12.json
index fe51488..fe51488 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec12.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec12.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec13.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec13.json
index 6b7a9f4..6b7a9f4 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec13.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec13.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec14.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec14.json
index ce708c7..ce708c7 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec14.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec14.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec15.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec15.json
index 78b6990..78b6990 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec15.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec15.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec16.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec16.json
index 95c7d26..95c7d26 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec16.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec16.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec17.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec17.json
index 1b6ab4b..1b6ab4b 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec17.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec17.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec18.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec18.json
index 1a17df7..1a17df7 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec18.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec18.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec2.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec2.json
index 6175b1a..6175b1a 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec2.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec2.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec3.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec3.json
index 82453ec..82453ec 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec3.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec3.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec4.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec4.json
index 05e73d7..05e73d7 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec4.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec4.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec5.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec5.json
index 2c63c08..2c63c08 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec5.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec5.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec6.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec6.json
index 93c790d..93c790d 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec6.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec6.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec7.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec7.json
index 28b6a4f..28b6a4f 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec7.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec7.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec8.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec8.json
index 79bd224..79bd224 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec8.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec8.json
diff --git a/Tests/CMakeLib/testCTestHardwareSpec_data/spec9.json b/Tests/CMakeLib/testCTestResourceSpec_data/spec9.json
index 6bb1def..6bb1def 100644
--- a/Tests/CMakeLib/testCTestHardwareSpec_data/spec9.json
+++ b/Tests/CMakeLib/testCTestResourceSpec_data/spec9.json
diff --git a/Tests/RunCMake/CTestHardwareAllocation/cthwalloc.cxx b/Tests/RunCMake/CTestHardwareAllocation/cthwalloc.cxx
index 1a61e6f..27644af 100644
--- a/Tests/RunCMake/CTestHardwareAllocation/cthwalloc.cxx
+++ b/Tests/RunCMake/CTestHardwareAllocation/cthwalloc.cxx
@@ -13,9 +13,9 @@
#include "cmsys/Encoding.hxx"
#include "cmsys/FStream.hxx"
-#include "cmCTestHardwareAllocator.h"
-#include "cmCTestHardwareSpec.h"
#include "cmCTestMultiProcessHandler.h"
+#include "cmCTestResourceAllocator.h"
+#include "cmCTestResourceSpec.h"
#include "cmCTestTestHandler.h"
#include "cmFileLock.h"
#include "cmFileLockResult.h"
@@ -23,7 +23,7 @@
#include "cmSystemTools.h"
/*
- * This helper program is used to verify that the CTest hardware allocation
+ * This helper program is used to verify that the CTest resource allocation
* feature is working correctly. It consists of two stages:
*
* 1) write - This stage receives the RESOURCE_GROUPS property of the test and
@@ -31,7 +31,7 @@
* environment variables. If it received all of the resources it expected,
* then it writes this information to a log file, which will be read in
* the verify stage.
- * 2) verify - This stage compares the log file with the hardware spec file to
+ * 2) verify - This stage compares the log file with the resource spec file to
* make sure that no resources were over-subscribed, deallocated without
* being allocated, or allocated without being deallocated.
*/
@@ -68,8 +68,8 @@ static int doWrite(int argc, char const* const* argv)
std::string testName = argv[3];
unsigned int sleepTime = std::atoi(argv[4]);
std::vector<std::map<
- std::string, std::vector<cmCTestMultiProcessHandler::HardwareAllocation>>>
- hardware;
+ std::string, std::vector<cmCTestMultiProcessHandler::ResourceAllocation>>>
+ resources;
if (argc == 6) {
// Parse RESOURCE_GROUPS property
std::string resourceGroupsProperty = argv[5];
@@ -146,8 +146,8 @@ static int doWrite(int argc, char const* const* argv)
// Verify that we got what we asked for and write it to the log
prefix += '_';
std::map<std::string,
- std::vector<cmCTestMultiProcessHandler::HardwareAllocation>>
- hwEntry;
+ std::vector<cmCTestMultiProcessHandler::ResourceAllocation>>
+ resEntry;
for (auto const& type : actualResources) {
auto it = resourceGroup.begin();
@@ -194,7 +194,7 @@ static int doWrite(int argc, char const* const* argv)
fout << "alloc " << type << " " << id << " " << amount
<< std::endl;
- hwEntry[type].push_back({ id, amount });
+ resEntry[type].push_back({ id, amount });
}
bool ended = false;
@@ -212,7 +212,7 @@ static int doWrite(int argc, char const* const* argv)
return 1;
}
}
- hardware.push_back(hwEntry);
+ resources.push_back(resEntry);
++i;
} catch (...) {
@@ -249,7 +249,7 @@ static int doWrite(int argc, char const* const* argv)
return 1;
}
cmsys::ofstream fout(logFile.c_str(), std::ios::app);
- for (auto const& group : hardware) {
+ for (auto const& group : resources) {
for (auto const& it : group) {
for (auto const& it2 : it.second) {
fout << "dealloc " << it.first << " " << it2.Id << " " << it2.Slots
@@ -276,7 +276,7 @@ static int doVerify(int argc, char const* const* argv)
return usageVerify(argv[0]);
}
std::string logFile = argv[2];
- std::string hwFile = argv[3];
+ std::string resFile = argv[3];
std::string testNames;
if (argc == 5) {
testNames = argv[4];
@@ -284,14 +284,14 @@ static int doVerify(int argc, char const* const* argv)
auto testNameList = cmExpandedList(testNames, false);
std::set<std::string> testNameSet(testNameList.begin(), testNameList.end());
- cmCTestHardwareSpec spec;
- if (!spec.ReadFromJSONFile(hwFile)) {
- std::cout << "Could not read resource spec " << hwFile << std::endl;
+ cmCTestResourceSpec spec;
+ if (!spec.ReadFromJSONFile(resFile)) {
+ std::cout << "Could not read resource spec " << resFile << std::endl;
return 1;
}
- cmCTestHardwareAllocator allocator;
- allocator.InitializeFromHardwareSpec(spec);
+ cmCTestResourceAllocator allocator;
+ allocator.InitializeFromResourceSpec(spec);
cmsys::ifstream fin(logFile.c_str(), std::ios::in);
if (!fin) {