From f399c3b02c8a97f20d92245cf6b3d0b6b0e1e874 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 4 Sep 2018 15:09:13 +0300 Subject: Rename .test/test{} to .testscript/testscript{} --- tests/worker/bootstrap.test | 13 ---- tests/worker/bootstrap.testscript | 13 ++++ tests/worker/build.test | 137 -------------------------------------- tests/worker/build.testscript | 137 ++++++++++++++++++++++++++++++++++++++ tests/worker/buildfile | 2 +- tests/worker/startup.test | 105 ----------------------------- tests/worker/startup.testscript | 105 +++++++++++++++++++++++++++++ 7 files changed, 256 insertions(+), 256 deletions(-) delete mode 100644 tests/worker/bootstrap.test create mode 100644 tests/worker/bootstrap.testscript delete mode 100644 tests/worker/build.test create mode 100644 tests/worker/build.testscript delete mode 100644 tests/worker/startup.test create mode 100644 tests/worker/startup.testscript (limited to 'tests/worker') diff --git a/tests/worker/bootstrap.test b/tests/worker/bootstrap.test deleted file mode 100644 index 359dc88..0000000 --- a/tests/worker/bootstrap.test +++ /dev/null @@ -1,13 +0,0 @@ -# file : tests/worker/bootstrap.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : TBC; see accompanying LICENSE file - -test.options = --bootstrap - -$* >>~%EOO% -: 1 -%bbot-version: .+% -%libbbot-version: .+% -%libbpkg-version: .+% -%libbutl-version: .+% -EOO diff --git a/tests/worker/bootstrap.testscript b/tests/worker/bootstrap.testscript new file mode 100644 index 0000000..2cf91e6 --- /dev/null +++ b/tests/worker/bootstrap.testscript @@ -0,0 +1,13 @@ +# file : tests/worker/bootstrap.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : TBC; see accompanying LICENSE file + +test.options = --bootstrap + +$* >>~%EOO% +: 1 +%bbot-version: .+% +%libbbot-version: .+% +%libbpkg-version: .+% +%libbutl-version: .+% +EOO diff --git a/tests/worker/build.test b/tests/worker/build.test deleted file mode 100644 index 23d5b36..0000000 --- a/tests/worker/build.test +++ /dev/null @@ -1,137 +0,0 @@ -# file : tests/worker/build.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : TBC; see accompanying LICENSE file - -# Note: requires TFTP server (see buildfile). - -tftp = 127.0.0.1:55123/test - -pkg = hello -ver = 1.0.0 - -#rep_url = /home/boris/work/build2/hello/repository/1/stable -rep_url = https://build2.org/pkg/1/stage/stable -#rep_url = https://build2.org/pkg/1/hello/stable -rep_type = pkg - -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 - -: pass -: -cat <<"EOI" >=manifest; - : 1 - name: $pkg - version: $ver - repository-url: $rep_url - repository-type: $rep_type - trust: $rfp - machine: linux-gcc - target: x86_64-linux-gnu - config: config.cc.coptions=-O3 - EOI -$* --verbose 3 --tftp-host "$tftp/$@" cc &x86_64-linux-gnu/*** 2>>"EOE"; - trace: build: bpkg -v create -d x86_64-linux-gnu --wipe config.cc.coptions=-O3 cc - trace: build: bpkg -v add $rep_url - trace: build: bpkg -v fetch --trust $rfp --trust-no - trace: build: bpkg -v build --configure-only --yes $pkg/$ver - trace: build: bpkg -v update $pkg - trace: build: bpkg -v test $pkg - trace: build: curl -s -S --upload-file - --max-time 10 tftp://$tftp/$@/manifest - EOE -cat manifest >>~"%EOO%" - : 1 - name: $pkg - version: $ver - status: success - configure-status: success - update-status: success - test-status: success - configure-log: \\ - %.*%+ - \\ - update-log: \\ - %.*%+ - \\ - test-log: \\ - %.*%+ - \\ - EOO - - -: fail-abnormal -: -cat <<"EOI" >=manifest; - : 1 - foo: bar - EOI -$* --verbose 3 --tftp-host "$tftp/$@" cc 2>>"EOE" != 0 - error: invalid task manifest: manifest:3:1: no task package name specified - EOE - - -: fail-configure -: -cat <<"EOI" >=manifest; - : 1 - name: bogus - version: 1.2.3 - repository-url: $rep_url - repository-type: $rep_type - trust: $rfp - machine: linux-gcc - target: x86_64-linux-gnu - EOI -$* --verbose 3 --tftp-host "$tftp/$@" cc &x86_64-linux-gnu/*** 2>>"EOE"; - trace: build: bpkg -v create -d x86_64-linux-gnu --wipe cc - trace: build: bpkg -v add $rep_url - trace: build: bpkg -v fetch --trust $rfp --trust-no - trace: build: bpkg -v build --configure-only --yes bogus/1.2.3 - trace: build: curl -s -S --upload-file - --max-time 10 tftp://$tftp/$@/manifest - EOE -cat manifest >>~"%EOO%" - : 1 - name: bogus - version: 1.2.3 - status: error - configure-status: error - configure-log: \\ - %.*%+ - \\ - EOO - - -: fail-update -: -cat <<"EOI" >=manifest; - : 1 - name: $pkg - version: $ver - repository-url: $rep_url - repository-type: $rep_type - trust: $rfp - machine: linux-gcc - target: x86_64-linux-gnu - config: config.cc.loptions=-lbogus - EOI -$* --verbose 3 --tftp-host "$tftp/$@" cc &x86_64-linux-gnu/*** 2>>"EOE"; - trace: build: bpkg -v create -d x86_64-linux-gnu --wipe config.cc.loptions=-lbogus cc - trace: build: bpkg -v add $rep_url - trace: build: bpkg -v fetch --trust $rfp --trust-no - trace: build: bpkg -v build --configure-only --yes $pkg/$ver - trace: build: bpkg -v update $pkg - trace: build: curl -s -S --upload-file - --max-time 10 tftp://$tftp/$@/manifest - EOE -cat manifest >>~"%EOO%" - : 1 - name: $pkg - version: $ver - status: error - configure-status: success - update-status: error - configure-log: \\ - %.*%+ - \\ - update-log: \\ - %.*%+ - \\ - EOO diff --git a/tests/worker/build.testscript b/tests/worker/build.testscript new file mode 100644 index 0000000..3d32e0a --- /dev/null +++ b/tests/worker/build.testscript @@ -0,0 +1,137 @@ +# file : tests/worker/build.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : TBC; see accompanying LICENSE file + +# Note: requires TFTP server (see buildfile). + +tftp = 127.0.0.1:55123/test + +pkg = hello +ver = 1.0.0 + +#rep_url = /home/boris/work/build2/hello/repository/1/stable +rep_url = https://build2.org/pkg/1/stage/stable +#rep_url = https://build2.org/pkg/1/hello/stable +rep_type = pkg + +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 + +: pass +: +cat <<"EOI" >=manifest; + : 1 + name: $pkg + version: $ver + repository-url: $rep_url + repository-type: $rep_type + trust: $rfp + machine: linux-gcc + target: x86_64-linux-gnu + config: config.cc.coptions=-O3 + EOI +$* --verbose 3 --tftp-host "$tftp/$@" cc &x86_64-linux-gnu/*** 2>>"EOE"; + trace: build: bpkg -v create -d x86_64-linux-gnu --wipe config.cc.coptions=-O3 cc + trace: build: bpkg -v add $rep_url + trace: build: bpkg -v fetch --trust $rfp --trust-no + trace: build: bpkg -v build --configure-only --yes $pkg/$ver + trace: build: bpkg -v update $pkg + trace: build: bpkg -v test $pkg + trace: build: curl -s -S --upload-file - --max-time 10 tftp://$tftp/$@/manifest + EOE +cat manifest >>~"%EOO%" + : 1 + name: $pkg + version: $ver + status: success + configure-status: success + update-status: success + test-status: success + configure-log: \\ + %.*%+ + \\ + update-log: \\ + %.*%+ + \\ + test-log: \\ + %.*%+ + \\ + EOO + + +: fail-abnormal +: +cat <<"EOI" >=manifest; + : 1 + foo: bar + EOI +$* --verbose 3 --tftp-host "$tftp/$@" cc 2>>"EOE" != 0 + error: invalid task manifest: manifest:3:1: no task package name specified + EOE + + +: fail-configure +: +cat <<"EOI" >=manifest; + : 1 + name: bogus + version: 1.2.3 + repository-url: $rep_url + repository-type: $rep_type + trust: $rfp + machine: linux-gcc + target: x86_64-linux-gnu + EOI +$* --verbose 3 --tftp-host "$tftp/$@" cc &x86_64-linux-gnu/*** 2>>"EOE"; + trace: build: bpkg -v create -d x86_64-linux-gnu --wipe cc + trace: build: bpkg -v add $rep_url + trace: build: bpkg -v fetch --trust $rfp --trust-no + trace: build: bpkg -v build --configure-only --yes bogus/1.2.3 + trace: build: curl -s -S --upload-file - --max-time 10 tftp://$tftp/$@/manifest + EOE +cat manifest >>~"%EOO%" + : 1 + name: bogus + version: 1.2.3 + status: error + configure-status: error + configure-log: \\ + %.*%+ + \\ + EOO + + +: fail-update +: +cat <<"EOI" >=manifest; + : 1 + name: $pkg + version: $ver + repository-url: $rep_url + repository-type: $rep_type + trust: $rfp + machine: linux-gcc + target: x86_64-linux-gnu + config: config.cc.loptions=-lbogus + EOI +$* --verbose 3 --tftp-host "$tftp/$@" cc &x86_64-linux-gnu/*** 2>>"EOE"; + trace: build: bpkg -v create -d x86_64-linux-gnu --wipe config.cc.loptions=-lbogus cc + trace: build: bpkg -v add $rep_url + trace: build: bpkg -v fetch --trust $rfp --trust-no + trace: build: bpkg -v build --configure-only --yes $pkg/$ver + trace: build: bpkg -v update $pkg + trace: build: curl -s -S --upload-file - --max-time 10 tftp://$tftp/$@/manifest + EOE +cat manifest >>~"%EOO%" + : 1 + name: $pkg + version: $ver + status: error + configure-status: success + update-status: error + configure-log: \\ + %.*%+ + \\ + update-log: \\ + %.*%+ + \\ + EOO diff --git a/tests/worker/buildfile b/tests/worker/buildfile index 5483c51..5be4d39 100644 --- a/tests/worker/buildfile +++ b/tests/worker/buildfile @@ -24,5 +24,5 @@ sudo /usr/sbin/in.tftpd \ # import worker = bbot%exe{bbot-worker} -./: test{*} $worker +./: testscript{*} $worker ./: test = $worker diff --git a/tests/worker/startup.test b/tests/worker/startup.test deleted file mode 100644 index 8e8dcf5..0000000 --- a/tests/worker/startup.test +++ /dev/null @@ -1,105 +0,0 @@ -# file : tests/worker/startup.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : TBC; see accompanying LICENSE file - -# Note: requires TFTP server (see buildfile). - -test.options = --startup -tftp = 127.0.0.1:55123/test - -: fail-download -: -$* --tftp-host "$tftp/$@" 2>>"EOE" &manifest != 0; - curl: \(68\) TFTP: File Not Found - error: unable to download task manifest from tftp://$tftp/$@/manifest: input/output error - EOE -diff -u - manifest <=manifest; -$* --tftp-host "$tftp/$@" 2>>"EOE" != 0; - error: invalid task manifest: manifest:2:1: no task package name specified - EOE -diff -u - manifest <=manifest; - : 1 - name: libhello - version: 1.2.3 - repository-url: https://pkg.example.org/1/ - repository-type: pkg - machine: linux-gcc - target: x86_64-linux-gnu - EOI -$* --environments $~ --tftp-host "$tftp/$@" 2>>"EOE" != 0; - error: no environment setup executable in $representation($~) for target 'x86_64-linux-gnu' - EOE -diff -u - manifest <=x86_64-linux-gnu; - #!/bin/sh - echo "environment setup failed" - exit 1 - EOI -chmod ugo+x x86_64-linux-gnu; -cat <=manifest; - : 1 - name: libhello - version: 1.2.3 - repository-url: https://pkg.example.org/1/ - repository-type: pkg - machine: linux-gcc - target: x86_64-linux-gnu - EOI -$* --environments $~ --tftp-host "$tftp/$@" 2>>"EOE" != 0; - environment setup failed - error: process $~/x86_64-linux-gnu terminated with non-zero exit code - EOE -diff -u - manifest <=x86_64-linux-gnu; - #!/bin/sh - echo "$1" - echo "$2" - EOI -chmod ugo+x x86_64-linux-gnu; -cat <=manifest; - : 1 - name: libhello - version: 1.2.3 - repository-url: https://pkg.example.org/1/ - repository-type: pkg - machine: linux-gcc - target: x86_64-linux-gnu - EOI -$* --environments $~ --tftp-host "$tftp/$@" 2>>"EOE" - x86_64-linux-gnu - $0 - EOE diff --git a/tests/worker/startup.testscript b/tests/worker/startup.testscript new file mode 100644 index 0000000..e44a74b --- /dev/null +++ b/tests/worker/startup.testscript @@ -0,0 +1,105 @@ +# file : tests/worker/startup.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : TBC; see accompanying LICENSE file + +# Note: requires TFTP server (see buildfile). + +test.options = --startup +tftp = 127.0.0.1:55123/test + +: fail-download +: +$* --tftp-host "$tftp/$@" 2>>"EOE" &manifest != 0; + curl: \(68\) TFTP: File Not Found + error: unable to download task manifest from tftp://$tftp/$@/manifest: input/output error + EOE +diff -u - manifest <=manifest; +$* --tftp-host "$tftp/$@" 2>>"EOE" != 0; + error: invalid task manifest: manifest:2:1: no task package name specified + EOE +diff -u - manifest <=manifest; + : 1 + name: libhello + version: 1.2.3 + repository-url: https://pkg.example.org/1/ + repository-type: pkg + machine: linux-gcc + target: x86_64-linux-gnu + EOI +$* --environments $~ --tftp-host "$tftp/$@" 2>>"EOE" != 0; + error: no environment setup executable in $representation($~) for target 'x86_64-linux-gnu' + EOE +diff -u - manifest <=x86_64-linux-gnu; + #!/bin/sh + echo "environment setup failed" + exit 1 + EOI +chmod ugo+x x86_64-linux-gnu; +cat <=manifest; + : 1 + name: libhello + version: 1.2.3 + repository-url: https://pkg.example.org/1/ + repository-type: pkg + machine: linux-gcc + target: x86_64-linux-gnu + EOI +$* --environments $~ --tftp-host "$tftp/$@" 2>>"EOE" != 0; + environment setup failed + error: process $~/x86_64-linux-gnu terminated with non-zero exit code + EOE +diff -u - manifest <=x86_64-linux-gnu; + #!/bin/sh + echo "$1" + echo "$2" + EOI +chmod ugo+x x86_64-linux-gnu; +cat <=manifest; + : 1 + name: libhello + version: 1.2.3 + repository-url: https://pkg.example.org/1/ + repository-type: pkg + machine: linux-gcc + target: x86_64-linux-gnu + EOI +$* --environments $~ --tftp-host "$tftp/$@" 2>>"EOE" + x86_64-linux-gnu + $0 + EOE -- cgit v1.1