From owner-freebsd-testing@FreeBSD.ORG Thu Mar 27 04:33:19 2014 Return-Path: Delivered-To: freebsd-testing@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 82850FA4 for ; Thu, 27 Mar 2014 04:33:19 +0000 (UTC) Received: from mail-qg0-f47.google.com (mail-qg0-f47.google.com [209.85.192.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3CA96B0A for ; Thu, 27 Mar 2014 04:33:18 +0000 (UTC) Received: by mail-qg0-f47.google.com with SMTP id 63so2151258qgz.34 for ; Wed, 26 Mar 2014 21:33:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=hJkbBIiFvFea77kNYyrPfOauZyj0QZ1QxiZb+wVAJyw=; b=YaD78AFQNeZ9O7l1EswfQBgDYtgZPsbecqBuB1gsgAziyiuAPhTg5kvCjG9oF7bZyQ sKXkGz8DPWpnTYu+wR23MpdNhno67K8wv9IRWckWWAo1a3AaxAsWhUvsUPOnztp316ss nFpfXNDqueDpdSmpwGANcPw2T+w7DpREtZVxlwBleH1WdoVZg4XPJlHed7kxeMgbZxEj 07S/NJ5/03CZVkeeHgLsomInfBTc5MEcy351BIsCRknh7DfzkIGhuQX0w5WVaohSgFUP JWSPbyhg4ke5tiAf64G8Vh/pblVuGo68XOPmkWAr+kiu3oF0EKl3sy3w7TnDnxAeJUH6 aQzw== X-Gm-Message-State: ALoCoQnyI3RSCutojVGmNthEixw38Ku++vzvADX4PKzFHZM9GpsK1BenMTyPBGYNsQ/pXqeQvjaH X-Received: by 10.140.27.109 with SMTP id 100mr64124468qgw.14.1395894792059; Wed, 26 Mar 2014 21:33:12 -0700 (PDT) MIME-Version: 1.0 Sender: jmmv@meroh.net Received: by 10.96.83.102 with HTTP; Wed, 26 Mar 2014 21:32:51 -0700 (PDT) X-Originating-IP: [2401:fa00:d:c:b03e:2e82:92b6:e21d] In-Reply-To: References: From: Julio Merino Date: Thu, 27 Mar 2014 13:32:51 +0900 X-Google-Sender-Auth: z0ElpGsKU0oQnrcyQ6NqFsxovQs Message-ID: Subject: Re: ATF Test Cases To: Alan Somers Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-testing@freebsd.org" , "Kilner, Peter" X-BeenThere: freebsd-testing@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: Testing on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Mar 2014 04:33:19 -0000 On Thu, Mar 27, 2014 at 1:00 PM, Alan Somers wrote: > I never thought about using eval to dynamically define testcases. Can > you please give an example? Not the prettiest code in the world, but the ipf tests in NetBSD are an example. See the h_common.sh[1] file for the helper functions and t_filter_exec.sh[2] for a specific case of their use and the definition of various tests. 1: http://cvsweb.netbsd.org/bsdweb.cgi/src/tests/ipf/h_common.sh?rev=1.8&content-type=text/x-cvsweb-markup&only_with_tag=MAIN 2: http://cvsweb.netbsd.org/bsdweb.cgi/src/tests/ipf/t_filter_exec.sh?rev=1.8&content-type=text/x-cvsweb-markup&only_with_tag=MAIN