diff mbox

[i-g-t] scripts/run-tests.sh: Look for test-lists.txt in 'build' as well

Message ID 20170920163519.6099-1-ville.syrjala@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Ville Syrjälä Sept. 20, 2017, 4:35 p.m. UTC
From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Meson always uses a separate build directotry. Adjust the assumptions
in run-tests.sh to work in that environment. For now I'll just hardcode
it to look for a directly called 'build'. I suppose we might want to
let the user pass that in, but for now I can't be bothered to do that.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 scripts/run-tests.sh | 2 ++
 1 file changed, 2 insertions(+)

Comments

Jani Nikula Sept. 21, 2017, 1:05 p.m. UTC | #1
On Wed, 20 Sep 2017, Ville Syrjala <ville.syrjala@linux.intel.com> wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> Meson always uses a separate build directotry. Adjust the assumptions
> in run-tests.sh to work in that environment. For now I'll just hardcode
> it to look for a directly called 'build'. I suppose we might want to
> let the user pass that in, but for now I can't be bothered to do that.

As I suggested to Daniel in the mesonification patches, we could produce
an sh.config with all the relevant paths and more, and have the scripts
include that. Of course, you'll need to either pass in the information
about the location of sh.config, or expect run-tests.sh to be run with
the build directory as the CWD. Or support both.

BR,
Jani.


>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  scripts/run-tests.sh | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
> index a28dd8760a63..11e65d492fa1 100755
> --- a/scripts/run-tests.sh
> +++ b/scripts/run-tests.sh
> @@ -34,6 +34,8 @@ if [ ! -d "$IGT_TEST_ROOT" ]; then
>  	exit 1
>  fi
>  
> +[ -f "$IGT_TEST_ROOT/test-list.txt" ] || IGT_TEST_ROOT="$ROOT/build/tests"
> +
>  if [ ! -f "$IGT_TEST_ROOT/test-list.txt" ]; then
>  	echo "Error: test list not found."
>  	echo "Please run make in the tests directory to generate the test list."
diff mbox

Patch

diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh
index a28dd8760a63..11e65d492fa1 100755
--- a/scripts/run-tests.sh
+++ b/scripts/run-tests.sh
@@ -34,6 +34,8 @@  if [ ! -d "$IGT_TEST_ROOT" ]; then
 	exit 1
 fi
 
+[ -f "$IGT_TEST_ROOT/test-list.txt" ] || IGT_TEST_ROOT="$ROOT/build/tests"
+
 if [ ! -f "$IGT_TEST_ROOT/test-list.txt" ]; then
 	echo "Error: test list not found."
 	echo "Please run make in the tests directory to generate the test list."