summaryrefslogtreecommitdiffstats
path: root/test/update-expected-output.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-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