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.
run("make -C %s", TESTS_DIR)
# run("make -C %s", TESTS_DIR)
if not ci_lib.exists_in_path('sshpass'):
run("sudo apt-get update")
run("sudo apt-get install -y sshpass")

@ -1,13 +1,15 @@
TARGETS+=lib/modules/custom_binary_producing_junk
TARGETS+=lib/modules/custom_binary_producing_json
SYSTEM=$(shell uname -s)
TARGETS+=lib/modules/custom_binary_producing_junk_$(SYSTEM)
TARGETS+=lib/modules/custom_binary_producing_json_$(SYSTEM)
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 $@ $<
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 $@ $<
clean:

@ -1,12 +1,25 @@
- name: integration/runner/custom_binary_producing_json.yml
hosts: test-targets
any_errors_fatal: true
gather_facts: true
tasks:
- custom_binary_producing_json:
foo: true
with_sequence: start=1 end={{end|default(1)}}
register: out
- block:
- custom_binary_producing_json_Darwin:
foo: true
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:
that: |
out.changed and

@ -1,11 +1,24 @@
- name: integration/runner/custom_binary_producing_junk.yml
hosts: test-targets
gather_facts: true
tasks:
- custom_binary_producing_junk:
foo: true
with_sequence: start=1 end={{end|default(1)}}
ignore_errors: true
register: out
- block:
- custom_binary_producing_junk_Darwin:
foo: true
with_sequence: start=1 end={{end|default(1)}}
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

Loading…
Cancel
Save