[igt-dev] [PATCH i-g-t] tests/tools_test: Print the starting cwd

Petri Latvala petri.latvala at intel.com
Mon Jan 14 12:42:53 UTC 2019


Occasionally in CI tools_test goes looking for tools binaries in /bin,
instead of /opt/igt/bin where they should be. Print out the cwd before
the chdir() dance to figure out what's going on.

Signed-off-by: Petri Latvala <petri.latvala at intel.com>
Cc: Arkadiusz Hiler <arkadiusz.hiler at intel.com>
Cc: Tomi Sarvela <tomi.p.sarvela at intel.com>
Cc: Martin Peres <martin.peres at linux.intel.com>
---
 tests/tools_test.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tests/tools_test.c b/tests/tools_test.c
index 88a6ae96..de574fa8 100644
--- a/tests/tools_test.c
+++ b/tests/tools_test.c
@@ -82,6 +82,10 @@ igt_main
 	igt_fixture {
 		char *path;
 
+		path = get_current_dir_name();
+		igt_info("Looking for tools, cwd is %s\n", path);
+		free(path);
+
 		igt_require_f(chdir_to_tools_dir(),
 			      "Unable to determine the tools directory, expecting them in $cwd/" TOOLS " or $path/" TOOLS "\n");
 		path = get_current_dir_name();
-- 
2.19.1



More information about the igt-dev mailing list