This adds the functions header() and headers(), that works just like command/commands() and library/libraries() functions.
Signed-off-by: Cleber Rosa <[email protected]> --- client/bin/os_dep.py | 14 ++++++++++++++ 1 files changed, 14 insertions(+), 0 deletions(-) diff --git a/client/bin/os_dep.py b/client/bin/os_dep.py index cf8eaf5..efa1269 100644 --- a/client/bin/os_dep.py +++ b/client/bin/os_dep.py @@ -54,3 +54,17 @@ def libraries(*libs): results = [] for lib in libs: results.append(library(lib)) + + +def header(hdr): + for dir in ['/usr/include', '/usr/local/include']: + file = os.path.join(dir, hdr) + if os.path.exists(file): + return file + raise ValueError('Missing header: %s' % hdr) + + +def headers(*hdrs): + results = [] + for hdr in hdrs: + results.append(header(hdr)) -- 1.7.4.4 _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
