lcov icon indicating copy to clipboard operation
lcov copied to clipboard

Make test harness more portable

Open nega0 opened this issue 4 years ago • 0 comments

The intent of this PR is to get the test harness to run on more platforms. It replaces or wraps platform (or age) specific bits with more generic alternatives. The patch is minor, and aside from .gitignore only touches 4 of the test harness files. The tests themselves are all untouched. With these patches, the test harness successfully runs all tests on up-to-date macOS (and they all pass too).

 .gitignore               |   15 +++++++++++++++
 tests/bin/test_run       |   12 ++++++++++--
 tests/bin/test_skip      |    3 ++-
 tests/bin/testsuite_exit |    5 +++--
 tests/bin/testsuite_init |   31 +++++++++++++++++++++++++------
 5 files changed, 55 insertions(+), 11 deletions(-)
  • Ignores auto-generated files from the test suite
  • Removes non-portable realpath in favor of a perl version
  • Makes call to stat portable via bash's OSTYPE
  • Wraps reads from '/proc' with bash's OSTYPE
  • Uses 'printf' where we're printing ANSI codes

nega0 avatar Nov 21 '21 23:11 nega0