From 03285bf5a37ea837233bf77e17a98b5ff2bbda5e Mon Sep 17 00:00:00 2001 From: Vladis Dronov Date: Thu, 23 Mar 2023 12:48:23 +0100 Subject: [PATCH] Bring tests/ over from Brew dist-git Signed-off-by: Vladis Dronov --- tests/README | 2 ++ tests/smoke/runtest.sh | 8 +++++++ tests/tests.yml | 52 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 tests/README create mode 100755 tests/smoke/runtest.sh create mode 100644 tests/tests.yml diff --git a/tests/README b/tests/README new file mode 100644 index 0000000..db70842 --- /dev/null +++ b/tests/README @@ -0,0 +1,2 @@ +initial tests: +run make check in src, which runs any selftests in the upstream source tarball diff --git a/tests/smoke/runtest.sh b/tests/smoke/runtest.sh new file mode 100755 index 0000000..0b04498 --- /dev/null +++ b/tests/smoke/runtest.sh @@ -0,0 +1,8 @@ +#!/bin/bash +cd ../source +aclocal +autoheader +autoconf +automake --add-missing +export CSCOPE_BINARY=/usr/bin/cscope +./configure && make check diff --git a/tests/tests.yml b/tests/tests.yml new file mode 100644 index 0000000..4de5914 --- /dev/null +++ b/tests/tests.yml @@ -0,0 +1,52 @@ +--- +- hosts: localhost + tags: + - classic + tasks: + - name: Add executor host + add_host: + name: executor + ansible_connection: local + ansible_host: 127.0.0.1 + ansible_ssh_connection: local + + - name: Install build requires + delegate_to: executor + shell: dnf -y install autoconf automake + +- hosts: localhost + tags: + - classic + roles: + - role: standard-test-source + +- hosts: localhost + tags: + - classic + tasks: + - name: Copy spec file to remote machine + copy: + src: "{{ playbook_dir }}/../cscope.spec" + dest: /tmp/cscope.spec + + - name: Install build deps + shell: dnf -y build-dep /tmp/cscope.spec + +- hosts: localhost + tags: + - classic + roles: + - role: standard-test-basic + tests: + - smoke + required_packages: + - autoconf + - automake + - pkgconf-pkg-config + - ncurses-devel + - flex + - bison + - m4 + - gcc + - sed + - make