-
-
Notifications
You must be signed in to change notification settings - Fork 370
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow users to pass a custom output dir on the command-line
- Loading branch information
1 parent
b06486c
commit b5768b4
Showing
10 changed files
with
108 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package build | ||
|
||
import mill._ | ||
import mill.scalalib._ | ||
|
||
object `package` extends RootModule with ScalaModule { | ||
def scalaVersion = scala.util.Properties.versionNumberString | ||
} |
41 changes: 41 additions & 0 deletions
41
integration/feature/output-directory/src/OutputDirectoryTests.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package mill.integration | ||
|
||
import mill.main.client.OutFiles | ||
import mill.testkit.UtestIntegrationTestSuite | ||
import utest._ | ||
|
||
object OutputDirectoryTests extends UtestIntegrationTestSuite { | ||
|
||
def tests: Tests = Tests { | ||
test("Output directory sanity check") - integrationTest { tester => | ||
import tester._ | ||
eval("__.compile").isSuccess ==> true | ||
val defaultOutDir = workspacePath / OutFiles.defaultOut | ||
assert(os.isDir(defaultOutDir)) | ||
} | ||
|
||
test("Output directory elsewhere in workspace") - integrationTest { tester => | ||
import tester._ | ||
eval( | ||
"__.compile", | ||
env = millTestSuiteEnv + ("MILL_OUTPUT" -> "testing/test-out") | ||
).isSuccess ==> true | ||
val expectedOutDir = workspacePath / "testing/test-out" | ||
val defaultOutDir = workspacePath / OutFiles.defaultOut | ||
assert(os.isDir(expectedOutDir)) | ||
assert(!os.exists(defaultOutDir)) | ||
} | ||
|
||
test("Output directory outside workspace") - integrationTest { tester => | ||
import tester._ | ||
val outDir = os.temp.dir() / "tmp-out" | ||
eval( | ||
"__.compile", | ||
env = millTestSuiteEnv + ("MILL_OUTPUT" -> outDir.toString) | ||
).isSuccess ==> true | ||
val defaultOutDir = workspacePath / OutFiles.defaultOut | ||
assert(os.isDir(outDir)) | ||
assert(!os.exists(defaultOutDir)) | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters