[Intel-gfx] [PATCH] dim: Sanity checks for nightly.conf
Daniel Vetter
daniel.vetter at ffwll.ch
Tue Sep 26 12:36:41 UTC 2017
Suggested by Chris Wilson and Jani Nikula.
To do this properly we need to again push the reading of nightly.conf
to be after the basic sanity checks, like it was before
commit 12976ee32ae2cb97c7384ef6afde5f9076fc7d99
Author: Jani Nikula <jani.nikula at intel.com>
Date: Fri Oct 28 12:40:46 2016 +0300
dim: switch to using remote agnostic integration branch config
v2: Don't fail on setup.
v3: Rewrite and squash.
v4: Typing code with jetlag, hard it is.
Cc: Jani Nikula <jani.nikula at intel.com>
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
Acked-by: Jani Nikula <jani.nikula at intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
dim | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/dim b/dim
index db11d3f1cc68..5e8c4d5b212d 100755
--- a/dim
+++ b/dim
@@ -118,6 +118,14 @@ function read_integration_config
if [ -r $DIM_PREFIX/drm-rerere/$integration_config ]; then
# shellcheck source=/dev/null
source $DIM_PREFIX/drm-rerere/$integration_config
+
+ if [[ "${#drm_tip_repos[@]}" = "0" ]] || [[ "${#drm_tip_config[@]}" = "0" ]]; then
+ echoerr "$integration_config not set up correctly, please fix manually"
+ exit 1
+ fi
+ else
+ echoerr "$integration_config is missing, please check your configuration and/or run dim setup"
+ exit 1
fi
dim_branches=
@@ -129,7 +137,6 @@ function read_integration_config
fi
done
}
-read_integration_config
function echoerr
{
@@ -220,6 +227,8 @@ if [ "$subcommand" != "setup" ] && [ "$subcommand" != "help" ] && [ "$subcommand
exit 1
fi
done
+
+ read_integration_config
fi
#
--
2.14.1
More information about the Intel-gfx
mailing list