public void CanLocateTestLibrary()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var lines = MacOSDependencyChecker.LaunchOtool(graphicsLib);

            Assert.That(lines, Is.Not.Null);
        }
        public void DependencyMapOfTestLibraryHasCorrectFilePath()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var dm = MacOSDependencyChecker.GetDependencies(graphicsLib);

            Assert.That(dm.file, Is.EqualTo(graphicsLib));
        }
Example #3
0
        public void MachineHasXCodeTools()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var areToolsInstalled = (MacOSDependencyChecker.IsXcodeToolInstalled("lipo") && MacOSDependencyChecker.IsXcodeToolInstalled("otool"));

            Assert.IsTrue(areToolsInstalled);
        }
        public void DependencyMapOfTestLibraryHasAllDependenciesExist()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var dm = MacOSDependencyChecker.GetDependencies(graphicsLib);

            using (new WorkingDirectoryShift(Path.GetDirectoryName(graphicsLib)))
                Assert.That(dm.dependencies, Has.All.Exist);
        }
        public void DependencyMapOfTestLibraryHasDependencies()
        {
            if (string.IsNullOrEmpty(MagicLeapRemoteImportSupport.sdkPath))
            {
                Assert.Ignore("Ignoring test because the environment is not properly configured");
            }
            var           dm        = MacOSDependencyChecker.GetDependencies(graphicsLib);
            Func <string> errorFunc = () => {
                var sb = new StringBuilder();
                sb.AppendFormat("wrong number of deps for {0}", dm.file);
                sb.AppendLine();
                foreach (var item in dm.dependencies)
                {
                    sb.AppendFormat("item: {0}", item);
                    sb.AppendLine();
                }
                return(sb.ToString());
            };

            Assert.That(dm.dependencies.Count, Is.GreaterThanOrEqualTo(4), errorFunc);
        }