Opened 10 years ago

Closed 10 years ago

#771 closed enhancement (fixed)

test version number of libyat in shell tests that link against libyat

Reported by: Peter Owned by: Peter
Priority: minor Milestone: yat 0.12
Component: test Version:
Keywords: Cc:

Description

Some of the shell tests link against yat. To avoid that we accidentally link in an installed libyat (see e.g. r3108) and thereby get a false negative (missed failure), we should compare the version given by function utility::version(void) and the VERSION string defined in test/defs.sh. Many tests already have source code that we compile and run so we only need to add something like

if (yat::utility::version() != $VERSION )
  exit(1)

and then test that test program exit(0), which should already be the case(?).

Change History (3)

comment:1 Changed 10 years ago by Peter

Status: newassigned

comment:2 Changed 10 years ago by Peter

(In [3170]) in yat-hello-check test that versions agree. refs #771.

comment:3 Changed 10 years ago by Peter

Resolution: fixed
Status: assignedclosed

Tests yat_lt_link_ifelse_test.sh and yat_m4_with_bam_test.sh also link against yat, but they do it inside configure.ac and I feel a adding a version check in their configure would be possible to write but difficult to write something that actually tests what we want directly. yat_lt_link_ifelse e.g. tests YAT_LT_LINK_IFELSE and we cannot check that we link against the correct version within that macro unless we modify that macro (which we don't want(?)). Then we could copy-cat the linking that is done in YAT_LT_LINK_IFELSE and amend a run check of the version(). That is too indirect for my taste though and would not necessarily catch if we modify and mess up the macro, i.e., the test is not fulilling it's primary cause i.e. to catch regressions. Hence I close this ticket for now.

Note: See TracTickets for help on using tickets.