• S
    tests: Correctly skip qtest on non-POSIX hosts · 5c4e24c1
    Stefan Hajnoczi 提交于
    qtest test cases only work on POSIX hosts.  The following line only
    defines dependencies for qtest binaries on POSIX hosts:
    
      check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS),$(check-qtest-$(TARGET)-y))
    
    But the QTEST_TARGETS definition earlier in the Makefile fails to check
    CONFIG_POSIX.  This causes make targets to be generated for qtest test
    cases even though we don't know how to build the binaries.
    
    The following error message is printed when trying to run gtester on a
    binary that was never built:
    
      GLib-WARNING **: Failed to execute test binary: tests/endianness-test.exe: Failed to execute child process "tests/endianness-test.exe" (No such file or directory)
    
    This patch makes QTEST_TARGETS empty on non-POSIX hosts.  This prevents
    the targets from being generated.
    Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com>
    Signed-off-by: NAndreas Färber <afaerber@suse.de>
    5c4e24c1
Makefile 18.5 KB