From 8208fe8a0e529415b3fc33f6557ef9b179f2c709 Mon Sep 17 00:00:00 2001 From: Geza Lore Date: Thu, 23 Apr 2020 22:29:37 +0100 Subject: [PATCH] Fix test failures on Ubuntu 20.04 (#2278) - Packaged SystemC lives in /usr so needed to update regex in test driver - Clang 10 complains about mixed named and positional initializers in struct definitions. --- test_regress/driver.pl | 2 +- test_regress/t/t_vpi_get.cpp | 2 +- test_regress/t/t_vpi_memory.cpp | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test_regress/driver.pl b/test_regress/driver.pl index 0010e3971..c5878a27e 100755 --- a/test_regress/driver.pl +++ b/test_regress/driver.pl @@ -2015,7 +2015,7 @@ sub files_identical { && !/^- [a-z.0-9]+:\d+:[^\n]+\n/ && !/^-node:/ && !/^dot [^\n]+\n/ - && !/^In file: \/.*\/systemc-\d\.\d\.\d\/.*:\d+/ + && !/^In file: .*\/sc_.*:\d+/ } @l1; @l1 = map { s/(Internal Error: [^\n]+\.cpp):[0-9]+:/$1:#:/; diff --git a/test_regress/t/t_vpi_get.cpp b/test_regress/t/t_vpi_get.cpp index 3f66a7f10..0dd2e7541 100644 --- a/test_regress/t/t_vpi_get.cpp +++ b/test_regress/t/t_vpi_get.cpp @@ -82,7 +82,7 @@ unsigned int main_time = 0; #define CHECK_RESULT_CSTR_STRIP(got, exp) CHECK_RESULT_CSTR(got + strspn(got, " "), exp) static int _mon_check_props(TestVpiHandle& handle, int size, int direction, int scalar, int type) { - s_vpi_value value = {vpiIntVal, .value = {.integer = 0}}; + s_vpi_value value = {.format = vpiIntVal, .value = {.integer = 0}}; // check size of object int vpisize = vpi_get(vpiSize, handle); CHECK_RESULT(vpisize, size); diff --git a/test_regress/t/t_vpi_memory.cpp b/test_regress/t/t_vpi_memory.cpp index 74ace580f..5b229b78b 100644 --- a/test_regress/t/t_vpi_memory.cpp +++ b/test_regress/t/t_vpi_memory.cpp @@ -83,7 +83,7 @@ unsigned int main_time = 0; int _mon_check_range(TestVpiHandle& handle, int size, int left, int right) { TestVpiHandle iter_h, left_h, right_h; - s_vpi_value value = {vpiIntVal, .value = {.integer = 0}}; + s_vpi_value value = {.format = vpiIntVal, .value = {.integer = 0}}; // check size of object int vpisize = vpi_get(vpiSize, handle); CHECK_RESULT(vpisize, size); @@ -112,7 +112,7 @@ int _mon_check_memory() { int cnt; TestVpiHandle mem_h, lcl_h; vpiHandle iter_h; // Icarus does not like auto free of iterator handles - s_vpi_value value = {vpiIntVal, .value = {.integer = 0}}; + s_vpi_value value = {.format = vpiIntVal, .value = {.integer = 0}}; vpi_printf((PLI_BYTE8*)"Check memory vpi ...\n"); mem_h = vpi_handle_by_name((PLI_BYTE8*)TestSimulator::rooted("mem0"), NULL); CHECK_RESULT_NZ(mem_h);