Skip to content

Commit dd71101

Browse files
committed
Revert "Split Flow and Hack regression tests to avoid CI timeout/OOM"
This reverts commit eb18ee4.
1 parent 9f15c80 commit dd71101

472 files changed

Lines changed: 12 additions & 12673 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

glean/glass/test/regression/Glean/Glass/Regression/Flow/Main.hs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
LICENSE file in the root directory of this source tree.
77
-}
88

9-
module Glean.Glass.Regression.Flow.Main (main) where
9+
module Glean.Glass.Regression.Flow.Main ( main ) where
1010

11-
import Glean.Indexer.Flow as Flow ( indexer )
12-
import Glean.Glass.Regression.Snapshot ( mainGlassSnapshotCLI )
11+
import System.Environment
12+
import qualified Glean.Glass.Regression.Flow as Glass
1313

1414
main :: IO ()
15-
main = mainGlassSnapshotCLI Flow.indexer (const [])
15+
main = getArgs >>= \args -> withArgs (args ++["--root", path, "--write-root", "test"]) $ Glass.main
16+
where
17+
path = "glean/lang/codemarkup/tests/flow/cases/xrefs"

glean/glass/test/regression/Glean/Glass/Regression/Hack/Main.hs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,12 @@
66
LICENSE file in the root directory of this source tree.
77
-}
88

9-
module Glean.Glass.Regression.Hack.Main (main) where
9+
module Glean.Glass.Regression.Hack.Main ( main ) where
1010

11-
import Glean.Indexer.Hack as Hack ( indexer )
12-
import Glean.Glass.Regression.Snapshot ( mainGlassSnapshotCLI )
11+
import System.Environment
12+
import qualified Glean.Glass.Regression.Hack as Glass
1313

1414
main :: IO ()
15-
main = mainGlassSnapshotCLI Hack.indexer (const [])
15+
main = getArgs >>= \args -> withArgs (["--root", path] ++ args) Glass.main
16+
where
17+
path = "glean/lang/codemarkup/tests/hack/cases/xrefs"

glean/glass/test/regression/lib/Glean/Glass/Regression/Snapshot.hs

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
module Glean.Glass.Regression.Snapshot (
1616
mainGlassSnapshot,
17-
mainGlassSnapshotCLI,
1817
mainGlassSnapshotGeneric,
1918
mainGlassSnapshotXLang,
2019
Output, Getter
@@ -41,7 +40,6 @@ import qualified Data.Map.Strict as Map
4140
import qualified Data.Yaml as Yaml
4241
import Util.List ( uniq )
4342
import Data.Either.Extra
44-
import System.IO.Unsafe ( unsafePerformIO )
4543

4644
import qualified Thrift.Protocol
4745
import qualified Thrift.Protocol.JSON as Thrift
@@ -122,51 +120,6 @@ mainGlassSnapshot testName testRoot indexer extras =
122120
mainGlassSnapshot_ testName testRoot
123121
(Glean.driverFromIndexer indexer) extras
124122

125-
-- | Like 'mainGlassSnapshot', but reads testName and testPath from
126-
-- command-line arguments (--test-name and --test-path).
127-
-- This allows a single module to be reused for multiple test targets.
128-
mainGlassSnapshotCLI
129-
:: Glean.Indexer opts
130-
-> (Getter -> [Test])
131-
-> IO ()
132-
mainGlassSnapshotCLI indexer extras =
133-
mainGlassSnapshotCLI_ (Glean.driverFromIndexer indexer) extras
134-
135-
-- | Configuration parsed from CLI for test name and path
136-
data TestPathConfig = TestPathConfig
137-
{ tpcTestName :: String
138-
, tpcTestPath :: FilePath
139-
}
140-
141-
testPathConfigParser :: Parser TestPathConfig
142-
testPathConfigParser = TestPathConfig
143-
<$> strOption
144-
( long "test-name"
145-
<> metavar "NAME"
146-
<> help "Name for the test suite" )
147-
<*> strOption
148-
( long "test-path"
149-
<> metavar "PATH"
150-
<> help "Path to test directory containing .query files" )
151-
152-
mainGlassSnapshotCLI_
153-
:: Glean.Driver opts
154-
-> (Getter -> [Test])
155-
-> IO ()
156-
mainGlassSnapshotCLI_ driver extras = do
157-
withOutput cfgOutput $ \temp ->
158-
mainTestIndexGeneric driver combinedParser "" $
159-
\(snapConfig, TestPathConfig{..}) _ config _ get ->
160-
let qs = unsafePerformIO $ findQueries tpcTestPath
161-
in TestList $ testAll snapConfig config temp qs get : extras get
162-
where
163-
cfgOutput = Nothing
164-
165-
combinedParser = (,) <$> configParser <*> testPathConfigParser
166-
167-
withOutput (Just out) f = f out
168-
withOutput Nothing f = withSystemTempDirectory "glass-test" f
169-
170123
mainGlassSnapshotGeneric
171124
:: String
172125
-> FilePath

glean/glass/test/regression/tests/flow/describe/describeSymbol.out renamed to glean/glass/test/regression/tests/flow/describeSymbol.out

File renamed without changes.

glean/glass/test/regression/tests/flow/describe/describeSymbol.query renamed to glean/glass/test/regression/tests/flow/describeSymbol.query

File renamed without changes.

glean/glass/test/regression/tests/flow/describe/describeSymbol_1.out renamed to glean/glass/test/regression/tests/flow/describeSymbol_1.out

File renamed without changes.

glean/glass/test/regression/tests/flow/describe/describeSymbol_1.query renamed to glean/glass/test/regression/tests/flow/describeSymbol_1.query

File renamed without changes.

glean/glass/test/regression/tests/flow/describe/describeSymbol_10.out renamed to glean/glass/test/regression/tests/flow/describeSymbol_10.out

File renamed without changes.

glean/glass/test/regression/tests/flow/describe/describeSymbol_10.query renamed to glean/glass/test/regression/tests/flow/describeSymbol_10.query

File renamed without changes.

glean/glass/test/regression/tests/flow/describe/describeSymbol_11.out renamed to glean/glass/test/regression/tests/flow/describeSymbol_11.out

File renamed without changes.

0 commit comments

Comments
 (0)