mirror of https://github.com/citusdata/citus.git
Refactor diff script to streamline normalization process and improve readability
parent
68cd4c117f
commit
a0fb094b0f
|
@ -34,8 +34,25 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test -z "${VANILLATEST:-}"
|
# if test -z "${VANILLATEST:-}"
|
||||||
then
|
# then
|
||||||
|
# touch "$file1" # when adding a new test the expected file does not exist
|
||||||
|
# normalize_file="$BASEDIR/normalize.sed"
|
||||||
|
# # when running tests on an existing cluster some changes need to be done on
|
||||||
|
# # normalize.sed file. So a new file is used.
|
||||||
|
# if [[ -f "$BASEDIR/normalize_modified.sed" ]]
|
||||||
|
# then
|
||||||
|
# normalize_file="$BASEDIR/normalize_modified.sed"
|
||||||
|
# fi
|
||||||
|
# sed -Ef "$normalize_file" < "$file1" > "$file1.modified"
|
||||||
|
# sed -Ef "$normalize_file" < "$file2" > "$file2.modified"
|
||||||
|
# "$DIFF" -w $args "$file1.modified" "$file2.modified" | LC_CTYPE=C.UTF-8 diff-filter "$BASEDIR/normalize.sed"
|
||||||
|
# exit ${PIPESTATUS[0]}
|
||||||
|
# else
|
||||||
|
# exec "$DIFF" -w $args "$file1" "$file2"
|
||||||
|
# fi
|
||||||
|
|
||||||
|
|
||||||
touch "$file1" # when adding a new test the expected file does not exist
|
touch "$file1" # when adding a new test the expected file does not exist
|
||||||
normalize_file="$BASEDIR/normalize.sed"
|
normalize_file="$BASEDIR/normalize.sed"
|
||||||
# when running tests on an existing cluster some changes need to be done on
|
# when running tests on an existing cluster some changes need to be done on
|
||||||
|
@ -48,7 +65,3 @@ then
|
||||||
sed -Ef "$normalize_file" < "$file2" > "$file2.modified"
|
sed -Ef "$normalize_file" < "$file2" > "$file2.modified"
|
||||||
"$DIFF" -w $args "$file1.modified" "$file2.modified" | LC_CTYPE=C.UTF-8 diff-filter "$BASEDIR/normalize.sed"
|
"$DIFF" -w $args "$file1.modified" "$file2.modified" | LC_CTYPE=C.UTF-8 diff-filter "$BASEDIR/normalize.sed"
|
||||||
exit ${PIPESTATUS[0]}
|
exit ${PIPESTATUS[0]}
|
||||||
else
|
|
||||||
exec "$DIFF" -w $args "$file1" "$file2"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue