From 95b78e899b1f2c8de39426697f8b9fa0c221d5e9 Mon Sep 17 00:00:00 2001 From: Klaus Aehlig Date: Fri, 24 Jan 2025 15:09:54 +0100 Subject: Action equality test: only verify the set of origins While our tool promises to generate a reproducible order of the action origins, we should not insist on a particular one. Therefore sort before comparing. --- test/end-to-end/actions/action-equality-properties.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/end-to-end') diff --git a/test/end-to-end/actions/action-equality-properties.sh b/test/end-to-end/actions/action-equality-properties.sh index c2b900eb..f8209dcf 100755 --- a/test/end-to-end/actions/action-equality-properties.sh +++ b/test/end-to-end/actions/action-equality-properties.sh @@ -102,18 +102,18 @@ echo cd "${ROOT}/${variant}" "${JUST}" analyse --local-build-root "${LBRDIR}" --dump-graph graph-null.json 2>&1 -action_configs=$(cat graph-null.json | jq -acM '.actions | [ .[] | .origins | [ .[] | .config.PROPERTIES ]] | sort') +action_configs=$(cat graph-null.json | jq -acM '.actions | [ .[] | .origins | [ .[] | .config.PROPERTIES ] | sort] | sort') echo "${action_configs}" [ "${action_configs}" = '[[null,{}]]' ] echo "${JUST}" analyse --local-build-root "${LBRDIR}" -D '{"PROPERTIES": {}}' --dump-graph graph-empty.json 2>&1 -action_configs=$(cat graph-empty.json | jq -acM '.actions | [ .[] | .origins | [ .[] | .config.PROPERTIES ]] | sort') +action_configs=$(cat graph-empty.json | jq -acM '.actions | [ .[] | .origins | [ .[] | .config.PROPERTIES ] | sort ] | sort') echo "${action_configs}" [ "${action_configs}" = '[[null,{}]]' ] "${JUST}" analyse --local-build-root "${LBRDIR}" -D '{"PROPERTIES": {"foo": "bar"}}' --dump-graph graph-set.json 2>&1 -action_configs=$(cat graph-set.json | jq -acM '.actions | [ .[] | .origins | [ .[] | .config.PROPERTIES ]] | sort') +action_configs=$(cat graph-set.json | jq -acM '.actions | [ .[] | .origins | sort | [ .[] | .config.PROPERTIES ] | sort] | sort') echo "${action_configs}" [ "${action_configs}" = '[[null,{}],[{"foo":"bar"}]]' ] -- cgit v1.2.3