30 using namespace shamsys::instance;
32 auto get_type_name = [](
TestType t) -> std::string {
34 case Benchmark :
return "Benchmark";
35 case LongBenchmark :
return "LongBenchmark";
36 case ValidationTest :
return "ValidationTest";
37 case LongValidationTest:
return "LongValidationTest";
38 case Unittest :
return "Unittest";
42 auto get_str = [&]() -> std::string {
45 + get_type_name(type) + "\",\n" + R
"( "name" : ")" + name + "\",\n"
46 + R
"( "compute_queue" : ")"
47 + get_compute_queue().get_device().get_info<sycl::info::device::name>() + "\",\n"
48 + R
"( "alt_queue" : ")"
49 + get_alt_queue().get_device().get_info<sycl::info::device::name>() + "\",\n"
50 + R
"( "world_rank" : )" + std::to_string(world_rank) + ",\n"
52 + ",\n" + R
"( "test_data" : )"
61 shamlog_debug_mpi_ln(
"TEST",
"serialize :",
name);
63 shambase::stream_write(stream,
type);
65 shambase::stream_write_string(stream,
name);
72 shambase::stream_write_string(stream,
tex_output);
81 shambase::stream_read(reader,
type);
83 shambase::stream_read_string(reader,
name);
84 shamlog_debug_mpi_ln(
"TEST",
"deserialize :",
name);
91 shambase::stream_read_string(reader,
tex_output);
Header file describing a Node Instance.
header describing return type of a test, and the type of the test
TestType
Describe the type of the performed test.
std::uint32_t u32
32 bit unsigned integer
std::string increase_indent(std::string in, std::string delim="\n ")
Increase indentation of a string.
implementation details of the test library
Class to hold the list of assertion related to a test.
static TestAssertList deserialize(std::basic_stringstream< byte > &reader)
DeSerialize the assertion from binary format.
void serialize(std::basic_stringstream< byte > &stream)
Serialize the assertion in binary format.
std::string serialize_json()
Serialize the assertion in JSON.
List of data generated by a test.
std::string serialize_json()
Serialize the assertion in JSON.
void serialize(std::basic_stringstream< byte > &stream)
Serialize the assertion in binary format.
static TestDataList deserialize(std::basic_stringstream< byte > &reader)
DeSerialize the assertion from binary format.
static TestResult deserialize(std::basic_stringstream< byte > &reader)
DeSerialize the assertion from binary format.
std::string serialize_json()
Serialize the assertion in JSON.
void serialize(std::basic_stringstream< byte > &stream)
Serialize the assertion in binary format.