# file : tests/integration/testscript # 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 environment = 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 = 5 # Seconds. controller = https://stage.build2.org/?build-task #\ wait = 1 # Seconds. controller = --fake-request ../task --dump-result pkg = libhello ver = 1.0.0+7 #rep_url = 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_url = https://stage.build2.org/1 rep_type = pkg rfp = yes #\ pkg = hello ver = 1.0.0+6 rep_url = "https://git.build2.org/hello/hello.git" rep_type = git rfp = yes #\ #\ pkg = libstudxml ver = 1.1.0-b.7.20190619110825.0d1dcfe61f15 rep_url = https://stage.build2.org/1 rep_type = pkg rfp = yes #\ #\ # To make sure that the test-installed phase succeeds use the build2 driver # installed into ~/install/bin. # pkg = libbuild2-hello ver = 0.1.0-a.0.20200810114133.0dba3a3bd624 rep_url = "https://github.com/build2/libbuild2-hello.git#master" rep_type = git #rep_url = https://stage.build2.org/1 #rep_type = pkg rfp = yes #\ #\ # Use the build2 driver installed into ~/install/bin (see above). # pkg = libbuild2-kconfig ver = 0.1.0-a.0.20200930082223.f97ea0ff51a6 rep_url = "https://github.com/build2/libbuild2-kconfig.git#master" rep_type = git #ver = 0.1.0-a.0.20200910053253.a71aa3f3938b #rep_url = https://stage.build2.org/1 #rep_type = pkg rfp = yes #\ #\ pkg = curl ver = 7.67.0+8 rep_url = https://pkg.cppget.org/1/testing rep_type = pkg rfp = yes #\ #\ pkg = cli ver = 1.2.0-b.7.20200803080502.02dac36b07e8 rep_url = "https://git.codesynthesis.com/cli/cli.git#adhoc-recipe" rep_type = git #rep_url = https://stage.build2.org/1 #rep_type = pkg rfp = yes #\ # 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 \ \"config.bin.rpath='$~/install/lib'\" \ b.test-installed.configure:\"config.cc.loptions=-L'$~/install/lib'\" \ bpkg.test-installed.create:\"config.cc.loptions=-L'$~/install/lib'\"" +cat <<"EOI" >=task : 1 name: $pkg version: $ver repository-url: $rep_url repository-type: $rep_type trust: $rfp machine: $machine target: $target config: $config EOI +if ("$environment" != "") echo "environment: $environment" >+task end # # 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 : { env = ("$environment" != "" ? "$environment" : "default") cat <<"EOI" >=$env; #!/bin/sh t="\$1" shift exec "\$@" cc config.c=$c config.cxx=$cxx EOI chmod ugo+x $env; sleep $wait; $w --verbose 3 --startup --tftp-host $tftp --environments $~ \ &?build-module/*** &build/*** \ &?build-installed/*** &?build-installed-bpkg/*** \ &?dist/*** &?redist/*** \ &?dist-installed/*** &?redist-installed/*** \ &task.manifest 2>| }