Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions test/shim_test/dev_info.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ xclbin_info xclbin_infos[] = {
.ip_name2idx = {
{ "DPU:dpu", {0xffffffff} },
},
.workspace = "local_shim_test_data/elf_vadd_npu3",
.workspace = "local_shim_test_data/npu3/vadd/",
.data = "",
.type = KERNEL_TYPE_TXN_FULL_ELF,
},
Expand All @@ -63,7 +63,7 @@ xclbin_info xclbin_infos[] = {
.ip_name2idx = {
{ "DPU:dpu", {0xffffffff} },
},
.workspace = "local_shim_test_data/elf_no_op_npu3",
.workspace = "local_shim_test_data/npu3/nop/",
.data = "",
.type = KERNEL_TYPE_TXN_FULL_ELF,
},
Expand All @@ -74,7 +74,7 @@ xclbin_info xclbin_infos[] = {
.ip_name2idx = {
{ "DPU:dpu", {0xffffffff} },
},
.workspace = "local_shim_test_data/elf_vadd_npu3",
.workspace = "local_shim_test_data/npu3a/vadd/",
.data = "",
.type = KERNEL_TYPE_TXN_FULL_ELF,
},
Expand All @@ -85,7 +85,7 @@ xclbin_info xclbin_infos[] = {
.ip_name2idx = {
{ "DPU:dpu", {0xffffffff} },
},
.workspace = "local_shim_test_data/elf_no_op_npu3",
.workspace = "local_shim_test_data/npu3a/nop/",
.data = "",
.type = KERNEL_TYPE_TXN_FULL_ELF,
},
Expand Down
13 changes: 12 additions & 1 deletion test/shim_test/shim_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ usage(const std::string& prog)
{
std::cout << "\nUsage: " << prog << " [options] [test case ID/name separated by spaces]\n";
std::cout << "Options:\n";
std::cout << "\t" << "-h" << ": print this help message\n";
std::cout << "\t" << "-h" << ": print this help message and available test cases\n";
std::cout << "\t" << "-k" << ": evaluate test result based on kernel version\n";
std::cout << "\t" << "-x <xclbin_path>" << ": run test cases with specified xclbin file\n";
std::cout << std::endl;
Expand Down Expand Up @@ -941,6 +941,16 @@ std::vector<test_case> test_list {
},
};

void
print_available_tests()
{
std::cout << "Available Test Cases:\n";
for (size_t i = 0; i < test_list.size(); i++) {
std::cout << " #" << i << " - " << test_list[i].name << "\n";
}
std::cout << std::endl;
}

// Test case executor implementation

bool
Expand Down Expand Up @@ -1100,6 +1110,7 @@ main(int argc, char **argv)
switch (option) {
case 'h':
usage(program);
print_available_tests();
return 0;
case 'x': {
std::ifstream xclbin(optarg);
Expand Down
Loading