tests: import custom binaries for tests

It means Linux<->OS X runs work fine without manual hackery.
issue72
David Wilson 6 years ago
parent 564113874b
commit dfb4930fce

@ -55,7 +55,7 @@ with ci_lib.Fold('job_setup'):
)) ))
# Build the binaries. # Build the binaries.
run("make -C %s", TESTS_DIR) # run("make -C %s", TESTS_DIR)
if not ci_lib.exists_in_path('sshpass'): if not ci_lib.exists_in_path('sshpass'):
run("sudo apt-get update") run("sudo apt-get update")
run("sudo apt-get install -y sshpass") run("sudo apt-get install -y sshpass")

@ -1,13 +1,15 @@
TARGETS+=lib/modules/custom_binary_producing_junk SYSTEM=$(shell uname -s)
TARGETS+=lib/modules/custom_binary_producing_json
TARGETS+=lib/modules/custom_binary_producing_junk_$(SYSTEM)
TARGETS+=lib/modules/custom_binary_producing_json_$(SYSTEM)
all: clean $(TARGETS) all: clean $(TARGETS)
lib/modules/custom_binary_producing_junk: lib/modules.src/custom_binary_producing_junk.c lib/modules/custom_binary_producing_junk_$(SYSTEM): lib/modules.src/custom_binary_producing_junk.c
$(CC) -o $@ $< $(CC) -o $@ $<
lib/modules/custom_binary_producing_json: lib/modules.src/custom_binary_producing_json.c lib/modules/custom_binary_producing_json_$(SYSTEM): lib/modules.src/custom_binary_producing_json.c
$(CC) -o $@ $< $(CC) -o $@ $<
clean: clean:

@ -1,12 +1,25 @@
- name: integration/runner/custom_binary_producing_json.yml - name: integration/runner/custom_binary_producing_json.yml
hosts: test-targets hosts: test-targets
any_errors_fatal: true any_errors_fatal: true
gather_facts: true
tasks: tasks:
- custom_binary_producing_json: - block:
foo: true - custom_binary_producing_json_Darwin:
with_sequence: start=1 end={{end|default(1)}} foo: true
register: out with_sequence: start=1 end={{end|default(1)}}
register: out_darwin
- set_fact: out={{out_darwin}}
when: ansible_system == "Darwin"
- block:
- custom_binary_producing_json_Linux:
foo: true
with_sequence: start=1 end={{end|default(1)}}
register: out_linux
- set_fact: out={{out_linux}}
when: ansible_system == "Linux"
- debug: msg={{out}}
- assert: - assert:
that: | that: |
out.changed and out.changed and

@ -1,11 +1,24 @@
- name: integration/runner/custom_binary_producing_junk.yml - name: integration/runner/custom_binary_producing_junk.yml
hosts: test-targets hosts: test-targets
gather_facts: true
tasks: tasks:
- custom_binary_producing_junk: - block:
foo: true - custom_binary_producing_junk_Darwin:
with_sequence: start=1 end={{end|default(1)}} foo: true
ignore_errors: true with_sequence: start=1 end={{end|default(1)}}
register: out ignore_errors: true
register: out_darwin
- set_fact: out={{out_darwin}}
when: ansible_system == "Darwin"
- block:
- custom_binary_producing_junk_Linux:
foo: true
with_sequence: start=1 end={{end|default(1)}}
ignore_errors: true
register: out_linux
- set_fact: out={{out_linux}}
when: ansible_system == "Linux"
- hosts: test-targets - hosts: test-targets

Loading…
Cancel
Save