public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH CI] tests/tools_test: Print everything when searching for tools
@ 2019-01-15 10:45 Petri Latvala
  2019-01-15 11:23 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
  2019-01-15 14:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
  0 siblings, 2 replies; 3+ messages in thread
From: Petri Latvala @ 2019-01-15 10:45 UTC (permalink / raw)
  To: igt-dev; +Cc: Petri Latvala

---
 tests/tools_test.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/tests/tools_test.c b/tests/tools_test.c
index 88a6ae96..c3f57449 100644
--- a/tests/tools_test.c
+++ b/tests/tools_test.c
@@ -65,12 +65,18 @@ static bool chdir_to_tools_dir(void)
 	char path[PATH_MAX];
 
 	/* Try TOOLS relative to cwd */
-	if (chdir(TOOLS) == 0)
+	if (chdir(TOOLS) == 0) {
+		igt_info("Directory found at original cwd + TOOLS\n");
 		return true;
+	}
 
 	/* Try TOOLS and install dir relative to test binary */
-	if (readlink("/proc/self/exe", path, sizeof(path)) > 0)
-		chdir(dirname(path));
+	if (readlink("/proc/self/exe", path, sizeof(path)) > 0) {
+		igt_info("Readlink /proc/self/exe = %s\n", path);
+		if (chdir(dirname(path)) == 0)
+			igt_info("chdir to executable dir succeeded\n");
+	} else
+		igt_info("Readlink /proc/self/exe failed\n");
 
 	return chdir(TOOLS) == 0 || chdir("../../bin") == 0;
 }
-- 
2.19.1

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-01-15 14:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-15 10:45 [igt-dev] [PATCH CI] tests/tools_test: Print everything when searching for tools Petri Latvala
2019-01-15 11:23 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2019-01-15 14:46 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox