# file : tests/integration/testscript # copyright : Copyright (c) 2014-2018 Code Synthesis Ltd # license : TBC; see accompanying LICENSE file #\ # Requirement: # # 1. tftpd-hpa installed (assumed in /usr/sbin/in.tftpd) # # 2. b, bpkg, curl executables in PATH. # # TFTP server (tftpd-hpa) setup: from the test out_base, run (sudo is required # for --secure/chroot): # sudo /usr/sbin/in.tftpd \ --foreground \ --address 127.0.0.1:55123 \ --user "$(whoami)" \ --permissive \ --create \ --secure \ --map-file tftp-map \ "$(pwd)" #\ machine = linux-gcc target = x86_64-linux-gnu c = gcc cxx = g++ # Where we get the task and what we do with the result can be configured # independently: # # - We can poll a controller for a task by specifying its URL or we can # read a task manifest from a file (--fake-request). # # - We can send the result back to the controller or we can dump the result # to stdout (--dump-result). # #\ wait=5s controller = https://stage.build2.org/?build-task #\ wait=1s controller = --fake-request ../task --dump-result pkg = libhello ver = 1.0.0 #rep = https://build2.org/pkg/1/hello/stable #rfp = FF:DF:7D:38:67:4E:C3:82:65:7E:EE:1F:D4:80:EC:56:C4:33:5B:65:3F:9B:29:9A:30:56:B9:77:B9:F2:01:94 rep = https://hello.stage.build2.org/1/stable/ rfp = yes #\ pkg = bpkg ver = 0.6.0-a.0.1499870184.53fff46c5e5fd4df rep = https://stage.build2.org/1 rfp = 37:CE:2C:A5:1D:CF:93:81:D7:07:46:AD:66:B3:C3:90:83:B8:96:9E:34:F0:E7:B3:A2:B0:6C:EF:66:A4:BE:65 #\ #\ pkg = build2 ver = 0.6.0-a.0.1500478402.30578be48463b93f rep = https://stage.build2.org/1 rfp = 37:CE:2C:A5:1D:CF:93:81:D7:07:46:AD:66:B3:C3:90:83:B8:96:9E:34:F0:E7:B3:A2:B0:6C:EF:66:A4:BE:65 #\ # Note that we also need to make sure that the installed package libraries are # properly imported when configuring and running tests, and that the installed # executables are runnable. # config = "config.install.root='$~/install' \ bpkg:--fetch-timeout=60 \ b.test_installed.configure:config.cc.loptions=-L'$~/install/lib' \ b.test_installed.configure:config.bin.rpath='$~/install/lib' \ b.test_installed:--progress" +cat <<"EOI" >=task : 1 name: $pkg version: $ver repository: $rep trust: $rfp machine: $machine target: $target config: $config EOI # # tftp = 127.0.0.1:55123 a = $0 + sed -e 's/-agent$/-worker/' <"$0" | set w : agent : { cat <<"EOI" >=machine-header; : 1 id: $machine-1.0 name: $machine summary: The $machine fake machine EOI $a --verbose 3 --tftp $~ --fake-machine machine-header $controller \ &build/*** >| 2>| } : worker : { cat <<"EOI" >=$target; #!/bin/sh t="\$1" shift exec "\$@" cc config.c=$c config.cxx=$cxx EOI chmod ugo+x $target; sleep $wait; $w --verbose 3 --startup --tftp-host $tftp --environments $~ \ &build/*** &?build-installed/*** &task.manifest 2>| }