Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
eed3si9n committed Oct 6, 2024
1 parent 66928e6 commit 3fc3b2d
Show file tree
Hide file tree
Showing 14 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions src/sbt-test/caching/caching/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ lazy val root = (project in file(".")).
},
TaskKey[Unit]("check") := {
val process = sys.process.Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString))
val out = (process!!)
val out = process.!!
if (out.trim != "hello") sys.error("unexpected output: " + out)
()
},
TaskKey[Unit]("checkfoo") := {
val process = sys.process.Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString))
val out = (process!!)
val out = process.!!
if (out.trim != "foo.txt") sys.error("unexpected output: " + out)
()
},
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/caching/custommergestrat/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ lazy val testmerge = (project in file(".")).
version := "0.1",
assembly / assemblyJarName := "foo.jar",
TaskKey[Unit]("check") := {
IO.withTemporaryDirectory { dir
IO.withTemporaryDirectory { dir =>
IO.unzip(crossTarget.value / "foo.jar", dir)
mustContain(dir / "sbtassembly", Seq("reversed"))
}
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/merging/custommergestrat/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ lazy val testmerge = (project in file(".")).
version := "0.1",
assembly / assemblyJarName := "foo.jar",
TaskKey[Unit]("check") := {
IO.withTemporaryDirectory { dir
IO.withTemporaryDirectory { dir =>
IO.unzip(crossTarget.value / "foo.jar", dir)
mustContain(dir / "some-other-target", Seq("I should exist"))
mustContain(dir / "sbtassembly" / "file.txt", Seq("test file"))
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/merging/merging/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ lazy val testmerge = (project in file("."))
.settings(
assembly / assemblyJarName := "foo.jar",
TaskKey[Unit]("check") := {
IO.withTemporaryDirectory { dir
IO.withTemporaryDirectory { dir =>
IO.unzip(crossTarget.value / "foo.jar", dir)
mustContain(dir / "a", Seq("1", "2", "1", "3"))
mustContain(dir / "b", Seq("1"))
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/merging/rename/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ lazy val testmerge = (project in file(".")).settings(
version := "0.1",
assembly / assemblyJarName := "foo.jar",
TaskKey[Unit]("check") := {
IO.withTemporaryDirectory { dir
IO.withTemporaryDirectory { dir =>
IO.unzip(crossTarget.value / "foo.jar", dir)
mustContain(dir / "b", Seq("a", "b", "c", "d"))
mustContain(dir / "a", Seq("e"))
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-assembly/config/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lazy val root = (project in file("."))
Test / assembly / assemblyJarName := "foo.jar",
TaskKey[Unit]("check") := {
val process = sys.process.Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString))
val out = (process!!)
val out = process.!!
if (out.trim != "hellospec") sys.error("unexpected output: " + out)
()
}
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-assembly/deps/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ lazy val root = (project in file("."))
assembly / assemblyJarName := "foo.jar",
TaskKey[Unit]("check") := {
val process = sys.process.Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString))
val out = (process!!)
val out = process.!!
if (out.trim != "hello") sys.error("unexpected output: " + out)
()
}
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-assembly/main-class/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ lazy val root = (project in file(".")).
assembly / assemblyJarName := "foo.jar",
TaskKey[Unit]("check") := {
val process = sys.process.Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString))
val out = (process!!)
val out = process.!!
if (out.trim != "hello") sys.error("unexpected output: " + out)
()
}
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/sbt-assembly/piecemeal/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ lazy val root = (project in file("."))
val process = sys.process.Process("java", Seq("-cp",
(crossTarget.value / "foo-assembly-0.1.jar").toString,
"Main"))
val out = (process!!)
val out = process.!!
if (out.trim != "hello") sys.error("unexpected output: " + out)
()
},
Expand All @@ -28,7 +28,7 @@ lazy val root = (project in file("."))
(if (scala.util.Properties.isWin) ";" else ":") +
(crossTarget.value / "foo-assembly-0.1.jar").toString,
"Main"))
val out = (process!!)
val out = process.!!
if (out.trim != "hello") sys.error("unexpected output: " + out)
()
}
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-assembly/simple/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ lazy val root = (project in file("."))
assemblyJarName := "foo.jar",
TaskKey[Unit]("check") := {
val process = sys.process.Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString))
val out = (process!!)
val out = process.!!
if (out.trim != "hello") sys.error("unexpected output: " + out)
()
}
Expand Down
2 changes: 1 addition & 1 deletion src/sbt-test/sbt-assembly/simple/test
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# check if the file gets created
> assembly
$ exists target/scala-2.12/foo.jar
# $ exists target/scala-2.12/foo.jar

# check if it says hello
> check
2 changes: 1 addition & 1 deletion src/sbt-test/shading/keeponly/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lazy val testkeep = (project in file(".")).
ShadeRule.keep("keep.**").inProject
),
TaskKey[Unit]("check") := {
IO.withTemporaryDirectory { dir
IO.withTemporaryDirectory { dir =>
IO.unzip(crossTarget.value / "foo.jar", dir)
mustNotExist(dir / "removed" / "ShadeClass.class")
mustNotExist(dir / "removed" / "ShadePackage.class")
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/shading/shading/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ lazy val testshade = (project in file(".")).
),
// logLevel in assembly := Level.Debug,
TaskKey[Unit]("check") := {
IO.withTemporaryDirectory { dir
IO.withTemporaryDirectory { dir =>
IO.unzip(crossTarget.value / "foo.jar", dir)
mustNotExist(dir / "remove" / "Removed.class")
mustNotExist(dir / "org" / "apache" / "commons" / "io" / "ByteOrderMark.class")
Expand All @@ -21,7 +21,7 @@ lazy val testshade = (project in file(".")).
mustExist(dir / "shadeio" / "ByteOrderMark.class")
}
val process = sys.process.Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString))
val out = (process!!)
val out = process.!!
if (out.trim != "hello shadeio.filefilter.AgeFileFilter") sys.error("unexpected output: " + out)
()
})
Expand Down
4 changes: 2 additions & 2 deletions src/sbt-test/shading/unmanagedjars/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ lazy val testshade = (project in file(".")).
),
// logLevel in assembly := Level.Debug,
TaskKey[Unit]("check") := {
IO.withTemporaryDirectory { dir
IO.withTemporaryDirectory { dir =>
IO.unzip(crossTarget.value / "foo.jar", dir)
mustNotExist(dir / "remove" / "Removed.class")
mustNotExist(dir / "org" / "apache" / "commons" / "io" / "ByteOrderMark.class")
Expand All @@ -24,7 +24,7 @@ lazy val testshade = (project in file(".")).
mustExist(dir / "shadeio" / "ByteOrderMark.class")
}
val process = sys.process.Process("java", Seq("-jar", (crossTarget.value / "foo.jar").toString))
val out = (process!!)
val out = process.!!
if (out.trim != "hello shadeio.filefilter.AgeFileFilter") sys.error("unexpected output: " + out)
()
})
Expand Down

0 comments on commit 3fc3b2d

Please sign in to comment.