From dedf32848460c77d25a9e180e41fe8dd74ee49d1 Mon Sep 17 00:00:00 2001 From: Matthew Pickering Date: Tue, 22 Feb 2022 16:57:03 +0000 Subject: testsuite: Normalise output of ghci011 and T7627 The outputs of these tests vary on the order interface files are loaded so we normalise the output to correct for these inconsequential differences. Fixes #21121 --- testsuite/tests/ghci/scripts/all.T | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T index 3745d30bf4..e35d3b804d 100755 --- a/testsuite/tests/ghci/scripts/all.T +++ b/testsuite/tests/ghci/scripts/all.T @@ -1,5 +1,9 @@ # coding=utf8 +def sort_output(str): + return '\n'.join(sorted(str.splitlines())) + + # Note [Disabling ghci-leak-check] # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # The -fno-ghci-leak-check is because this test prints the current GHC settings @@ -27,7 +31,8 @@ test('ghci009', combined_output, ghci_script, ['ghci009.script']) # has a ^C handler installed. test('ghci010', skip, ghci_script, ['ghci010.script']) -test('ghci011', normal, ghci_script, ['ghci011.script']) +#See #21121 for why this output is normalised. +test('ghci011', [normalise_fun(sort_output)], ghci_script, ['ghci011.script']) test('ghci012', normal, ghci_script, ['ghci012.script']) test('ghci013', normal, ghci_script, ['ghci013.script']) @@ -158,7 +163,7 @@ test('ghci058', [extra_files(['../shell.hs']), ghci_script, ['ghci058.script']) test('T7587', normal, ghci_script, ['T7587.script']) test('T7688', normal, ghci_script, ['T7688.script']) -test('T7627', normal, ghci_script, ['T7627.script']) +test('T7627', [normalise_fun(sort_output)], ghci_script, ['T7627.script']) test('T7627b', normal, ghci_script, ['T7627b.script']) test('T7586', normal, ghci_script, ['T7586.script']) test('T4175', normal, ghci_script, ['T4175.script']) -- cgit v1.2.1