diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-12-12 16:56:02 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-12 16:56:02 -0800 |
commit | 9ba4cb69331386dfde9bac69dc2d5b22401face3 (patch) | |
tree | 120349e8015ae5717d36bd44209cde6ff9543518 /integration/test/src/IntegrationTestSuite.scala | |
parent | ea7fceb6e56f53bde3517586dfc57e10a605a524 (diff) | |
download | mill-9ba4cb69331386dfde9bac69dc2d5b22401face3.tar.gz mill-9ba4cb69331386dfde9bac69dc2d5b22401face3.tar.bz2 mill-9ba4cb69331386dfde9bac69dc2d5b22401face3.zip |
collapse boilerplate folder structure within src/ folders (#505)
* collapse boilerplate folder structure within src/ folders
* .
Diffstat (limited to 'integration/test/src/IntegrationTestSuite.scala')
-rw-r--r-- | integration/test/src/IntegrationTestSuite.scala | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/integration/test/src/IntegrationTestSuite.scala b/integration/test/src/IntegrationTestSuite.scala new file mode 100644 index 00000000..ca041eea --- /dev/null +++ b/integration/test/src/IntegrationTestSuite.scala @@ -0,0 +1,28 @@ +package mill.integration + +import mill.util.ScriptTestSuite +import utest._ + +abstract class IntegrationTestSuite(repoKey: String, val workspaceSlug: String, fork: Boolean) + extends ScriptTestSuite(fork){ + val buildFilePath = os.pwd / 'integration / 'test / 'resources / workspaceSlug + def scriptSourcePath = { + // The unzipped git repo snapshots we get from github come with a + // wrapper-folder inside the zip file, so copy the wrapper folder to the + // destination instead of the folder containing the wrapper. + + val path = sys.props(repoKey) + val Seq(wrapper) = os.list(os.Path(path)) + wrapper + } + + def buildFiles: Seq[os.Path] = os.walk(buildFilePath) + + override def initWorkspace() = { + super.initWorkspace() + buildFiles.foreach { file => + os.copy.over(file, workspacePath / file.last) + } + assert(!os.walk(workspacePath).exists(_.ext == "class")) + } +} |