diff options
author | Jeremy Johnson <jeremy.johnson@arm.com> | 2023-11-27 15:02:04 +0000 |
---|---|---|
committer | Eric Kunze <eric.kunze@arm.com> | 2023-12-04 21:09:12 +0000 |
commit | 39f343498425dd4a0aa0937692a8e630b535e06b (patch) | |
tree | 97a7a7b4575a00537a03cf71ab08681f19acd8ab /reference_model | |
parent | 534923df858de76c6e0b0a2689cc23917e873548 (diff) | |
download | reference_model-39f343498425dd4a0aa0937692a8e630b535e06b.tar.gz |
Path fixes for ref model and libraries
Support relative desc.json paths in refmodel of just "desc.json".
Catch when generate and verify library paths are None and provide
help in tosa_verif_check_result.
Signed-off-by: Jeremy Johnson <jeremy.johnson@arm.com>
Change-Id: Ie52ac399ea002e5fcdcc1eec3d9df6153a778e88
Diffstat (limited to 'reference_model')
-rw-r--r-- | reference_model/src/main.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/reference_model/src/main.cpp b/reference_model/src/main.cpp index 24784b5..8539a0b 100644 --- a/reference_model/src/main.cpp +++ b/reference_model/src/main.cpp @@ -625,7 +625,16 @@ int initTestDesc(json& test_desc) // Overwrite flatbuffer_dir/output_dir with dirname(g_func_config.test_desc) if it's not specified. if (g_func_config.flatbuffer_dir.empty() || g_func_config.output_dir.empty()) { - std::string test_dir = g_func_config.test_desc.substr(0, g_func_config.test_desc.find_last_of("/\\")); + auto slash_pos = g_func_config.test_desc.find_last_of("/\\"); + std::string test_dir; + if (slash_pos != std::string::npos) + { + test_dir = g_func_config.test_desc.substr(0, slash_pos); + } + else + { + test_dir = std::string("."); + } if (g_func_config.flatbuffer_dir.empty()) { g_func_config.flatbuffer_dir = test_dir; |