add mask_expected_results.sh

Provide a script to mask timestamps and source file lines in expected results
files: when updating expected changes, it is useful to see the exact semantic
changes, not the timestamp and source file line changes in the git diff.

Change-Id: I785e126b1f5afddd1b722bc5e922ed90970efa8a
This commit is contained in:
Neels Hofmeyr 2018-04-11 15:43:33 +02:00
parent 1fd6679d9d
commit 567d20517a
1 changed files with 7 additions and 0 deletions

7
mask_expected_results.sh Executable file
View File

@ -0,0 +1,7 @@
#!/bin/sh
# to prevent diffs due to timing and source file lines, mask some numbers
for target in */expected-results.xml; do
sed -i "s/time='[^']*'/time='MASKED'/g" "$target"
sed -i 's/ttcn:[0-9]\+/ttcn:MASKED/g' "$target"
done