rpm-ostree/tests/test-compose.sh
Giuseppe Scrivano 27008e402a tests: Add test for compose
A local yum repository, which contains a dummy .rpm package adding
support for programs needed by the post-process phase, is created as
part of the test.

Since no libc is present, the empty.c program (which is a no-op)
directly invokes the interrupt 0x80 to exit.

The test works only on x86_64, it is skipped on other architectures.

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-04-13 10:43:24 +02:00

39 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
#
# Copyright (C) 2015 Red Hat Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA.
set -e
. $(dirname $0)/libtest.sh
check_root_test
# Workaround a debugging message "Missing callback called fullpath" that let the test fails.
# Remove once it doesn't happen anymore.
unset G_DEBUG
(arch | grep -q x86_64) || { echo 1>&2 "$0 can be run only on x86_64"; echo "1..0" ; exit 0; }
echo "1..1"
ostree init --repo=repo --mode=archive-z2
echo "ok setup"
rpm-ostree --repo=repo compose tree $SRCDIR/test-repo.json