1*e2197f80SRui Paulo-- $FreeBSD$ 2*e2197f80SRui Paulo-- 3*e2197f80SRui Paulo-- Copyright 2011 Google Inc. 4*e2197f80SRui Paulo-- All rights reserved. 5*e2197f80SRui Paulo-- 6*e2197f80SRui Paulo-- Redistribution and use in source and binary forms, with or without 7*e2197f80SRui Paulo-- modification, are permitted provided that the following conditions are 8*e2197f80SRui Paulo-- met: 9*e2197f80SRui Paulo-- 10*e2197f80SRui Paulo-- * Redistributions of source code must retain the above copyright 11*e2197f80SRui Paulo-- notice, this list of conditions and the following disclaimer. 12*e2197f80SRui Paulo-- * Redistributions in binary form must reproduce the above copyright 13*e2197f80SRui Paulo-- notice, this list of conditions and the following disclaimer in the 14*e2197f80SRui Paulo-- documentation and/or other materials provided with the distribution. 15*e2197f80SRui Paulo-- * Neither the name of Google Inc. nor the names of its contributors 16*e2197f80SRui Paulo-- may be used to endorse or promote products derived from this software 17*e2197f80SRui Paulo-- without specific prior written permission. 18*e2197f80SRui Paulo-- 19*e2197f80SRui Paulo-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20*e2197f80SRui Paulo-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21*e2197f80SRui Paulo-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22*e2197f80SRui Paulo-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23*e2197f80SRui Paulo-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24*e2197f80SRui Paulo-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25*e2197f80SRui Paulo-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26*e2197f80SRui Paulo-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27*e2197f80SRui Paulo-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28*e2197f80SRui Paulo-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29*e2197f80SRui Paulo-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30*e2197f80SRui Paulo 31*e2197f80SRui Paulo-- Automatically recurses into any subdirectory that holds a Kyuafile. 32*e2197f80SRui Paulo-- As such, this Kyuafile is suitable for installation into the root of 33*e2197f80SRui Paulo-- the tests hierarchy as well as into any other subdirectory that needs 34*e2197f80SRui Paulo-- "auto-discovery" of tests. 35*e2197f80SRui Paulo-- 36*e2197f80SRui Paulo-- This file is based on the Kyuafile.top sample file distributed in the 37*e2197f80SRui Paulo-- kyua-cli package. 38*e2197f80SRui Paulo 39*e2197f80SRui Paulosyntax(2) 40*e2197f80SRui Paulo 41*e2197f80SRui Paulolocal directory = fs.dirname(current_kyuafile()) 42*e2197f80SRui Paulofor file in fs.files(directory) do 43*e2197f80SRui Paulo if file == "." or file == ".." then 44*e2197f80SRui Paulo -- Skip these special entries. 45*e2197f80SRui Paulo else 46*e2197f80SRui Paulo local kyuafile_relative = fs.join(file, "Kyuafile") 47*e2197f80SRui Paulo local kyuafile_absolute = fs.join(directory, kyuafile_relative) 48*e2197f80SRui Paulo if fs.exists(kyuafile_absolute) then 49*e2197f80SRui Paulo include(kyuafile_relative) 50*e2197f80SRui Paulo end 51*e2197f80SRui Paulo end 52*e2197f80SRui Pauloend 53