Skip to content

Commit f52c940

Browse files
kapkelemastero
andauthored
[Chore] Add dev mode to build definition (#739)
Co-authored-by: Piotr Paradziński <[email protected]>
1 parent 6e3c185 commit f52c940

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

build.sbt

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ import scala.sys.process.Process
55
// Necessary for the nix build, please do not remove.
66
val nixBuild = sys.props.isDefinedAt("nix")
77

8+
// Enable dev mode: disable certain flags, etc.
9+
val mantisDev = sys.props.get("mantisDev").contains("true") || sys.env.get("MANTIS_DEV").contains("true")
10+
811
val commonSettings = Seq(
912
name := "mantis",
1013
version := "3.0",
@@ -64,12 +67,12 @@ val root = {
6467
libraryDependencies ++= dep
6568
)
6669
.settings(executableScriptName := name.value)
67-
.settings(inConfig(Integration)(Defaults.testSettings): _*)
68-
.settings(inConfig(Benchmark)(Defaults.testSettings): _*)
69-
.settings(inConfig(Evm)(Defaults.testSettings): _*)
70-
.settings(inConfig(Ets)(Defaults.testSettings): _*)
71-
.settings(inConfig(Snappy)(Defaults.testSettings): _*)
72-
.settings(inConfig(Rpc)(Defaults.testSettings): _*)
70+
.settings(inConfig(Integration)(Defaults.testSettings :+ (Test / parallelExecution := false)): _*)
71+
.settings(inConfig(Benchmark)(Defaults.testSettings :+ (Test / parallelExecution := false)): _*)
72+
.settings(inConfig(Evm)(Defaults.testSettings :+ (Test / parallelExecution := false)): _*)
73+
.settings(inConfig(Ets)(Defaults.testSettings :+ (Test / parallelExecution := false)): _*)
74+
.settings(inConfig(Snappy)(Defaults.testSettings :+ (Test / parallelExecution := false)): _*)
75+
.settings(inConfig(Rpc)(Defaults.testSettings :+ (Test / parallelExecution := false)): _*)
7376

7477
if (!nixBuild)
7578
root
@@ -97,7 +100,9 @@ scalacOptions in (Compile, console) ~= (_.filterNot(
97100
)
98101
))
99102

100-
Test / parallelExecution := false
103+
scalacOptions ~= (options => if (mantisDev) options.filterNot(_ == "-Xfatal-warnings") else options)
104+
105+
Test / parallelExecution := true
101106

102107
testOptions in Test += Tests.Argument("-oDG")
103108

0 commit comments

Comments
 (0)