From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6428845A1B; Tue, 24 Sep 2024 10:00:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0EBD740295; Tue, 24 Sep 2024 10:00:36 +0200 (CEST) Received: from mail-ed1-f49.google.com (mail-ed1-f49.google.com [209.85.208.49]) by mails.dpdk.org (Postfix) with ESMTP id AD8E54028E for ; Tue, 24 Sep 2024 10:00:34 +0200 (CEST) Received: by mail-ed1-f49.google.com with SMTP id 4fb4d7f45d1cf-5c42f406fa5so3911892a12.0 for ; Tue, 24 Sep 2024 01:00:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1727164834; x=1727769634; darn=dpdk.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=pfPSrz5v0LNtv2kub4d8abAk0sitVagixXVYUnL4t/k=; b=pTZVKl6Yr9UGScZFeyIdHqKeRNm10s5EDe148cYX6ggtp9HF8BBrvKOL2HxROp0ZTU ZgqTNdZb0BM7XEiiWFXFjyDRA1pt41Hc7F5Y+eHkbWPoSpx1/LSATJUZJa5JE0xjLdX7 gKO7myiLZRBCsKJUhZs7o3ZBXLdrgLUcHfjCw+5ih1rxAyYFngRKe84w7vOJLYP7RLO6 WxbJs4ClIL+YlG+0OJYE3muJQ/TsWUle1Nua1FGaXx+3Sk8IhqgSrTJbRBrRfg+7l+69 nFHaTtQe7iH9kIc/ngFI//InOPAguYsxKdz+mdU3SNjxyRGfP9e9ngrgEjUBbP7ie1YI 5Xxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727164834; x=1727769634; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=pfPSrz5v0LNtv2kub4d8abAk0sitVagixXVYUnL4t/k=; b=quehSxLTtebq7ObjFqLt783q4tMelhWoW9kI1XPoIhSWJvzqedfjqR/5rNaDX1A+kO f8AgMNMqPHcHUf4yPYhFimU0JYwZ0xXkunar4c/v4ig3MquY4PTQ/Vz9UcOxO6+nrX66 cghWONdnqMHAkKJrORRrZenxOqJA1vK6Uim70HVl9T6sLrZopQrIIl1oa1tno9lffUjO jLRi84D5EyZGWICsbQ/fiNWPWunnKJ52OgyWDDm69ai2oT29X6yqWwB4WJgCCRth7USl JJe8AxFMqGr7RFa8TMlFxXfZEzTgpjjWrek7H0ntDjlHINweWxBPBz6KSzIF6fZEF52c RXFw== X-Forwarded-Encrypted: i=1; AJvYcCUPfbmfCZkB9YC4Pv3mqFpl5kHZHYK9pqD/LYuXUaHJdWaVUdiqm5htNNNhrSMOjz28Vzc=@dpdk.org X-Gm-Message-State: AOJu0YwStGIOW3khfbE8Zcrucu5gLJt51RwPUlDgBNbq+6DFVk9KfpQr OMkq1rhfcPzeXLYvbzuj3dmNfEES0af8YBF2Tj/guXW12PNhDMJ6OKBuqcJe3QU= X-Google-Smtp-Source: AGHT+IFUNyRUP/gtMUkUD2B7zYKGKXw7btla/ngPRlAd4VXjxvtYBg+62xkU+l7TegbtimH1ACll0w== X-Received: by 2002:a05:6402:5248:b0:5c4:95d:da4f with SMTP id 4fb4d7f45d1cf-5c464a5bffamr19069271a12.25.1727164834143; Tue, 24 Sep 2024 01:00:34 -0700 (PDT) Received: from [10.12.0.236] (81.89.53.154.host.vnet.sk. [81.89.53.154]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5c5cf4c4fd8sm473906a12.69.2024.09.24.01.00.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 24 Sep 2024 01:00:33 -0700 (PDT) Message-ID: <603c96e1-9ddf-4006-95bb-0000716ed381@pantheon.tech> Date: Tue, 24 Sep 2024 10:00:32 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 02/11] dts: add test case decorators To: Jeremy Spewock Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, paul.szczepanek@arm.com, Luca.Vizzarro@arm.com, alex.chapman@arm.com, probb@iol.unh.edu, npratte@iol.unh.edu, dmarx@iol.unh.edu, dev@dpdk.org References: <20240301155416.96960-1-juraj.linkes@pantheon.tech> <20240923150210.57269-1-juraj.linkes@pantheon.tech> <20240923150210.57269-2-juraj.linkes@pantheon.tech> Content-Language: en-US From: =?UTF-8?Q?Juraj_Linke=C5=A1?= In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 23. 9. 2024 21:26, Jeremy Spewock wrote: > One super nit-pick comment below, even without that though I still > think this looks good. > > Reviewed-by: Jeremy Spewock > > On Mon, Sep 23, 2024 at 11:02 AM Juraj Linkeš > wrote: > >> + def is_test_case(function: Callable) -> bool: >> + if inspect.isfunction(function): >> + # TestCase is not used at runtime, so we can't use isinstance() with `function`. >> + # But function.test_type exists. >> + if hasattr(function, "test_type"): >> + return isinstance(function.test_type, TestCaseType) >> + return False >> + >> + if test_case_sublist is None: >> + test_case_sublist = [] >> + >> + # the copy is needed so that the condition "elif test_case_sublist" doesn't >> + # change mid-cycle >> + test_case_sublist_copy = list(test_case_sublist) >> + func_test_cases = set() >> + perf_test_cases = set() >> + >> + for test_case_name, test_case_function in inspect.getmembers(cls, is_test_case): >> + if test_case_name in test_case_sublist_copy: >> + # if test_case_sublist_copy is non-empty, remove the found test case >> + # so that we can look at the remainder at the end >> + test_case_sublist_copy.remove(test_case_name) >> + elif test_case_sublist: >> + # the original list not being empty means we're filtering test cases > > This might read a little better if there was a period at the end, but > I still think this gets the point across as is. > Ack, I'll capitalize and add periods to all comments in this method. >> + # since we didn't remove test_case_name in the previous branch, >> + # it doesn't match the filter and we don't want to remove it >> + continue >> + >> + match test_case_function.test_type: >> + case TestCaseType.PERFORMANCE: >> + perf_test_cases.add(test_case_function) >> + case TestCaseType.FUNCTIONAL: >> + func_test_cases.add(test_case_function) >> + > >> 2.43.0 >>