Skip to contentSkip to conversation

tests/gem_concurrent.c: rename to gem_concurrent_all

PATCH In review [email protected] 2 participants 2 messages Apr 1, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/gem_concurrent.c: rename to gem_concurrent_all

From: Tim Gore <[email protected]>

Recent patch #7763349a9a87.. renamed gem_concurrent_blit.c to gem_concurrent.c and then added entries to Makefile.am to make two identical executeables (but with different names) from this source file. This executeable changes its behaviour based on argv[0]. But, this has broken the Android build, which does not use autotools.

This patch instead renames the source file to match the name of one executable (gem_concurrent_all.c) and creates a second source file which simply #includes the first. The Makefile.am entries are also removed. This restores the simple test.c -> test executeable relationship seen in the rest of IGT and allows the Android build system to work without parsing Makfile.am or having to incorporate a special workaround for this test.

---
 tests/Makefile.am           |    2 -
 tests/gem_concurrent.c      | 1100 -------------------------------------------
 tests/gem_concurrent_all.c  | 1100 +++++++++++++++++++++++++++++++++++++++++++
 tests/gem_concurrent_blit.c |    8 +
 4 files changed, 1108 insertions(+), 1102 deletions(-)
 delete mode 100644 tests/gem_concurrent.c
 create mode 100644 tests/gem_concurrent_all.c
 create mode 100644 tests/gem_concurrent_blit.c
tests/Makefile.am +0 -2
index f45c6c9..7d3c354 100644
@@ -53,8 +53,6 @@ gem_ctx_basic_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
 gem_ctx_basic_LDADD = $(LDADD) -lpthread
 gem_ctx_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
 gem_ctx_thrash_LDADD = $(LDADD) -lpthread
-gem_concurrent_all_SOURCES = gem_concurrent.c
-gem_concurrent_blit_SOURCES = gem_concurrent.c
 gem_fence_thrash_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
 gem_fence_thrash_LDADD = $(LDADD) -lpthread
 gem_fence_upload_CFLAGS = $(AM_CFLAGS) $(THREAD_CFLAGS)
tests/gem_concurrent.c deleted +0 -1100

1,100 lines not on this page · raw message

tests/gem_concurrent_all.c new file +1100 -0

1,100 lines not on this page · raw message

tests/gem_concurrent_blit.c new file +8 -0
new file mode 100644
index 0000000..513de4a
@@ -0,0 +1,8 @@
+/* This test is just a duplicate of gem_concurrent_all. */
+/* However the executeable will be gem_concurrent_blit. */
+/* The main function examines argv[0] and, in the case  */
+/* of gem_concurent_blit runs only a subset of the      */
+/* available subtests. This avoids the use of           */
+/* non-standard command line parameters which can cause */
+/* problems for automated testing */
+#include "gem_concurrent_all.c"
Signature · 6 lines
2.3.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Reviewed-by on v1 1/1
#1 lore raw
Quoted 19 lines · On Wed, Apr 01, 2015 at 04:36:59PM +0100, [email protected] wrote:

From: Tim Gore <[email protected]>

Recent patch #7763349a9a87.. renamed gem_concurrent_blit.c to gem_concurrent.c and then added entries to Makefile.am to make two identical executeables (but with different names) from this source file. This executeable changes its behaviour based on argv[0]. But, this has broken the Android build, which does not use autotools.

This patch instead renames the source file to match the name of one executable (gem_concurrent_all.c) and creates a second source file which simply #includes the first. The Makefile.am entries are also removed. This restores the simple test.c -> test executeable relationship seen in the rest of IGT and allows the Android build system to work without parsing Makfile.am or having to incorporate a special workaround for this test.

Quoted 1 line

Neat, I am not even going to complain about /* */\n/* */\n/* */

-Chris

Signature · 5 lines
Chris Wilson, Intel Open Source Technology Centre
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx