Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new arches/OSes for binary_modules tests #69052

Merged
merged 9 commits into from Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 6 additions & 4 deletions test/integration/targets/binary_modules/Makefile
Expand Up @@ -5,10 +5,12 @@ all:
# This avoids a dependency on go and keeps the binaries out of our git repository.
# https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/
cd library; \
GOOS=linux GOARCH=amd64 go build -o helloworld_linux helloworld.go; \
GOOS=windows GOARCH=amd64 go build -o helloworld_win32nt.exe helloworld.go; \
GOOS=darwin GOARCH=amd64 go build -o helloworld_darwin helloworld.go; \
GOOS=freebsd GOARCH=amd64 go build -o helloworld_freebsd helloworld.go
GOOS=linux GOARCH=amd64 go build -o helloworld_linux_x86_64 helloworld.go; \
GOOS=linux GOARCH=ppc64le go build -o helloworld_linux_ppc64le helloworld.go; \
GOOS=aix GOARCH=ppc64 go build -o helloworld_aix_chrp helloworld.go; \
GOOS=windows GOARCH=amd64 go build -o helloworld_win32nt_64-bit.exe helloworld.go; \
GOOS=darwin GOARCH=amd64 go build -o helloworld_darwin_x86_64 helloworld.go; \
GOOS=freebsd GOARCH=amd64 go build -o helloworld_freebsd_amd64 helloworld.go

clean:
rm -f library/helloworld_*
@@ -1,21 +1,9 @@
- hosts: testhost
tasks:
- debug: var=ansible_system

- name: set module filename (POSIX)
set_fact:
module_filename: "helloworld_{{ ansible_system | lower }}"
when: ansible_system != 'Win32NT'

- name: set module filename (Win32NT)
set_fact:
module_filename: "helloworld_{{ ansible_system | lower }}.exe"
when: ansible_system == 'Win32NT'

- name: download binary module
tags: test_binary_modules
get_url:
url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/{{ module_filename }}"
dest: "{{ playbook_dir }}/library/{{ module_filename }}"
url: "https://ansible-ci-files.s3.amazonaws.com/test/integration/roles/test_binary_modules/{{ filename }}"
dest: "{{ playbook_dir }}/library/{{ filename }}"
mode: 0755
delegate_to: localhost
3 changes: 3 additions & 0 deletions test/integration/targets/binary_modules/group_vars/all
@@ -0,0 +1,3 @@
system: "{{ ansible_system|lower }}"
suffix: "{{ '.exe' if system == 'win32nt' else '' }}"
filename: "helloworld_{{ system }}_{{ ansible_architecture }}{{ suffix }}"
Expand Up @@ -9,15 +9,15 @@
when: ansible_system == 'Win32NT'

- name: Hello, World!
action: "helloworld_{{ ansible_system|lower }}"
action: "{{ filename }}"
register: hello_world

- assert:
that:
- 'hello_world.msg == "Hello, World!"'

- name: Hello, Ansible!
action: "helloworld_{{ ansible_system|lower }}"
action: "{{ filename }}"
args:
name: Ansible
register: hello_ansible
Expand All @@ -27,7 +27,7 @@
- 'hello_ansible.msg == "Hello, Ansible!"'

- name: Async Hello, World!
action: "helloworld_{{ ansible_system|lower }}"
action: "{{ filename }}"
async: 10
poll: 1
when: ansible_system != 'Win32NT'
Expand All @@ -39,7 +39,7 @@
when: async_hello_world is not skipped

- name: Async Hello, Ansible!
action: "helloworld_{{ ansible_system|lower }}"
action: "{{ filename }}"
args:
name: Ansible
async: 10
Expand Down
2 changes: 0 additions & 2 deletions test/integration/targets/binary_modules_posix/aliases
@@ -1,4 +1,2 @@
shippable/posix/group3
needs/target/binary_modules
skip/aix
skip/power/centos