This commit is contained in:
voidlizard 2025-08-26 07:31:35 +03:00
parent 4b59cbceff
commit 82b2fa1770
3 changed files with 183 additions and 190 deletions

20
.gitignore vendored
View File

@ -1,16 +1,6 @@
dist-newstyle .fixme-new/refchan.local
.direnv/ dist-newstyle/
.fixme/state.db
result
# VS Code
settings.json
cabal.project.local
*.key
.backup/
.hbs2-git/
bin/ bin/
.fixme-new/current-stage.log .direnv/
.hbs2-sync/ .hbs2-git3/

View File

@ -19,6 +19,7 @@ import Data.Config.Suckless.Script as SC
import Data.Config.Suckless.System import Data.Config.Suckless.System
import NCQTestCommon import NCQTestCommon
import Tee
import Lens.Micro.Platform import Lens.Micro.Platform
import Data.Either import Data.Either
@ -341,6 +342,8 @@ ncq3EnduranceTest = do
, "test:ncq3:endurance:inner", testEnvDir , "test:ncq3:endurance:inner", testEnvDir
] & setStdin createPipe & setStdout createPipe ] & setStdin createPipe & setStdout createPipe
withTeeLogging ( testEnvDir </> "test.log") do
ncqWithStorage testEnvDir $ \sto -> do ncqWithStorage testEnvDir $ \sto -> do
replicateM_ wSeed do replicateM_ wSeed do
n <- liftIO $ uniformRM (1, wMaxBlk) g n <- liftIO $ uniformRM (1, wMaxBlk) g
@ -497,7 +500,7 @@ ncq3EnduranceTest = do
EnduranceExit -> do EnduranceExit -> do
toConsole inp "exit" toConsole inp "exit"
debug $ yellow "inner process stopped?" debug $ yellow "inner process stopped?"
liftIO $ race (pause @'Seconds 1) (waitExitCode p) >>= \case liftIO $ race (pause @'Seconds 30) (waitExitCode p) >>= \case
Right{} -> none Right{} -> none
Left{} -> do Left{} -> do
debug $ red "force inner process to stop" debug $ red "force inner process to stop"

View File

@ -82,7 +82,7 @@ stripANSI = go
case BS.uncons s of case BS.uncons s of
Nothing -> BS.empty Nothing -> BS.empty
Just (c1, r1) Just (c1, r1)
| c1 == lbr -> go (BS.drop1 $ dropCSI r1) -- ESC [ | c1 == lbr -> go (BS.drop 1 $ dropCSI r1) -- ESC [
| c1 == rbr -> go (dropOSC r1) -- ESC ] | c1 == rbr -> go (dropOSC r1) -- ESC ]
| otherwise -> go r1 -- Прочие короткие ESC-послед. | otherwise -> go r1 -- Прочие короткие ESC-послед.