This commit is contained in:
Rolf Bjarne Kvinge 2019-02-11 11:26:05 +01:00
Родитель 5385f44021
Коммит 6b24fa2018
3 изменённых файлов: 0 добавлений и 77 удалений

Просмотреть файл

@ -12,17 +12,6 @@ namespace Xamarin.Tests
[TestFixture] [TestFixture]
public class Introspection public class Introspection
{ {
// [TestFixtureSetUp]
public void Setup ()
{
#if !JENKINS
Console.Error.WriteLine ($"NOT ON JENKINS!");
#endif
var asm = Assembly.GetExecutingAssembly ();
Console.Error.WriteLine ($"ASM: {asm}");
}
public static string RootDirectory => Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location); public static string RootDirectory => Path.GetDirectoryName (Assembly.GetExecutingAssembly ().Location);
void AssertShouldExist (string name) void AssertShouldExist (string name)
@ -111,17 +100,13 @@ namespace Xamarin.Tests
return; return;
} }
Console.Error.WriteLine ($"TEST!");
mono_native_initialize (); mono_native_initialize ();
Console.Error.WriteLine ($"TEST #1!");
var dylib = Dlfcn.dlopen (libname, 0); var dylib = Dlfcn.dlopen (libname, 0);
Console.Error.WriteLine ($"DYLIB: {libname} - {dylib}");
Assert.That (dylib, Is.Not.EqualTo (IntPtr.Zero), "dlopen()ed mono-native"); Assert.That (dylib, Is.Not.EqualTo (IntPtr.Zero), "dlopen()ed mono-native");
try { try {
var symbol = Dlfcn.dlsym (dylib, "mono_native_initialize"); var symbol = Dlfcn.dlsym (dylib, "mono_native_initialize");
Console.Error.WriteLine ($"SYMBOL: {symbol}");
Assert.That (symbol, Is.Not.EqualTo (IntPtr.Zero), "dlsym() found mono_native_initialize()"); Assert.That (symbol, Is.Not.EqualTo (IntPtr.Zero), "dlsym() found mono_native_initialize()");
} finally { } finally {
Dlfcn.dlclose (dylib); Dlfcn.dlclose (dylib);
@ -131,36 +116,6 @@ namespace Xamarin.Tests
[DllImport ("System.Native")] [DllImport ("System.Native")]
extern static void mono_native_initialize (); extern static void mono_native_initialize ();
void DumpDirectory (string dir)
{
Console.Error.WriteLine ($"DUMP DIRECTORY: {dir}");
DumpDirectory (dir, string.Empty, Path.GetFileName (dir));
}
void DumpDirectory (string dir, string indent, string prefix)
{
Console.Error.WriteLine ($"{indent}- {prefix}");
foreach (var subdir in Directory.GetDirectories (dir)) {
var name = Path.Combine (prefix, Path.GetFileName (subdir));
DumpDirectory (subdir, indent + " ", name);
}
foreach (var file in Directory.GetFiles (dir)) {
var name = Path.Combine (prefix, Path.GetFileName (file));
Console.Error.WriteLine ($"{indent} * {name}");
}
}
[Test]
public void MartinTest ()
{
var linkMode = MonoNativeConfig.LinkMode;
Console.Error.WriteLine ($"LINK MODE: {linkMode}");
Console.Error.WriteLine ($"ROOT DIR: {RootDirectory}");
// DumpDirectory (RootDirectory);
}
[Test] [Test]
public void TestInvoke () public void TestInvoke ()
{ {

Просмотреть файл

@ -1,30 +0,0 @@
PLATFORM=ios
ifdef COMPAT
PROFILE=devcompat
else
PROFILE=devunified
endif
all:
make -C ../ build-$(PLATFORM)-$(PROFILE)-monotouch-test
clean:
make -C ../ clean-$(PLATFORM)-$(PROFILE)-monotouch-test
install:
make -C ../ install-$(PLATFORM)-$(PROFILE)-monotouch-test
exec:
make -C ../ exec-$(PLATFORM)-$(PROFILE)-monotouch-test
# check that all files
check-files:
@grep "Compile Include" monotouch-test.csproj | sed 's/.*Compile Include="//' | sed 's/".*//' | grep -v "^[.][.]" | sed 's_\\_/_' | sort > csproj-files
@ls -1 *.cs */*.cs | sort > cs-files
@if ! diff -u csproj-files cs-files; then \
echo "There are test files not included in monotouch-test.csproj"; \
rm -f csproj-files cs-files; \
exit 1; \
fi
@rm -f csproj-files cs-files

Просмотреть файл

@ -15,8 +15,6 @@ namespace Xamarin.Tests
var type = MonoNativePlatform.GetPlatformType (); var type = MonoNativePlatform.GetPlatformType ();
Assert.That ((int)type, Is.GreaterThan (0), "platform type"); Assert.That ((int)type, Is.GreaterThan (0), "platform type");
Console.Error.WriteLine ($"NATIVE PLATFORM TYPE: {type}");
var usingCompat = (type & MonoNativePlatformType.MONO_NATIVE_PLATFORM_TYPE_COMPAT) != 0; var usingCompat = (type & MonoNativePlatformType.MONO_NATIVE_PLATFORM_TYPE_COMPAT) != 0;
Assert.AreEqual (MonoNativeConfig.UsingCompat, usingCompat, "using compatibility layer"); Assert.AreEqual (MonoNativeConfig.UsingCompat, usingCompat, "using compatibility layer");
} }