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

Added a relative path for archives repo to MagicTest #588

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
5 changes: 4 additions & 1 deletion src/test/preamble.scala
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ abstract class Test(val archivepath: String,
*/
object MagicTest {
lazy private val home = File(System.getProperty("user.home"))
lazy private val currentContext = File(System.getProperty("user.dir")) // <your path>\MMT\src

/** the root for archives to use */
lazy val archiveRoot: File = {
Expand All @@ -104,7 +105,9 @@ object MagicTest {
// John
home / "Documents" / "mmt_and_archives" / "archives",
// alexander
home / "Dokumente" / "Studium" / "MMTWorkspace"/"MMT"
home / "Dokumente" / "Studium" / "MMTWorkspace"/"MMT",
// relative path to archives repo next to MMT repo
currentContext.up.up / "archives"
).find(_.exists).getOrElse(throw GeneralError("MagicTest failed: No known archive root"))
}

Expand Down