Merge pull request #3611 from AlvinMooreSr/testharness_version

Version Support For Testharness
This commit is contained in:
Alvin Moore 2020-08-07 15:39:35 -04:00 committed by GitHub
commit 4aab5735f2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 2 deletions

View File

@ -1,5 +1,5 @@
set(SRCS
Program.cs
${CMAKE_CURRENT_BINARY_DIR}/Program.cs
Properties/AssemblyInfo.cs)
set(TEST_HARNESS_REFERENCES
@ -7,6 +7,8 @@ set(TEST_HARNESS_REFERENCES
set(out_file ${CMAKE_BINARY_DIR}/packages/bin/TestHarness.exe)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Program.cs.cmake ${CMAKE_CURRENT_BINARY_DIR}/Program.cs)
add_custom_command(OUTPUT ${out_file}
COMMAND ${MCS_EXECUTABLE} ARGS ${TEST_HARNESS_REFERENCES} ${SRCS} "-target:exe" "-out:${out_file}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}

View File

@ -153,6 +153,10 @@ namespace SummarizeTest
throw;
}
}
else if (args[0] == "version")
{
return VersionInfo();
}
return UsageMessage();
}
@ -1495,6 +1499,16 @@ namespace SummarizeTest
}
}
private static int VersionInfo()
{
Console.WriteLine("Version: 1.02");
Console.WriteLine("FDB Project Ver: " + "${CMAKE_PROJECT_VERSION}");
Console.WriteLine("FDB Version: " + "${CMAKE_PROJECT_VERSION_MAJOR}" + "." + "${CMAKE_PROJECT_VERSION_MINOR}");
Console.WriteLine("Source Version: " + "${CURRENT_GIT_VERSION}");
return 1;
}
private static int UsageMessage()
{
Console.WriteLine("Usage:");
@ -1505,7 +1519,7 @@ namespace SummarizeTest
Console.WriteLine(" TestHarness remote [queue folder] [root foundation folder] [duration in hours] [amount of tests] [all/fast/<test_path>] [scope]");
Console.WriteLine(" TestHarness extract-errors [summary-file] [error-summary-file]");
Console.WriteLine(" TestHarness joshua-run <useValgrind> <maxTries>");
Console.WriteLine("Version: 1.01");
VersionInfo();
return 1;
}
}