Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-enabled test (in the hope it will work in Github Actions) #1060

Merged
merged 1 commit into from
Dec 9, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 25 additions & 28 deletions contrib/scalapblib/test/src/TutorialTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -78,34 +78,30 @@ object TutorialTests extends TestSuite {
}
}

// 'compileScalaPB - {
// // Broken in Travis due to
// // protoc-jar: caught exception, retrying: java.io.IOException:
// // Cannot run program "/dev/null": error=13, Permission denied
//
// 'calledDirectly - workspaceTest(Tutorial) { eval =>
// val Right((result, evalCount)) = eval.apply(Tutorial.core.compileScalaPB)
//
// val outPath = protobufOutPath(eval)
//
// val outputFiles = os.walk(result.path).filter(os.isFile)
//
// val expectedSourcefiles = compiledSourcefiles.map(outPath / _)
//
// assert(
// result.path == eval.outPath / 'core / 'compileScalaPB / 'dest,
// outputFiles.nonEmpty,
// outputFiles.forall(expectedSourcefiles.contains),
// outputFiles.size == 5,
// evalCount > 0
// )
//
// // don't recompile if nothing changed
// val Right((_, unchangedEvalCount)) = eval.apply(Tutorial.core.compileScalaPB)
//
// assert(unchangedEvalCount == 0)
// }
//
"compileScalaPB" - {
"calledDirectly" - workspaceTest(Tutorial) { eval =>
val Right((result, evalCount)) = eval.apply(Tutorial.core.compileScalaPB)

val outPath = protobufOutPath(eval)

val outputFiles = os.walk(result.path).filter(os.isFile)

val expectedSourcefiles = compiledSourcefiles.map(outPath / _)

assert(
result.path == eval.outPath / 'core / 'compileScalaPB / 'dest,
outputFiles.nonEmpty,
outputFiles.forall(expectedSourcefiles.contains),
outputFiles.size == 5,
evalCount > 0
)

// don't recompile if nothing changed
val Right((_, unchangedEvalCount)) = eval.apply(Tutorial.core.compileScalaPB)

assert(unchangedEvalCount == 0)
}

// // This throws a NullPointerException in coursier somewhere
// //
// // 'triggeredByScalaCompile - workspaceTest(Tutorial) { eval =>
Expand All @@ -130,6 +126,7 @@ object TutorialTests extends TestSuite {
// // assert(unchangedEvalCount == 0)
// // }
// }
}

'useExternalProtocCompiler - {
/* This ensure that the `scalaPBProtocPath` is properly used.
Expand Down