diff mbox

[i-g-t,2/3] meson: align test-list.txt generation with automake

Message ID 20170908151448.15356-3-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter Sept. 8, 2017, 3:14 p.m. UTC
- I forgot the chamelium tests
- Order tests the same way in both build systems. Since testdisplay is
  special, it's easier to put that at the end in meson, so adjusted
  automake to suit.

With this you can diff the 2 test lists and end up with 0 differences,
which will be useful to CI meson vs. automake.

Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 tests/Makefile.am          |  1 +
 tests/Makefile.sources     |  2 --
 tests/generate_testlist.sh |  9 +++++++--
 tests/meson.build          | 20 ++++++++++++++------
 4 files changed, 22 insertions(+), 10 deletions(-)

Comments

Ville Syrjälä Sept. 20, 2017, 4:33 p.m. UTC | #1
On Fri, Sep 08, 2017 at 05:14:47PM +0200, Daniel Vetter wrote:
> - I forgot the chamelium tests
> - Order tests the same way in both build systems. Since testdisplay is
>   special, it's easier to put that at the end in meson, so adjusted
>   automake to suit.
> 
> With this you can diff the 2 test lists and end up with 0 differences,
> which will be useful to CI meson vs. automake.
> 
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

I needed an actually working test-list.txt (run-tests.sh didn't like
what were producing previously) so I've gone pushed this. I also
pushed patch 3/3 since it looked all right to me. There were a few
rebase conflicts but nothing major.

