Skip to content
Snippets Groups Projects
Commit b989abb3 authored by Walter Lozano's avatar Walter Lozano
Browse files

Drop application bundle support


With the new application framework, the application bundle is now
implemented using Flatpak, so drop this functionality from ADE.
Keep the sysroot management functionality as well as the
possibility of compile standard applications like dash.

Signed-off-by: default avatarWalter Lozano <walter.lozano@collabora.com>
parent a045a5c5
No related branches found
No related tags found
2 merge requests!19Backport v2022 <- v2023dev1 Drop application bundle support,!18Drop application bundle support
......@@ -22,7 +22,6 @@ sedrule = 's/@DISTRO@/$(call distro,$(1))/; s/@RELEASE@/$(call release,$(1))/; s
TESTS = \
test-configure \
test-export \
test-installed \
test-latest \
test-download \
......
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © 2018 Collabora Ltd.
#
# SPDX-License-Identifier: MPL-2.0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
import os
import sys
import shutil
import tempfile
import subprocess
from test_util import should_succeed, should_fail, split_elements
from test_util import BASE_TAG, BASE_INSTALL, BASE_MOCK, LATEST_SYSROOTS
# Utility functions
def check_list(path, sysroots):
expected_tags = {BASE_TAG.format(*sysroot) for sysroot in sysroots}
result = should_succeed('sysroot', '--path', path, 'list')
return expected_tags == set(split_elements(result['InstalledSysroots']))
with tempfile.TemporaryDirectory(dir=os.path.expanduser("~")) as tmpdir:
# Copy install directory
os.chdir(os.path.dirname(os.path.realpath(__file__)))
path = os.path.join(tmpdir, 'install')
shutil.copytree(BASE_INSTALL, path)
mock = os.path.join(tmpdir, 'mock')
shutil.copytree(BASE_MOCK, mock)
if not check_list(path, LATEST_SYSROOTS):
exit(1)
os.chdir(mock);
for sysroot in LATEST_SYSROOTS:
tag = '{}-{}-{}'.format(*sysroot)
build = os.path.join(mock, tag)
should_succeed('configure', '--path', path, '--sysroot', tag,
'--build-dir', build)
should_succeed('export', '--dest', path,
'--build-dir', build)
pkg = "org.apertis.Sample-0.1.0.bundle"
TestExportRepo = "repo"
TestExportOutdir = "outdir"
os.chdir(path)
if os.path.exists(pkg):
# See: https://github.com/flatpak/flatpak/issues/126
os.system("ostree init --repo=%s --mode=bare-user" % (TestExportRepo) )
os.system("ostree static-delta apply-offline --repo=%s %s" % (TestExportRepo, pkg) )
os.system("ostree checkout --repo=%s -U $(basename $(echo %s/objects/*/*.commit | cut -d/ -f3- --output-delimiter= ) .commit) %s" % (TestExportRepo, TestExportRepo, TestExportOutdir) )
if not os.path.exists("%s/files/bin/sample.py" % (TestExportOutdir)):
print("sample file does not exist")
sys.exit(1)
shutil.rmtree(TestExportRepo)
shutil.rmtree(TestExportOutdir)
os.chdir(mock)
else:
print("Failed to find bundle package")
sys.exit(1)
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment