Skip to content
Snippets Groups Projects
Commit 28295f7b authored by BinderDavid's avatar BinderDavid
Browse files

Remove tests/ subdirectory

The tests in the `tests` subdirectory are only run by the GHC testsuite.
Following ghc/ghc#22622 the tests
will be moved from the git submodule to the `testsuite/tests` directory
in GHC itself.
parent 3466b14d
No related branches found
No related tags found
No related merge requests found
Showing with 0 additions and 178 deletions
.hpc*/
*.o
*.hi
*.comp.std*
*.run.std*
*.eventlog
*.genscript
*.exe
# specific files
/T1780
/T3231
/T3994
/T4198
/T4889
/T8343
/process001
/process001.out
/process002
/process002.out
/process003
/process004
/process005
/process006
/process007
/process007.tmp
/process007_fd
/process008
/process009
/process010
/process011
# This Makefile runs the tests using GHC's testsuite framework. It
# assumes the package is part of a GHC build tree with the testsuite
# installed in ../../../testsuite.
TOP=../../../testsuite
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
.PHONY: process007_fd
process007_fd:
'$(TEST_HC)' -optc='-Wall' -no-hs-main -no-auto-link-packages process007_fd.c -o process007_fd
.PHONY: T3994app
T3994app:
'$(TEST_HC)' $(TEST_HC_OPTS) T3994app.hs -threaded
module Main where
import Control.Concurrent
import System.IO
import System.Process
launch :: String -> IO String
launch i = do (hin,hout,herr,ph) <- runInteractiveProcess "cat" [] Nothing Nothing
-- forkIO $ collect ph -- This doesn't seem to be relevant to the problem.
forkIO $ do hPutStr hin i
hClose hin
hGetContents hout
main :: IO ()
main = do o <- foldl (>>=) (return "foo") (replicate 5 launch)
t <- myThreadId
-- timeout
forkIO $ do threadDelay 5000000; killThread t
putStrLn o
foo
module Main (main) where
import Control.Concurrent
import System.IO
import System.Cmd
import System.Directory
main = do
hSetBuffering stdout NoBuffering
forkIO $ f "foo1.txt"
forkIO $ f "foo2.txt"
threadDelay $ 2*1000000
putStrLn "Finished successfully"
f file = do
h <- openFile file WriteMode
hPutStrLn h "fjkladsf"
system "sleep 1"
-- putChar '.'
hClose h
removeFile file
f file
Finished successfully
module Main where
import Control.Concurrent
import System.IO
import System.Process
main :: IO ()
main = do (_,Just hout,_,p) <- createProcess (proc "./T3994app" ["start", "10000"])
{ std_out = CreatePipe, create_group = True }
start <- hGetLine hout
putStrLn start
interruptProcessGroupOf p
t <- myThreadId
-- timeout
forkIO $ do
threadDelay 5000000
putStrLn "Interrupting a Running Process Failed"
hFlush stdout
killThread t
waitForProcess p
putStrLn "end"
return ()
start
end
module Main where
import Control.Concurrent
import System.Environment
main :: IO ()
main = do (str:time:_) <- getArgs
putStrLn str
threadDelay (read time)
return ()
import System.Process
import System.FilePath
main = system ("." </> "exitminus1") >>= print
ExitFailure 255
ExitFailure (-1)
module Main where
import System.Process
main :: IO ()
main = do
let text = unlines . map show $ [1..10000 :: Int]
(code, out, _) <- readProcessWithExitCode "head" ["-n", "1"] text
print code
putStr out
ExitSuccess
1
import System.Process
import System.Timeout
main = timeout 1000000 $ do -- The outer timeout shouldn't trigger
timeout 10000 $ print =<< readProcess "sleep" ["7200"] ""
putStrLn "Good!"
timeout 10000 $ print =<< readProcessWithExitCode "sleep" ["7200"] ""
putStrLn "Good!"
Good!
Good!
# This Makefile runs the tests using GHC's testsuite framework. It
# assumes the package is part of a GHC build tree with the testsuite
# installed in ../../../testsuite.
TOP=../../../../testsuite
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
.PHONY: T9775
T9775:
'$(TEST_CC)' $(TEST_CC_OPTS) ok.c -o ok.exe
'$(TEST_CC)' $(TEST_CC_OPTS) main.c -o main.exe
module Main where
import System.Process
main
= do (_,_,_,p) <- createProcess (proc "main" [])
waitForProcess p >>= print
ExitSuccess
bye bye
module Main where
import System.Process
main
= do (_,_,_,p) <- createProcess ((proc "main" []){ use_process_jobs = True })
waitForProcess p >>= print
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment