From: Petri Latvala <petri.latvala@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>,
Petri Latvala <petri.latvala@intel.com>
Subject: [igt-dev] [PATCH i-g-t v2] runner: Exit with 0 on dry-run
Date: Tue, 19 Feb 2019 12:18:10 +0200 [thread overview]
Message-ID: <20190219101810.31377-1-petri.latvala@intel.com> (raw)
In-Reply-To: <20190219095853.30623-1-petri.latvala@intel.com>
v2: Adjust tests accordingly
Signed-off-by: Petri Latvala <petri.latvala@intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
---
runner/executor.c | 2 +-
runner/runner_tests.c | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/runner/executor.c b/runner/executor.c
index 3f1eb010..d535c276 100644
--- a/runner/executor.c
+++ b/runner/executor.c
@@ -1208,7 +1208,7 @@ bool execute(struct execute_state *state,
if (state->dry) {
printf("Dry run, not executing. Invoke igt_resume if you want to execute.\n");
- return false;
+ return true;
}
if ((resdirfd = open(settings->results_path, O_DIRECTORY | O_RDONLY)) < 0) {
diff --git a/runner/runner_tests.c b/runner/runner_tests.c
index 0965612a..e46568ac 100644
--- a/runner/runner_tests.c
+++ b/runner/runner_tests.c
@@ -773,8 +773,9 @@ igt_main
"Dry run initialization didn't create the results directory.\n");
/* Execute from just initialize_execute_state should fail */
- igt_assert(!execute(&state, &settings, &list));
- igt_assert(openat(dirfd, "0", O_DIRECTORY | O_RDONLY) < 0);
+ igt_assert(execute(&state, &settings, &list));
+ igt_assert_f(openat(dirfd, "0", O_DIRECTORY | O_RDONLY) < 0,
+ "Dry run executed when it should not have.\n");
igt_assert_f((fd = openat(dirfd, "metadata.txt", O_RDONLY)) >= 0,
"Dry run initialization didn't serialize settings.\n");
close(fd);
--
2.19.1
_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev
next prev parent reply other threads:[~2019-02-19 10:18 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-02-19 9:58 [igt-dev] [PATCH i-g-t] runner: Exit with 0 on dry-run Petri Latvala
2019-02-19 10:11 ` [igt-dev] ✗ Fi.CI.BAT: failure for " Patchwork
2019-02-19 10:18 ` Petri Latvala [this message]
2019-02-19 12:13 ` [igt-dev] [PATCH i-g-t v2] " Arkadiusz Hiler
2019-02-19 11:22 ` [igt-dev] ✓ Fi.CI.BAT: success for runner: Exit with 0 on dry-run (rev2) Patchwork
2019-02-19 13:42 ` [igt-dev] ✗ Fi.CI.IGT: failure " 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=20190219101810.31377-1-petri.latvala@intel.com \
--to=petri.latvala@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=tomi.p.sarvela@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