Esempio n. 1
0
    def test_get_file_path(self):
        cts_file = 'test.this_is_cts'
        invoker_label = "//sdk/cts/build:verify_cts_deps_test"
        deps = ['//zircon/system/ulib/zxtest:zxtest']
        allowed_cts_dirs = ['//sdk/*']
        with TemporaryDirectory() as root_build_dir:
            sdk_manifests = [
                self.create_empty_sdk_manifest(root_build_dir, "core")
            ]
            cts_element = VerifyCtsDeps(
                root_build_dir, cts_file, invoker_label, deps, deps,
                allowed_cts_dirs, sdk_manifests)

            dep = '//zircon/system/ulib/zxtest:zxtest'
            self.assertEqual(
                root_build_dir +
                '/cts/zircon/system/ulib/zxtest/zxtest.this_is_cts',
                cts_element.get_file_path(dep))

            dep = '//zircon/system/ulib/zxtest'
            self.assertEqual(
                root_build_dir +
                '/cts/zircon/system/ulib/zxtest/zxtest.this_is_cts',
                cts_element.get_file_path(dep))

            dep = '//sdk'
            self.assertEqual(
                root_build_dir + '/cts/sdk/sdk.this_is_cts',
                cts_element.get_file_path(dep))
Esempio n. 2
0
    def test_get_file_path(self):
        root_build_dir = os.getcwd()
        cts_file = 'test.this_is_cts'
        invoker_label = "//sdk/cts/build:verify_cts_deps_test"
        deps = ['//zircon/public/lib/zxtest:zxtest']
        cts_element = VerifyCtsDeps(root_build_dir, cts_file, invoker_label,
                                    deps)

        dep = '//zircon/public/lib/zxtest:zxtest'
        self.assertEqual(
            root_build_dir +
            '/cts/zircon/public/lib/zxtest/zxtest.this_is_cts',
            cts_element.get_file_path(dep))

        dep = '//zircon/public/lib/zxtest'
        self.assertEqual(
            root_build_dir +
            '/cts/zircon/public/lib/zxtest/zxtest.this_is_cts',
            cts_element.get_file_path(dep))

        dep = '//sdk'
        self.assertEqual(root_build_dir + '/cts/sdk/sdk.this_is_cts',
                         cts_element.get_file_path(dep))