summaryrefslogtreecommitdiff
path: root/lib/igt_core.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/igt_core.h')
-rw-r--r--lib/igt_core.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/igt_core.h b/lib/igt_core.h
index 33f89406..4e56be8a 100644
--- a/lib/igt_core.h
+++ b/lib/igt_core.h
@@ -33,6 +33,7 @@
#include <setjmp.h>
#include <stdbool.h>
#include <stdlib.h>
+#include <stdio.h>
#include <string.h>
#include <sys/types.h>
#include <stdarg.h>
@@ -650,4 +651,16 @@ extern enum igt_log_level igt_log_level;
void igt_set_timeout(unsigned int seconds);
+FILE *__igt_fopen_data(const char* igt_srcdir, const char* igt_datadir,
+ const char* filename);
+/**
+ * igt_fopen_data:
+ * @filename: filename to open.
+ *
+ * Open a datafile for test, first try from installation directory
+ * then from build directory.
+ */
+#define igt_fopen_data(filename) \
+ __igt_fopen_data(IGT_SRCDIR, IGT_DATADIR, filename)
+
#endif /* IGT_CORE_H */