SPICE common unit testing

Tuesday, April 17, 2018

Recorder integration

Re-split the original patch into

  1. a part that adds the recorder,

    # a part that connects to glib logging # preparatory cleanup patches (whitespace, comments) # preparatory fix for the test suite (update after g_setenv)

However, building spice-gtk with the autoconf build system fails on macOS with:
  CC       spice-util.lo
spice-util.c:106:12: error: use of undeclared identifier 'VERSION'
    return VERSION;
           ^
1 error generated.

I've built with autoconf many times on this machine, so I'm a bit puzzled why this fails now. No obvious changes around the relevant code since 2010.

I have an old directory, spice-gtk-ac, which builds fine. Its config.h contains

/* Version number of package */
#define VERSION "0.34.31-c729-dirty"

The same thing in the local config.h, except there is an UNKNOWN version. Apparently, the git-version-gen script does not accept when spice-gtk is a submodule, it checks for a directory:

if test -n "$v"
then
    : # use $v
elif test -d .git
    && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null

but for a submodule, .git is a file with

gitdir: ../../.git/modules/path/to/client

That's an easy fix.

But my problem was something different. Apparently, at some point, I copied some bad config.h into the src directory, which was selected over the one in spice-gtk.

Misc

Some electricity repair at home related to the massive changes in the garden. The house was built in 1958, so they don't follow any color coding conventions. And in some cases I have no idea where the wires are running inside the house, so it's "wire hunt". Unfortunately, some of that work can only be done with electricity off and during daylight hours, which means that I have to shutdown all my machines and restart them afterwards. Time consuming twice.