summaryrefslogtreecommitdiffstats
path: root/test/update-expected-output.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:48:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 06:48:59 +0000
commitd835b2cae8abc71958b69362162e6a70c3d7ef63 (patch)
tree81052e3d2ce3e1bcda085f73d925e9d6257dec15 /test/update-expected-output.sh
parentInitial commit. (diff)
downloadcrmsh-d835b2cae8abc71958b69362162e6a70c3d7ef63.tar.xz
crmsh-d835b2cae8abc71958b69362162e6a70c3d7ef63.zip
Adding upstream version 4.6.0.upstream/4.6.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'test/update-expected-output.sh')
-rwxr-xr-xtest/update-expected-output.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/update-expected-output.sh b/test/update-expected-output.sh
new file mode 100755
index 0000000..496b73d
--- /dev/null
+++ b/test/update-expected-output.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+crmtestout="$1"
+
+[ -d "$crmtestout" ] || { echo "usage: $0 <test-output-dir>"; exit 1; }
+
+for f in $crmtestout/*.diff; do
+ fil=$(grep -- --- $f | awk '{print $2}' | sed 's/\/usr\/share\/crmsh\/tests/\/test/g')
+ awk "NR==1{\$2=\"a$fil\"}1" < "$f" | awk "NR==2{\$2=\"b$fil\"}1"
+done