From dfb4930fce82cc0f59e3907c995ffbae3d8a116a Mon Sep 17 00:00:00 2001 From: David Wilson Date: Tue, 11 Sep 2018 06:40:56 +0100 Subject: [PATCH] tests: import custom binaries for tests It means Linux<->OS X runs work fine without manual hackery. --- .travis/ansible_tests.py | 2 +- tests/ansible/Makefile | 10 +++++--- .../runner/custom_binary_producing_json.yml | 21 +++++++++++++--- .../runner/custom_binary_producing_junk.yml | 23 ++++++++++++++---- .../custom_binary_producing_json_Darwin | Bin 0 -> 8540 bytes .../custom_binary_producing_json_Linux | Bin 0 -> 8400 bytes .../custom_binary_producing_junk_Darwin | Bin 0 -> 8540 bytes .../custom_binary_producing_junk_Linux | Bin 0 -> 8400 bytes 8 files changed, 42 insertions(+), 14 deletions(-) create mode 100755 tests/ansible/lib/modules/custom_binary_producing_json_Darwin create mode 100755 tests/ansible/lib/modules/custom_binary_producing_json_Linux create mode 100755 tests/ansible/lib/modules/custom_binary_producing_junk_Darwin create mode 100755 tests/ansible/lib/modules/custom_binary_producing_junk_Linux diff --git a/.travis/ansible_tests.py b/.travis/ansible_tests.py index 723f9c1a..3b5e40db 100755 --- a/.travis/ansible_tests.py +++ b/.travis/ansible_tests.py @@ -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") diff --git a/tests/ansible/Makefile b/tests/ansible/Makefile index 00d6a8ab..1d4ab1dd 100644 --- a/tests/ansible/Makefile +++ b/tests/ansible/Makefile @@ -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: diff --git a/tests/ansible/integration/runner/custom_binary_producing_json.yml b/tests/ansible/integration/runner/custom_binary_producing_json.yml index 00f03f07..4fe09f0d 100644 --- a/tests/ansible/integration/runner/custom_binary_producing_json.yml +++ b/tests/ansible/integration/runner/custom_binary_producing_json.yml @@ -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 diff --git a/tests/ansible/integration/runner/custom_binary_producing_junk.yml b/tests/ansible/integration/runner/custom_binary_producing_junk.yml index 93d98065..b1672ad9 100644 --- a/tests/ansible/integration/runner/custom_binary_producing_junk.yml +++ b/tests/ansible/integration/runner/custom_binary_producing_junk.yml @@ -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 diff --git a/tests/ansible/lib/modules/custom_binary_producing_json_Darwin b/tests/ansible/lib/modules/custom_binary_producing_json_Darwin new file mode 100755 index 0000000000000000000000000000000000000000..69de2fea2ef06ce88f94230d7f0eb94e2da4b653 GIT binary patch literal 8540 zcmeHMQEL=e6uxU?8&c6ILQ`6C+%}?;W>u0l1cgL1bVac-MhIfL>}F@PE0dXJW)=;l z5D~#3f&2ttee=P8pkn*fzO?w@gAY{<#J=c*6zTeXckXOvC&Bl?J?zF%Nx6b#ecEtH)&2bw}0ADuWkk0q5jwdGXZP`%YY#0S~Z%zkf^Udgd zS9CvdS~_y0L&~Oit?pH1-K+Wvch1KHosV-)Axi1yiSg<2R1fBlye0FP zwVYQxb4nQ|<(!|IR^ZL^bu*ZP{2ZSM`A^p=rRU0UVZQ9UvJnLv@^$O_^kXK7v-#3k zO1Jc}e0`aG#Od+LbDY$>zOK%lIe*rkIFqaiE9UKrA`j8Plms(R(nWtB>-H!cmJsBo z8}<-vB1f$_#Uw1_$Wb5kHZVEsIv~Uh?B~!)D24eGWqil_VL(b=SwgU;tYF!(B(-h| z%`hmq^>U%I;8t|tSFo((?A_C&$N&7ny*IGuyYibG|8QM^It=VldL+U0L2z%29LIH? z7Ou|`DEnCRwiAD&?3`#{8`rQ7uhczZYMhpXn0mFb{ zz%XDKFbo(5wjKkQic2qwH`jWL%foe4U%a!u2d}nI?DxEt;+>KE;?;h(mQP-VS+d{3 zu@|jlzc1NumwqeWeAN5%!puLvOz5xUN57UGoFCGMN9hN4=YW&1*u^mhZiMFCK!W@>`X{Horx7U}UcvP49X` zq0HZe{ti5^ZKm5m!+>GHFkl!k3>XFs1BL;^fMLKeU>GnA7zVZw1H1EmQ!ID)nB>uQ z#R-CjxDbeyF&@^b!*Pkd4EV(g>lbhYZPEe`@qlLoo_s52YhmJF)_y9Q#_#^-T literal 0 HcmV?d00001 diff --git a/tests/ansible/lib/modules/custom_binary_producing_json_Linux b/tests/ansible/lib/modules/custom_binary_producing_json_Linux new file mode 100755 index 0000000000000000000000000000000000000000..16e6d046516121ce619146739eb42eacdab12d0c GIT binary patch literal 8400 zcmeHMYit}>6~60@6X)Ue#!Xu10U1mpk~W?=FULt6;$1&7rp|-ZE>zT+tasP;mVH>e zvyB}eNe5I8s#8u23m5rO~_P*a?$6{e3Ufa2wxJNL6^ zX4e!X#IM}d%(>^g=bU@)bI!f{TzgkXh0iCD{Nkg6x$#OHX;B4dSEvk;7SSvg()$Bq zwU|%*Jc-%mEjFQ2JKa^LL8}z*C(3%w6*l0dtCbumJY=d|Qxa~{ywK)Bh0r9xdhF}@ zYRMASWCrwz@?%s{=rPNB<4SK_>48ou$3W3OZW}+{%AS|DQ5h#tmgRKtmKEdty9*>+ zLLakX0Sdj3lOFr|pQfM^Jf!NIt6vT(|3OuA#inGUuW8$+WUL{XNau$ehMSujnzre= zjJ`#-o9(mg-u*qYCLV8eE&IHT9>%!*EB7wE-tzKaPF+b~uRU_oS3g|&g;!aY`x4_O zGs*YfWa-@$N`pk~IfXnY7Y0ZPBuV>|BK$K^_@9 z$Cyw4gur~tuT0PitPp#+kP_Ax+BL2w=|#1UfR8G?%F_?vZ`5eg9*gmuK)UI`c|IXc zI&iEJE}L@T&h>KFfvcq_O<`Pk&w;O8@N*^4vY6M5Uv=QleaaYnv&uMGnO~#{C)74ug+5I}n6qnywsEK!L*0gcS?iFO9$2eWNl&G=uu2HyU ztsvK~kPN$4-CMlbuh*Hn4mPjCMvksf2iH0c|cru{}?%D6PS$MC&k zT${G)$lw>1!6j^PE_%(A1m|C*{6)%$-ig_! zNqeDBgr4jy{3g^BqP|>rX1?sI2BuGh3imn-ce*y*l4E)4o`3QqZ1TigmbUqKXkS<1 zA6Z7%t z9WjTpnOHuWNDr9LjzNtlvgY70FexoJy?wG(C&R&mD|~0>S4iTC3-0$suA{ z=d<)QQhA)H2nT{MRD=U{XZ-B}?ex5GVEw5|BhdK#d?V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U#B{bzcU=O!hh_aJip<) gt!cjx@@7FP>@kjd?NW{@%j*}v>U|sRf2`WX( zOS!x9uKm5Klk^f+xQf5tAC`~1Erp(*cqIk_-etufS;dntTrJ49!ytYt0 z;$VOOJ@(UI*jGb?Cywg_gZ`e-T;9$*2Ianq6$@6(%p_x} zl9>XgY=kn8*}2(ePrn^`a`)o82XAig{KS0$>d>*p(Y-#V4T8Cq*^m1=C>*B;$~NZQ zaOf@4jx3Cg@kdGp+nDM++KD_eNjO1vK{;MobNSojVe+FyF`yVw3@8Q^1BwB~fMVeP zXW&eH`a}HsmuP&ZJA>KAZ#BI~@k0N_smE{i+!ym(S(`aLiDFv+0mE9<_P?6ezfZr6 zUwhz{{q2i#x!$v=jam_0OO{%IGPz)#r6a$I@#eiZ!F`yVw3@8Q^1BwB~z(2-7 z>-M(OOu4mB^6ENeSXN$~vP7kimvzqNxWw56?4m+Hs|}tLdE7|b6R=nsU=7hBBIQ(C z8dr_+qHW+FJi)H(c`UJ{RJOQg-q#<39@P`P?sx7S*F>C~K<6BS_j)*w;E{wQJMawR zju7T~N3fk|AH2t8BF+Fp^!YZJa6h~_>i{FQDf^RM#Ez9nS-r7X_rd*L-CYM5Qv3l+ CsOnPy literal 0 HcmV?d00001 diff --git a/tests/ansible/lib/modules/custom_binary_producing_junk_Linux b/tests/ansible/lib/modules/custom_binary_producing_junk_Linux new file mode 100755 index 0000000000000000000000000000000000000000..4aadc9c1d36a55b07f12a215347b8067891dba00 GIT binary patch literal 8400 zcmeHMU2I%O6`u9RiIdptO`5d%DdbWT;UswD{5ejWQ1ALD*VIW&VwYCbxmkPH_O|;I z?cPo72&qO%DpvU+AXEh*9uN|ON{GNqBObuPrG!2uARq`30TJX>Etr-@0TeIi%srod z_wJg4!~+i*Ywwx!%{gbzoS8fK%=pEQ?#?QoPoenL#}soD)eh1s4Hs8Sg-EMvQH$yM z0rjX_Nc;kgIqj_up;o8d6VsqIg8PZGUQ3k&crIH>gy?}zi({Y|ACHZHy<*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