Skip to content

Commit 93cef0f

Browse files
committed
Move the sbt project to the project root
1 parent 3f6318e commit 93cef0f

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

tests/build.sbt renamed to build.sbt

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,24 @@ inThisBuild(
1212
)
1313
))
1414

15-
val `scala-native-bindgen-tests` = project
16-
.in(file("."))
15+
val tests = project
16+
.in(file("tests"))
1717
.aggregate(samples)
1818
.settings(
1919
fork in Test := true,
20-
javaOptions in Test += "-Dbindgen.path=" + file(
21-
"../bindgen/target/scala-native-bindgen"),
20+
javaOptions in Test += {
21+
val rootDir = (ThisBuild / baseDirectory).value
22+
s"-Dbindgen.path=$rootDir/bindgen/target/scala-native-bindgen"
23+
},
2224
watchSources += WatchSource(
23-
baseDirectory.value / "samples",
25+
baseDirectory.value / "tests" / "samples",
2426
"*.h" || "*.scala",
2527
NothingFilter
2628
),
2729
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % Test
2830
)
2931

3032
lazy val samples = project
33+
.in(file("tests/samples"))
3134
.enablePlugins(ScalaNativePlugin)
3235
.settings(test := (compile in Compile).value)
File renamed without changes.
File renamed without changes.

scripts/test.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,4 @@ if [[ ! -e bindgen/target/.llvm-version ]] || [[ "$(<bindgen/target/.llvm-versio
1313
fi
1414

1515
make -C bindgen/target
16-
17-
cd tests
1816
sbt "${@:-test}"

tests/src/test/scala/org/scalanative/bindgen/BindgenSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class BindgenSpec extends FunSpec {
1515
outputDir.mkdirs()
1616

1717
it("should exist") {
18-
assert(new File(bindgenPath).exists)
18+
assert(new File(bindgenPath).exists, s"$bindgenPath does not exist")
1919
}
2020

2121
def bindgen(inputFile: File, name: String, outputFile: File): Unit = {

0 commit comments

Comments
 (0)