From 39ed3d2a5277c2303a74f94490f7917ca8ee264e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20=C3=96hrstr=C3=B6m?= Date: Fri, 12 May 2023 10:02:38 +0200 Subject: [PATCH] Reduce risk of slow test computer failing test. --- tests/test_logfile.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_logfile.sh b/tests/test_logfile.sh index e769d9e..8c4a8e1 100755 --- a/tests/test_logfile.sh +++ b/tests/test_logfile.sh @@ -51,7 +51,9 @@ then exit 1 fi -RES=$(cat $TEST/thelog2.txt | tr '\n' ' ' | tr -d ' ') +RES=$(cat $TEST/thelog2.txt | tr '\n' ' ' | tr -d ' ' | sed 's/|+1 /|+0 /g' ) + +# The sed replacement reduces the risk of a failing test when the second counter happens to flip within the test run. EXP=$(printf 'telegram=|A244EE4D785634123C067A8F000000_0C1348550000426CE1F14C130000000082046C21298C0413330000008D04931E3A3CFE3300000033000000330000003300000033000000330000003300000033000000330000003300000033000000330000004300000034180000046D0D0B5C2B03FD6C5E150082206C5C290BFD0F0200018C4079678885238310FD3100000082106C01018110FD610002FD66020002FD170000|+0 telegram=|A244EE4D111111113C077AAC000000_0C1389490000426CE1F14C130000000082046C21298C0413010000008D04931E3A3CFE0100000001000000010000000100000001000000010000000100000001000000010000000100000001000000010000001600000031130000046D0A0C5C2B03FD6C60150082206C5C290BFD0F0200018C4079629885238310FD3100000082106C01018110FD610002FD66020002FD170000|+0 telegram=|1E44AE4C9956341268077A36001000_2F2F0413181E0000023B00002F2F2F2F|+0 telegram=|1844AE4C4455223368077A55000000_041389E20100023B0000|+0' | tr '\n' ' ' | tr -d ' ')