1257097Srpaulo-- $FreeBSD: releng/10.2/tests/Kyuafile 257097 2013-10-25 05:25:19Z rpaulo $ 2257097Srpaulo-- 3257097Srpaulo-- Copyright 2011 Google Inc. 4257097Srpaulo-- All rights reserved. 5257097Srpaulo-- 6257097Srpaulo-- Redistribution and use in source and binary forms, with or without 7257097Srpaulo-- modification, are permitted provided that the following conditions are 8257097Srpaulo-- met: 9257097Srpaulo-- 10257097Srpaulo-- * Redistributions of source code must retain the above copyright 11257097Srpaulo-- notice, this list of conditions and the following disclaimer. 12257097Srpaulo-- * Redistributions in binary form must reproduce the above copyright 13257097Srpaulo-- notice, this list of conditions and the following disclaimer in the 14257097Srpaulo-- documentation and/or other materials provided with the distribution. 15257097Srpaulo-- * Neither the name of Google Inc. nor the names of its contributors 16257097Srpaulo-- may be used to endorse or promote products derived from this software 17257097Srpaulo-- without specific prior written permission. 18257097Srpaulo-- 19257097Srpaulo-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 20257097Srpaulo-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 21257097Srpaulo-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 22257097Srpaulo-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 23257097Srpaulo-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 24257097Srpaulo-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 25257097Srpaulo-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26257097Srpaulo-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27257097Srpaulo-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28257097Srpaulo-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29257097Srpaulo-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30257097Srpaulo 31257097Srpaulo-- Automatically recurses into any subdirectory that holds a Kyuafile. 32257097Srpaulo-- As such, this Kyuafile is suitable for installation into the root of 33257097Srpaulo-- the tests hierarchy as well as into any other subdirectory that needs 34257097Srpaulo-- "auto-discovery" of tests. 35257097Srpaulo-- 36257097Srpaulo-- This file is based on the Kyuafile.top sample file distributed in the 37257097Srpaulo-- kyua-cli package. 38257097Srpaulo 39257097Srpaulosyntax(2) 40257097Srpaulo 41257097Srpaulolocal directory = fs.dirname(current_kyuafile()) 42257097Srpaulofor file in fs.files(directory) do 43257097Srpaulo if file == "." or file == ".." then 44257097Srpaulo -- Skip these special entries. 45257097Srpaulo else 46257097Srpaulo local kyuafile_relative = fs.join(file, "Kyuafile") 47257097Srpaulo local kyuafile_absolute = fs.join(directory, kyuafile_relative) 48257097Srpaulo if fs.exists(kyuafile_absolute) then 49257097Srpaulo include(kyuafile_relative) 50257097Srpaulo end 51257097Srpaulo end 52257097Srpauloend 53