diff --git a/.gitignore b/.gitignore index 4acced4f6..a6be0f00f 100644 --- a/.gitignore +++ b/.gitignore @@ -471,7 +471,7 @@ Makefile.in /src/structs-free.c /src/structs-print.c /src/structs-print.h -/src/test-utils +/src/unit-tests /stamp-h1 /sysprep/.depend /sysprep/stamp-script1.sh diff --git a/docs/C_SOURCE_FILES b/docs/C_SOURCE_FILES index 69aaefaf2..10e02deed 100644 --- a/docs/C_SOURCE_FILES +++ b/docs/C_SOURCE_FILES @@ -259,9 +259,9 @@ src/structs-compare.c src/structs-copy.c src/structs-free.c src/structs-print.c -src/test-utils.c src/tmpdirs.c src/umask.c +src/unit-tests.c src/utils.c src/wait.c src/whole-file.c diff --git a/po/POTFILES b/po/POTFILES index 44d40de6f..5ae4046e1 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -357,9 +357,9 @@ src/structs-compare.c src/structs-copy.c src/structs-free.c src/structs-print.c -src/test-utils.c src/tmpdirs.c src/umask.c +src/unit-tests.c src/utils.c src/wait.c src/whole-file.c diff --git a/src/Makefile.am b/src/Makefile.am index 07dbdd9bb..7a694ca00 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -257,25 +257,24 @@ libvirt_is_version_CFLAGS = \ endif # Tests: main tests are in tests/c-api. Here we just have some -# internal tests of utility functions. Note we don't just test what's -# in utils.c, we can test other functions as well here. +# internal tests of utility functions. TESTS_ENVIRONMENT = $(top_builddir)/run --test LOG_COMPILER = $(VG) -TESTS = test-utils -check_PROGRAMS = test-utils +TESTS = unit-tests +check_PROGRAMS = unit-tests -test_utils_SOURCES = test-utils.c -test_utils_CPPFLAGS = \ +unit_tests_SOURCES = unit-tests.c +unit_tests_CPPFLAGS = \ -I$(top_srcdir)/gnulib/lib -I$(top_builddir)/gnulib/lib \ -I$(top_srcdir)/src -I. -test_utils_CFLAGS = \ +unit_tests_CFLAGS = \ $(WARN_CFLAGS) $(WERROR_CFLAGS) # We have to link this to libguestfs, but because we want to test # non-exported functions we have to link with the objects not the # library. -test_utils_LDADD = \ +unit_tests_LDADD = \ $(libguestfs_la_OBJECTS) \ $(libguestfs_la_LIBADD) diff --git a/src/test-utils.c b/src/unit-tests.c similarity index 99% rename from src/test-utils.c rename to src/unit-tests.c index 4ed48befc..c754ddb60 100644 --- a/src/test-utils.c +++ b/src/unit-tests.c @@ -19,9 +19,6 @@ /** * Unit tests of internal functions. * - * This is not just a test of F. We can test other - * internal functions here too. - * * These tests may use a libguestfs handle, but must not launch the * handle. Also, avoid long-running tests. */