From: Petri Latvala <petri.latvala@intel.com>
To: Oleg Vasilev <oleg.vasilev@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH v3] runner: add --list-all and --blacklist
Date: Tue, 18 Jun 2019 11:11:29 +0300 [thread overview]
Message-ID: <20190618081129.GV22949@platvala-desk.ger.corp.intel.com> (raw)
In-Reply-To: <20190617134133.16789-1-oleg.vasilev@intel.com>
On Mon, Jun 17, 2019 at 04:41:33PM +0300, Oleg Vasilev wrote:
> Currently, runner already collects all subtest names into job_list.
> --list-all allows to output it to stdout.
>
> --blacklist option takes a filename as an argument and adds all regexes
> from that file to the exclusion list.
>
> v2:
> - Update exclude/include regex matches for tests without
> subtests to be matched with pigtit-like name (Petri)
> - Replace relative paths with those formatted with testdatadir (Petri)
> - Minor codestyle changes
>
> v3:
> - Print test names in lowercase (Petri)
>
> Cc: Petri Latvala <petri.latvala@intel.com>
> Signed-off-by: Oleg Vasilev <oleg.vasilev@intel.com>
> ---
> runner/job_list.c | 36 ++++++++-
> runner/job_list.h | 1 +
> runner/runner.c | 5 ++
> runner/runner_tests.c | 18 ++++-
> runner/settings.c | 117 +++++++++++++++++++++++-----
> runner/settings.h | 1 +
> runner/testdata/meson.build | 5 ++
> runner/testdata/test-blacklist.txt | 2 +
> runner/testdata/test-blacklist2.txt | 2 +
> 9 files changed, 163 insertions(+), 24 deletions(-)
> create mode 100644 runner/testdata/test-blacklist.txt
> create mode 100644 runner/testdata/test-blacklist2.txt
>
> diff --git a/runner/job_list.c b/runner/job_list.c
> index 4a16742f..8e5233f5 100644
> --- a/runner/job_list.c
> +++ b/runner/job_list.c
> @@ -111,11 +111,16 @@ static void add_subtests(struct job_list *job_list, struct settings *settings,
> fprintf(stderr, "popen error when executing %s: %s\n", binary, strerror(errno));
> } else if (WIFEXITED(s)) {
> if (WEXITSTATUS(s) == IGT_EXIT_INVALID) {
> + char piglitname[256];
> + generate_piglit_name(binary, NULL,
> + piglitname, sizeof(piglitname));
> +
> /* No subtests on this one */
> - if (exclude && exclude->size && matches_any(binary, exclude)) {
> + if (exclude && exclude->size &&
> + matches_any(piglitname, exclude)) {
> return;
> }
> - if (!include || !include->size || matches_any(binary, include)) {
> + if (!include || !include->size || matches_any(piglitname, include)) {
> add_job_list_entry(job_list, strdup(binary), NULL, 0);
> return;
> }
> @@ -291,6 +296,33 @@ static bool job_list_from_test_list(struct job_list *job_list,
> return any;
> }
>
> +void str_to_lower(char* str)
> +{
> + for (int i = 0; str[i]; i++) {
> + str[i] = tolower(str[i]);
> + }
> +}
> +
> +void list_all_tests(struct job_list* lst)
> +{
> + for (size_t test_idx = 0; test_idx < lst->size; ++test_idx){
> + struct job_list_entry* current_entry = lst->entries+test_idx;
> + str_to_lower(current_entry->binary);
> + if (current_entry->subtest_count==0) {
> + printf("igt@%s\n", current_entry->binary);
> + continue;
> + }
> + for (size_t subtest_idx = 0;
> + subtest_idx < current_entry->subtest_count;
> + ++subtest_idx) {
> + char *subtest_name = current_entry->subtests[subtest_idx];
> + str_to_lower(subtest_name);
> + printf("igt@%s@%s\n", current_entry->binary, subtest_name);
> + }
> + }
> +}
> +
> +
> static char *lowercase(const char *str)
> {
There's a lowercasing helper function already, right here.
--
Petri Latvala
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-06-18 8:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-14 13:24 [igt-dev] [PATCH] runner: add --list-all and --blacklist Oleg Vasilev
2019-06-14 13:43 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2019-06-14 14:28 ` [igt-dev] [PATCH] " Petri Latvala
2019-06-17 11:49 ` [igt-dev] [PATCH v2] " Oleg Vasilev
2019-06-17 12:41 ` Petri Latvala
2019-06-17 13:41 ` [igt-dev] [PATCH v3] " Oleg Vasilev
2019-06-18 8:11 ` Petri Latvala [this message]
2019-06-18 9:07 ` [igt-dev] [PATCH v4] " Oleg Vasilev
2019-06-18 9:26 ` Petri Latvala
2019-06-17 14:14 ` [igt-dev] ✓ Fi.CI.BAT: success for runner: add --list-all and --blacklist (rev2) Patchwork
2019-06-17 15:31 ` [igt-dev] ✓ Fi.CI.BAT: success for runner: add --list-all and --blacklist (rev3) Patchwork
2019-06-17 23:23 ` [igt-dev] ✓ Fi.CI.IGT: success for runner: add --list-all and --blacklist (rev2) Patchwork
2019-06-18 2:11 ` [igt-dev] ✓ Fi.CI.IGT: success for runner: add --list-all and --blacklist (rev3) Patchwork
2019-06-18 9:36 ` [igt-dev] ✗ Fi.CI.BAT: failure for runner: add --list-all and --blacklist (rev4) Patchwork
2019-06-18 9:41 ` Petri Latvala
2019-06-18 10:39 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2019-06-18 20:05 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190618081129.GV22949@platvala-desk.ger.corp.intel.com \
--to=petri.latvala@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=oleg.vasilev@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox