Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
9999years committed Dec 19, 2024
1 parent 97a94a7 commit 298df94
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,13 +245,13 @@ jobs:
run: |
set +e
rc=0
tests="lib-tests lib-suite cli-tests cli-suite"
tests="cli-suite"
if [ "${{ matrix.ghc }}" = "${{ env.GHC_FOR_SOLVER_BENCHMARKS }}" ]; then
tests="$tests solver-benchmarks-tests solver-benchmarks-run"
fi
for test in $tests; do
echo Validate "$test"
sh validate.sh $FLAGS -s "$test" || rc=1
sh validate.sh $FLAGS -s "$test" --tasty-arg "PackageTests/IndexCabalFileParseError/cabal.test.hs" || rc=1
echo End "$test"
done
exit $rc
Expand Down
23 changes: 22 additions & 1 deletion cabal-testsuite/src/Test/Cabal/OutputNormalizer.hs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,29 @@ import Data.Array ((!))

import qualified Data.Foldable as F

import System.IO.Unsafe

normalizeOutput :: NormalizerEnv -> String -> String
normalizeOutput nenv =
normalizeOutput nenv input =
let output = normalizeOutput' nenv input
in seq
(unsafePerformIO $ do
putStrLn $ "===================START===================================="
putStrLn $ "normalizerTmpDir: " <> normalizerTmpDir nenv
putStrLn $ "normalizerCanonicalTmpDir: " <> normalizerCanonicalTmpDir nenv

putStrLn $ "-------------------START------------------------------------"
putStrLn $ "input: " <> input
putStrLn $ "-------------------MID--------------------------------------"
putStrLn $ "output: " <> output
putStrLn $ "-------------------END--------------------------------------"
putStrLn $ "===================END======================================"
)
output
{-# NOINLINE normalizeOutput #-}

normalizeOutput' :: NormalizerEnv -> String -> String
normalizeOutput' nenv =
-- Normalize backslashes to forward slashes to normalize
-- file paths
map (\c -> if c == '\\' then '/' else c)
Expand Down

0 comments on commit 298df94

Please sign in to comment.