tests: Introduce libafstest_common 18/14318/6
authorAndrew Deason <adeason@sinenomine.net>
Thu, 2 Jul 2020 03:42:37 +0000 (22:42 -0500)
committerBenjamin Kaduk <kaduk@mit.edu>
Sun, 8 Aug 2021 00:38:05 +0000 (20:38 -0400)
commit405001be722457680428ba6ec7f3b1b5a6fab47a
treee5f259ec1d105fe73c572f8d5baf2953bbdc4564
parent3ccf8eaeb0bc19be8e11241740d0bfd7325711d1
tests: Introduce libafstest_common

Currently, a few tests use the code in tests/common/ by linking
individual object files in there in addition to the test code (e.g.
linking ../common/config.o along with superuser-t.o).

This convention makes it very obnoxious to move code around in
tests/common/, since any users need to update their link lines. It
also makes it difficult for code in tests/common/ to make use of
functions in other tests/common/ files.

To fix this, just build all of the objects in tests/common/ into a
convenience library, called libafstest_common, and link the relevant
tests against that. Link a few requisite libraries (roken, rfc3961) in
libafstest_common, so each individual test doesn't need to link
against them.

Also link the TAP library itself in libafstest_common, so tests don't
have to explicitly link against it separately. To do this, convert it
into a libtool library, libafstest_tap.la.

Change-Id: I9c031c164efee20201336edcbfaff429e1d231b7
Reviewed-on: https://gerrit.openafs.org/14318
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
src/config/Makefile.config.in
tests/auth/Makefile.in
tests/cmd/Makefile.in
tests/common/Makefile.in
tests/opr/Makefile.in
tests/rx/Makefile.in
tests/tap/Makefile.in
tests/util/Makefile.in
tests/volser/Makefile.in