> ---
>  tests/Makefile.am          |  1 +
>  tests/Makefile.sources     |  2 --
>  tests/generate_testlist.sh |  9 +++++++--
>  tests/meson.build          | 20 ++++++++++++++------
>  4 files changed, 22 insertions(+), 10 deletions(-)
> 
> diff --git a/tests/Makefile.am b/tests/Makefile.am
> index 8c70f6f1aa35..39ca3960355c 100644
> --- a/tests/Makefile.am
> +++ b/tests/Makefile.am
> @@ -26,6 +26,7 @@ TESTS_progs += \
>  	$(NULL)
>  endif
>  
> +TESTS_progs += testdisplay
>  
>  if BUILD_TESTS
>  test-list.txt: Makefile.sources
> diff --git a/tests/Makefile.sources b/tests/Makefile.sources
> index 0f4e39af10a1..caec5486e49f 100644
> --- a/tests/Makefile.sources
> +++ b/tests/Makefile.sources
> @@ -281,8 +281,6 @@ testdisplay_SOURCES = \
>  	testdisplay_hotplug.c \
>  	$(NULL)
>  
> -TESTS_progs += testdisplay
> -
>  check_SCRIPTS = igt_command_line.sh \
>  	$(NULL)
>  
> diff --git a/tests/generate_testlist.sh b/tests/generate_testlist.sh
> index 6ea78655daca..e3cb87f98842 100755
> --- a/tests/generate_testlist.sh
> +++ b/tests/generate_testlist.sh
> @@ -2,9 +2,14 @@
>  
>  echo TESTLIST > $MESON_BUILD_ROOT/tests/test-list.txt
>  
> +if [[ $# -gt 0 ]] ; then
> +	echo -n $1 >> $MESON_BUILD_ROOT/tests/test-list.txt
> +	shift
> +fi
> +
>  while [[ $# -gt 0 ]] ; do
> -	echo $1 >> $MESON_BUILD_ROOT/tests/test-list.txt
> +	echo -n " $1" >> $MESON_BUILD_ROOT/tests/test-list.txt
>  	shift
>  done
>  
> -echo END TESTLIST >> $MESON_BUILD_ROOT/tests/test-list.txt
> +echo -e "\nEND TESTLIST" >> $MESON_BUILD_ROOT/tests/test-list.txt
> diff --git a/tests/meson.build b/tests/meson.build
> index 4dd5a9c9d4c7..1a323f7c51d6 100644
> --- a/tests/meson.build
> +++ b/tests/meson.build
> @@ -218,6 +218,17 @@ test_progs = [
>  ]
>  
>  test_deps = [ igt_deps ]
> +
> +if libdrm_amdgpu.found()
> +	# FIXME meson/ninja really doesn't like build targets with paths in them
> +	test_progs += [
> +		'amdgpu/amd_basic',
> +		'amdgpu/amd_cs_nop',
> +		'amdgpu/amd_prime',
> +	]
> +	test_deps += libdrm_amdgpu
> +endif
> +
>  if libdrm_nouveau.found()
>  	test_progs += [
>  		'prime_nv_api',
> @@ -238,14 +249,11 @@ if libdrm_vc4.found()
>  	test_deps += libdrm_vc4
>  endif
>  
> -if libdrm_amdgpu.found()
> -	# FIXME meson/ninja really doesn't like build targets with paths in them
> +if chamelium.found()
>  	test_progs += [
> -		'amdgpu/amd_basic',
> -		'amdgpu/amd_cs_nop',
> -		'amdgpu/amd_prime',
> +		'chamelium',
>  	]
> -	test_deps += libdrm_amdgpu
> +	test_deps += chamelium
>  endif
>  
>  if alsa.found() and gsl.found()
> -- 
> 2.14.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff mbox

Patch

diff --git a/tests/Makefile.am b/tests/Makefile.am
index 8c70f6f1aa35..39ca3960355c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -26,6 +26,7 @@  TESTS_progs += \
 	$(NULL)
 endif
 
+TESTS_progs += testdisplay
 
 if BUILD_TESTS
 test-list.txt: Makefile.sources
diff --git a/tests/Makefile.sources b/tests/Makefile.sources
index 0f4e39af10a1..caec5486e49f 100644
--- a/tests/Makefile.sources
+++ b/tests/Makefile.sources
@@ -281,8 +281,6 @@  testdisplay_SOURCES = \
 	testdisplay_hotplug.c \
 	$(NULL)
 
-TESTS_progs += testdisplay
-
 check_SCRIPTS = igt_command_line.sh \
 	$(NULL)
 
diff --git a/tests/generate_testlist.sh b/tests/generate_testlist.sh
index 6ea78655daca..e3cb87f98842 100755
--- a/tests/generate_testlist.sh
+++ b/tests/generate_testlist.sh
@@ -2,9 +2,14 @@ 
 
 echo TESTLIST > $MESON_BUILD_ROOT/tests/test-list.txt
 
+if [[ $# -gt 0 ]] ; then
+	echo -n $1 >> $MESON_BUILD_ROOT/tests/test-list.txt
+	shift
+fi
+
 while [[ $# -gt 0 ]] ; do
-	echo $1 >> $MESON_BUILD_ROOT/tests/test-list.txt
+	echo -n " $1" >> $MESON_BUILD_ROOT/tests/test-list.txt
 	shift
 done
 
-echo END TESTLIST >> $MESON_BUILD_ROOT/tests/test-list.txt
+echo -e "\nEND TESTLIST" >> $MESON_BUILD_ROOT/tests/test-list.txt
diff --git a/tests/meson.build b/tests/meson.build
index 4dd5a9c9d4c7..1a323f7c51d6 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -218,6 +218,17 @@  test_progs = [
 ]
 
 test_deps = [ igt_deps ]
+
+if libdrm_amdgpu.found()
+	# FIXME meson/ninja really doesn't like build targets with paths in them
+	test_progs += [
+		'amdgpu/amd_basic',
+		'amdgpu/amd_cs_nop',
+		'amdgpu/amd_prime',
+	]
+	test_deps += libdrm_amdgpu
+endif
+
 if libdrm_nouveau.found()
 	test_progs += [
 		'prime_nv_api',
@@ -238,14 +249,11 @@  if libdrm_vc4.found()
 	test_deps += libdrm_vc4
 endif
 
-if libdrm_amdgpu.found()
-	# FIXME meson/ninja really doesn't like build targets with paths in them
+if chamelium.found()
 	test_progs += [
-		'amdgpu/amd_basic',
-		'amdgpu/amd_cs_nop',
-		'amdgpu/amd_prime',
+		'chamelium',
 	]
-	test_deps += libdrm_amdgpu
+	test_deps += chamelium
 endif
 
 if alsa.found() and gsl.found()