Skip to content

Commit

Permalink
fixup! ci: Rework installed tests to use Fedora Standard Test interface
Browse files Browse the repository at this point in the history
  • Loading branch information
cgwalters committed Mar 8, 2018
1 parent e7dcd7e commit 7407a66
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 37 deletions.
4 changes: 2 additions & 2 deletions ci/build-rpm.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/bash
# Install build dependencies, run unit tests and installed tests.
# Generate a src.rpm, then binary rpms in the current directory

set -xeuo pipefail

Expand All @@ -26,7 +26,7 @@ if test "${OS_ID}" = 'fedora'; then
esac
fi
case "${CONFIGOPTS:-}" in
*--with-curl*|--with-soup*)
*--with-curl*|*--with-soup*)
if test -x /usr/bin/gnome-desktop-testing-runner; then
CONFIGOPTS="${CONFIGOPTS} --enable-installed-tests=exclusive"
fi
Expand Down
2 changes: 1 addition & 1 deletion ci/libpaprci/libbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ make() {

build() {
env NOCONFIGURE=1 ./autogen.sh
./configure --prefix=/usr --libdir=/usr/lib64 "$@"
./configure --sysconfdir=/etc --prefix=/usr --libdir=/usr/lib64 "$@"
make V=1
}

Expand Down
31 changes: 11 additions & 20 deletions tests/fedora-str/overlay-git.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,27 @@
- atomic
remote_user: root
tasks:
# Install the built RPM to the VM
- command: git rev-parse HEAD
register: git_rev_head
connection: local
- command: ostree --version
changed_when: False
register: ostree_orig_version
- set_fact:
ostree_orig_version_yaml: "{{ ostree_orig_version.stdout | from_yaml }}"
- name: Copy locally built RPMs
synchronize: src=x86_64/ dest=/root/x86_64/ archive=yes
- shell: ostree admin unlock || true
changed_when: False
# Install the RPMs we already have. For the test suite we use rpm2cpio
# since it depends on libsoup, but we're not using that yet for the sysinstalled tests
- shell: >
/usr/bin/rpm -Fvh /root/x86_64/*.rpm && \
cd / && rpm2cpio /root/x86_64/ostree-tests-2*.rpm | cpio -div
changed_when: False
- shell: /usr/bin/rpm -Fvh /root/x86_64/*.rpm
changed_when: False
- command: ostree --version
changed_when: False
register: ostree_version
register: ostree_new_version
- set_fact:
ostree_version_yaml: "{{ ostree_version.stdout | from_yaml }}"
# FIXME: make this work when building RPMs too
# - name: Fail if current git is not equal to installed
# when: git_rev_head.stdout != ostree_version_yaml['libostree']['Git']
# fail:
# msg: |
# "Git rev mismatch:
# HEAD={{ git_rev_head.stdout }}
# binary={{ ostree_version_yaml['libostree']['Git'] }}"
# - debug: msg="{{ ostree_version.stdout | from_yaml }}"
ostree_new_version_yaml: "{{ ostree_new_version.stdout | from_yaml }}"
- name: "Fail if we didn't change the ostree version"
when: ostree_orig_version_yaml['libostree']['Git'] == ostree_new_version_yaml['libostree']['Git']
fail:
msg: "Failed to change ostree version"

# Next copy all of the tests/ directory
- name: Copy test data
Expand Down
5 changes: 1 addition & 4 deletions tests/fedora-str/sysinstall-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
- atomic
remote_user: root
tasks:
- find:
paths: /root/tests/installed/
patterns: "itest-*.sh"
register: installed_tests
# Down the line perhaps do each log file separately?
- name: Run sysinstalled tests
shell: /root/tests/installed/run.sh &> /root/installed-tests.log
register: sysinstalled_result
Expand Down
10 changes: 0 additions & 10 deletions tests/installed/fah-prep.sh

This file was deleted.

0 comments on commit 7407a66

Please sign in to comment.