Bug 37847

Summary: regression tests assume python is in PATH and somewhat modern
Product: dbus Reporter: Simon McVittie <smcv>
Component: coreAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: John (J5) Palmieri <johnp>
Severity: minor    
Priority: low CC: cosimo.alfarano, hp, will
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 36074    
Attachments: [1/4] Check for Python; skip Python tests if not found
[2/4] Give better diagnostics if --enable-tests=yes is given
[3/4] Only ask pkg-config for the systemd unit directory if both are installed
[4/4] If --enable-tests=yes, require Python modules for complete test coverage
[3/4 v2] Only ask pkg-config for the systemd unit directory if both are installed

Description Simon McVittie 2011-06-02 03:55:26 UTC
The regression tests assume a working python in $PATH. This should be checked in configure.ac or something.
Comment 1 Simon McVittie 2011-08-24 05:04:52 UTC
Created attachment 50537 [details] [review]
[1/4] Check for Python; skip Python tests if not found

As with the optional test-dependencies on GLib and dbus-glib, we make this
a hard dependency if --enable-tests[=yes], but not if --enable-tests=auto.
Comment 2 Simon McVittie 2011-08-24 05:05:24 UTC
Created attachment 50538 [details] [review]
[2/4] Give better diagnostics if --enable-tests=yes is given

We want to indicate why it's a problem that GLib, dbus-glib are missing.
Comment 3 Simon McVittie 2011-08-24 05:05:51 UTC
Created attachment 50539 [details] [review]
[3/4] Only ask pkg-config for the systemd unit directory if  both are installed

pkg-config is not a hard dependency, and this check avoids errors in a
minimal build environment:
       
./configure: line 21777: --variable=systemdsystemunitdir: command not found
Comment 4 Simon McVittie 2011-08-24 05:06:59 UTC
Created attachment 50540 [details] [review]
[4/4] If --enable-tests=yes, require Python modules for complete test coverage

The two relevant tests already exit 0 with a message if importing those
modules fails.
Comment 5 Simon McVittie 2011-09-16 07:15:23 UTC
Created attachment 51263 [details] [review]
[3/4 v2] Only ask pkg-config for the systemd unit directory if both are installed

pkg-config is not a hard dependency, and this check avoids errors in a
minimal build environment:

./configure: line 21777: --variable=systemdsystemunitdir: command not found
---

A fixed version of the previous patch in which the "have systemd" case should work again.
Comment 6 Will Thompson 2011-09-21 01:13:15 UTC
Review of attachment 50537 [details] [review]:

Looks good.
Comment 7 Will Thompson 2011-09-21 01:15:24 UTC
Review of attachment 50538 [details] [review]:

Looks fine.
Comment 8 Will Thompson 2011-09-21 01:17:37 UTC
Review of attachment 51263 [details] [review]:

Looks fine.
Comment 9 Will Thompson 2011-09-21 01:25:54 UTC
Review of attachment 50540 [details] [review]:

Looks fine.
Comment 10 Simon McVittie 2011-09-21 03:40:53 UTC
Fixed in git for 1.4.16 and 1.5.8, thanks

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.