MCPcopy Index your code
hub / github.com/kivy/python-for-android / setUp

Method setUp

tests/test_archs.py:50–71  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

48 TEST_ARCH = 'armeabi-v7a'
49
50 def setUp(self):
51 self.ctx = Context()
52 self.ctx.ndk_api = 21
53 self.ctx.android_api = 27
54 self.ctx._sdk_dir = "/opt/android/android-sdk"
55 self.ctx._ndk_dir = "/opt/android/android-ndk"
56 self.ctx.ndk = AndroidNDK(self.ctx._ndk_dir)
57 self.ctx.setup_dirs(os.getcwd())
58 self.ctx.bootstrap = Bootstrap().get_bootstrap("sdl2", self.ctx)
59 self.ctx.bootstrap.distribution = Distribution.get_distribution(
60 self.ctx,
61 name="sdl2",
62 recipes=["python3", "kivy"],
63 archs=[self.TEST_ARCH],
64 )
65 self.ctx.python_recipe = Recipe.get_recipe("python3", self.ctx)
66 # Here we define the expected compiler, which, as per ndk >= r19,
67 # should be the same for all the tests (no more gcc compiler)
68 self.expected_compiler = (
69 f"/opt/android/android-ndk/toolchains/"
70 f"llvm/prebuilt/{self.ctx.ndk.host_tag}/bin/clang"
71 )
72
73
74class TestArch(ArchSetUpBaseClass, unittest.TestCase):

Callers

nothing calls this directly

Calls 7

ContextClass · 0.90
AndroidNDKClass · 0.90
BootstrapClass · 0.90
setup_dirsMethod · 0.80
get_bootstrapMethod · 0.80
get_distributionMethod · 0.80
get_recipeMethod · 0.80

Tested by

no test coverage detected