[Intel-gfx] [PATCH 2/2] dim: Basic sanity check for nightly.conf
Daniel Vetter
daniel.vetter at ffwll.ch
Tue Sep 26 11:45:24 UTC 2017
Requested by Jani.
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
Cc: Jani Nikula <jani.nikula at intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter at intel.com>
---
dim | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/dim b/dim
index 69109a4f8666..abc5d81f052a 100755
--- a/dim
+++ b/dim
@@ -115,9 +115,12 @@ function read_integration_config
declare -g -A drm_tip_repos
declare -g -a drm_tip_config
- if [ -r $DIM_PREFIX/drm-rerere/$integration_config ]; then
- # shellcheck source=/dev/null
- source $DIM_PREFIX/drm-rerere/$integration_config
+ # shellcheck source=/dev/null
+ source $DIM_PREFIX/drm-rerere/$integration_config
+
+ if [[ "${#drm_tip_repos[@]}" = "0" ]] || [[ "${#drm_tip_config[@]}" = "0" ]]; then
+ echoerr "nightly.conf not set up correctly"
+ exit 1
fi
dim_branches=
@@ -129,7 +132,6 @@ function read_integration_config
fi
done
}
-read_integration_config
function echoerr
{
@@ -228,6 +230,8 @@ if [ "$subcommand" != "setup" ] && [ "$subcommand" != "help" ] && [ "$subcommand
done
fi
+read_integration_config
+
#
# Only function and alias definitions until the subcommand handling at the end.
#
--
2.14.1
More information about the Intel-gfx
mailing list