diff options
author | Neels Hofmeyr <neels@hofmeyr.de> | 2018-04-11 15:43:33 +0200 |
---|---|---|
committer | Neels Hofmeyr <neels@hofmeyr.de> | 2018-04-11 19:32:01 +0200 |
commit | 567d20517af9800f13605aaebd6ea639809bf915 (patch) | |
tree | 020f5240a9df149f642e2c9678cbb75d3286c304 /mask_expected_results.sh | |
parent | 1fd6679d9d04eb322eb416bb755201b4972a154e (diff) |
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
Diffstat (limited to 'mask_expected_results.sh')
-rwxr-xr-x | mask_expected_results.sh | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mask_expected_results.sh b/mask_expected_results.sh new file mode 100755 index 00000000..f6791943 --- /dev/null +++ b/mask_expected_results.sh @@ -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 |