From 2a6757bf19cb670627c2b98dcf08121a495841d9 Mon Sep 17 00:00:00 2001 From: bessw <56679598+bessw@users.noreply.github.com> Date: Fri, 5 May 2023 13:06:19 +0000 Subject: [PATCH] Added a relative path for archives repo to MagicTest Added a relative path to MagicTest to search the archives repo next to the MMT repo without having to configure anything. for example: your/folder/path/MMT your/folder/path/archives your/folder/path/UFrameIT --- src/test/preamble.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/test/preamble.scala b/src/test/preamble.scala index 52cac2984d..bab4f62db9 100644 --- a/src/test/preamble.scala +++ b/src/test/preamble.scala @@ -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")) // \MMT\src /** the root for archives to use */ lazy val archiveRoot: File = { @@ -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")) }