dim: Make sure nightly.conf hasn't disappeared
PATCH 1/2 dim: Make sure nightly.conf hasn't disappeared
Suggested by Chris Wilson.
v2: Fix typo in the error msg (Chris).
--- dim | 6 ++++++ 1 file changed, 6 insertions(+)
dim +6 -0
@@ -220,6 +220,12 @@ if [ "$subcommand" != "setup" ] && [ "$subcommand" != "help" ] && [ "$subcommand exit 1 fi done + for f in $DIM_PREFIX/drm-rerere/nightly.conf; do + if [ ! -f $f ]; then + echoerr "$f is missing, please check your configuration and/or run dim setup" + exit 1 + fi + done fi #
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
PATCH 2/2 dim: Basic sanity check for nightly.conf
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 <[email protected]> Date: Fri Oct 28 12:40:46 2016 +0300
dim: switch to using remote agnostic integration branch config
--- dim | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
dim +8 -4
@@ -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. #
Signature · 6 lines
2.14.1 _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [PATCH 2/2] dim: Basic sanity check for nightly.conf
Quoted 1 line · Daniel Vetter
Requested by Jani.
No, I didn't mean to request this. I meant, in patch 1, just do the
if [[ "${#drm_tip_repos[@]}" = "0" ]] || [[ "${#drm_tip_config[@]}" = "0" ]]; then
bit instead. That in itself will ensure the integration config is around and contains sane data.
With the change in this patch, the read_integration_config movement doesn't make a difference, you'll blow up on dim setup before you have the drm-rerere repo around.
BR,
Jani.
Quoted 53 lines
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
12976ee32ae2cb97c7384ef6afde5f9076fc7d99Author: Jani Nikula <[email protected]> Date: Fri Oct 28 12:40:46 2016 +0300dim: switch to using remote agnostic integration branch config
Cc Jani Nikula <[email protected]>Signed-off-by Daniel Vetter <[email protected]>--- dim | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)dim +8
-4@@ -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. #
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 7 lines · Daniel Vetter
Suggested by Chris Wilson.
v2: Fix typo in the error msg (Chris).
Cc Chris Wilson <[email protected]>Cc Joonas Lahtinen <[email protected]>Signed-off-by Daniel Vetter <[email protected]>
Jani suggested that this is bit late already, but I don't see why we couldn't do both checks.
Regards, Joonas
Signature · 7 lines
Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/intel-gfx