[PATCH v2 0/3] restore cfgfile library tests

Stephen Hemminger stephen at networkplumber.org
Wed Jul 31 06:20:28 CEST 2024


The cfgfile tests did not get built since conversion to meson
and they used an awkward way to manage the test data.

This patchset converts the tests to use a helper to take
text file and make it into a C header. Then use the C header
to generate temporary files as needed.

v2 - use mkstemp instead of mktemps since the later does
     not exist on Windows (in mingw).

Stephen Hemminger (3):
  buildtools: add helper to convert text file to header
  test: restore cfgfile tests
  test: remove unused resource API

 app/meson.build                    |   3 +-
 app/test/meson.build               |   8 +-
 app/test/resource.c                | 276 -----------------------------
 app/test/resource.h                | 106 -----------
 app/test/test_cfgfile.c            | 164 ++++++++++-------
 app/test/test_cfgfiles/meson.build |  19 ++
 app/test/test_resource.c           | 104 -----------
 buildtools/gen-header.py           |  36 ++++
 buildtools/meson.build             |   2 +-
 9 files changed, 166 insertions(+), 552 deletions(-)
 delete mode 100644 app/test/resource.c
 delete mode 100644 app/test/resource.h
 create mode 100644 app/test/test_cfgfiles/meson.build
 delete mode 100644 app/test/test_resource.c
 create mode 100644 buildtools/gen-header.py

-- 
2.43.0



More information about the dev mailing list