Kyuafile revision 257097
154263Sshin-- $FreeBSD: head/tests/Kyuafile 257097 2013-10-25 05:25:19Z rpaulo $
254263Sshin--
354263Sshin-- Copyright 2011 Google Inc.
454263Sshin-- All rights reserved.
554263Sshin--
654263Sshin-- Redistribution and use in source and binary forms, with or without
754263Sshin-- modification, are permitted provided that the following conditions are
854263Sshin-- met:
954263Sshin--
1054263Sshin-- * Redistributions of source code must retain the above copyright
1154263Sshin--   notice, this list of conditions and the following disclaimer.
1254263Sshin-- * Redistributions in binary form must reproduce the above copyright
1354263Sshin--   notice, this list of conditions and the following disclaimer in the
1454263Sshin--   documentation and/or other materials provided with the distribution.
1554263Sshin-- * Neither the name of Google Inc. nor the names of its contributors
1654263Sshin--   may be used to endorse or promote products derived from this software
1754263Sshin--   without specific prior written permission.
1854263Sshin--
1954263Sshin-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
2054263Sshin-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
2154263Sshin-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
2254263Sshin-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
2354263Sshin-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
2454263Sshin-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
2554263Sshin-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
2654263Sshin-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2754263Sshin-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2854263Sshin-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2954263Sshin-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
3054263Sshin
3154263Sshin-- Automatically recurses into any subdirectory that holds a Kyuafile.
3254263Sshin-- As such, this Kyuafile is suitable for installation into the root of
3354263Sshin-- the tests hierarchy as well as into any other subdirectory that needs
3454263Sshin-- "auto-discovery" of tests.
3554263Sshin--
3654263Sshin-- This file is based on the Kyuafile.top sample file distributed in the
3754263Sshin-- kyua-cli package.
3854263Sshin
3954263Sshinsyntax(2)
4054263Sshin
4154263Sshinlocal directory = fs.dirname(current_kyuafile())
4254263Sshinfor file in fs.files(directory) do
4364342Sume    if file == "." or file == ".." then
4454263Sshin        -- Skip these special entries.
4554263Sshin    else
4654263Sshin        local kyuafile_relative = fs.join(file, "Kyuafile")
4754263Sshin        local kyuafile_absolute = fs.join(directory, kyuafile_relative)
4854263Sshin        if fs.exists(kyuafile_absolute) then
4954263Sshin            include(kyuafile_relative)
5078064Sume        end
5154263Sshin    end
5254263Sshinend
5354263Sshin