# file : tests/integration/testscript # license : MIT; see accompanying LICENSE file # NOTE: to see the worker execution progress run the test with the # --no-diag-buffer option. #\ # 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+10 #rep_url = "https://git.build2.org/hello/libhello.git#1.0" #rep_type = git rep_url = https://stage.build2.org/1 rep_type = pkg rfp = yes #host='host: true' #dependency_checksum = 'dependency-checksum: e6f10587696020674c260669f4e7000a0139df72467bff9770aea2f2b8b57ba0' #\ pkg = hello ver = 1.0.0+8 rep_url = "https://git.build2.org/hello/hello.git" rep_type = git rfp = yes #\ #\ pkg = libstudxml ver = 1.1.0-b.10 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 a writable directory, for example, ~/install/bin. # #\ pkg = libbuild2-hello ver = 0.1.0-a.0.20220111112708.b719144c077f 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 tests="tests: * libbuild2-hello-tests == $ver" host='host: true' #\ # Use the build2 driver installed into ~/install/bin (see above). # #\ pkg = libbuild2-kconfig ver = 0.3.0-a.0.20221118053819.f702eb65da87 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 requires = 'requires: bootstrap' tests = "tests: * libbuild2-kconfig-tests == $ver examples: * kconfig-hello == $ver" host = 'host: true' package_config = 'package-config: config.libbuild2-kconfig.develop=true' #dependency_checksum = 'dependency-checksum: 72ae02bed9a05aaf022147297a99b84d63b712e15d05cc073551da39003e87e8' #\ # Use the build2 driver installed into ~/install/bin (see above). # #\ pkg = libbuild2-autoconf ver = 0.1.0-a.0.20220629084006.3c4928213194 rep_url = "https://github.com/build2/libbuild2-autoconf.git#master" rep_type = git rfp = yes tests = "tests: * libbuild2-autoconf-tests == $ver" host = 'host: true' #\ #\ pkg = curl ver = 7.84.0 rep_url = https://pkg.cppget.org/1/stable rep_type = pkg rfp = yes #\ #\ pkg = bpkg ver = 0.16.0-a.0.20221118054047.a6c6065d5c2a rep_url = https://stage.build2.org/1 rep_type = pkg rfp = yes package_config = 'package-config: \ config.bpkg.tests.remote=true ?libodb-sqlite +{ config.libodb_sqlite.develop=true } ?cli +{ config.cli.develop=true } ?sys:libsqlite3 \' #\ #\ pkg = cli ver = 1.2.0-b.9.20221122090425.15876dcb479e rep_url = "https://git.codesynthesis.com/cli/cli.git#master" rep_type = git #rep_url = https://stage.build2.org/1 #rep_type = pkg rfp = yes requires='requires: host' tests="tests: * cli-tests == $ver examples: * cli-examples == $ver" host='host: true' package_config = 'package-config: ?libcutl +{ config.libcutl.develop=true }' #\ #\ pkg = libxsd ver = 4.2.0-b.3.20220224113525.516981000564 rep_url = "https://git.codesynthesis.com/xsd/xsd.git#master" rep_type = git #rep_url = https://stage.build2.org/1 #rep_type = pkg rfp = yes tests="tests: libxsd-tests == $ver" #\ #\ pkg = xsd ver = 4.2.0-b.4.20221031121010.4fdbd8298c4d rep_url = "https://git.codesynthesis.com/xsd/xsd.git#master" rep_type = git #rep_url = https://queue.stage.build2.org/1 #rep_type = pkg rfp = yes requires='requires: host' tests="tests: * xsd-tests == $ver examples: * xsd-examples == $ver" host='host: true' package_config = 'package-config: \ ?libxerces-c +{ config.libxerces_c.network=true } ?libcurl/7.76.0 ?sys:libz \' #dependency_checksum = 'dependency-checksum: 40a0ad4546d836a3afc83a9e7da22f2b5d224af4e62996d88f7103eaee23e9e1' #\ #\ pkg = libxerces-c ver = 3.2.4 rep_url = https://pkg.cppget.org/1/stable rep_type = pkg rfp = yes package_config = 'package-config: \ config.libxerces_c.network=true "?libcurl ~7.76.0" ?sys:libz \' #\ #\ pkg = odb ver = 2.5.0-b.22.20220629083600.4a9af07ee566 rep_url = "https://git.codesynthesis.com/odb/odb.git#master" rep_type = git rfp = yes requires='requires: host' host='host: true' #\ #\ pkg = libcmark-gfm-extensions ver = 0.29.0-a.4 rep_url = https://stage.build2.org/1 rep_type = pkg rfp = yes host='host: true' #\ #\ pkg = non-existing ver = 0.1.0 rep_url = https://stage.build2.org/1 rep_type = pkg rfp = yes #\ #\ pkg = fmt ver = 8.1.1 rep_url = "https://github.com/build2-packaging/fmt.git" #rep_url = "git+file:/tmp/fmt#master" rep_type = git 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 = "bpkg.create:config.install.root=\"'$~/install'\" \ bpkg.configure.fetch:--fetch-timeout=60 \ bpkg.global.configure.build:--fetch-timeout=60 \ bpkg.create:config.bin.rpath=\"'$~/install/lib'\" \ config.cc.coptions=-Wall \ b.test-installed.configure:\"config.cc.loptions=-L'$~/install/lib'\" \ bpkg.test-separate-installed.create:\"config.cc.loptions=-L'$~/install/lib'\"" #interactive="interactive: bpkg.configure.build" #interactive="interactive: warning" +cat <<"EOI" >=task : 1 name: $pkg version: $ver repository-url: $rep_url repository-type: $rep_type trust: $rfp $requires $tests machine: $machine target: $target config: $config $package_config $interactive $host worker-checksum: 1 $dependency_checksum 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/*** &?build-host/*** &?build-module/*** &?build-install/*** \ &?build-installed/*** &?build-installed-bpkg/*** \ &?build-installed-bpkg-module/*** &?build-installed-bpkg-host/*** \ &?dist/*** &?redist/*** \ &?dist-install/*** &?redist-install/*** \ &?dist-installed/*** &?redist-installed/*** \ &task.manifest <| 2>| }