From 1e0c838ededf6d7d213c19f4c5b595e195356329 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 4 Sep 2018 15:03:14 +0300 Subject: Rename .test/test{} to .testscript/testscript{} --- tests/manifest/buildfile | 2 +- tests/manifest/machine-header.test | 116 ----------- tests/manifest/machine-header.testscript | 116 +++++++++++ tests/manifest/result-request.test | 106 ---------- tests/manifest/result-request.testscript | 106 ++++++++++ tests/manifest/result.test | 230 --------------------- tests/manifest/result.testscript | 230 +++++++++++++++++++++ tests/manifest/task-request.test | 127 ------------ tests/manifest/task-request.testscript | 127 ++++++++++++ tests/manifest/task-response.test | 165 --------------- tests/manifest/task-response.testscript | 165 +++++++++++++++ tests/manifest/task.test | 343 ------------------------------- tests/manifest/task.testscript | 343 +++++++++++++++++++++++++++++++ 13 files changed, 1088 insertions(+), 1088 deletions(-) delete mode 100644 tests/manifest/machine-header.test create mode 100644 tests/manifest/machine-header.testscript delete mode 100644 tests/manifest/result-request.test create mode 100644 tests/manifest/result-request.testscript delete mode 100644 tests/manifest/result.test create mode 100644 tests/manifest/result.testscript delete mode 100644 tests/manifest/task-request.test create mode 100644 tests/manifest/task-request.testscript delete mode 100644 tests/manifest/task-response.test create mode 100644 tests/manifest/task-response.testscript delete mode 100644 tests/manifest/task.test create mode 100644 tests/manifest/task.testscript diff --git a/tests/manifest/buildfile b/tests/manifest/buildfile index 589ef02..ed1379f 100644 --- a/tests/manifest/buildfile +++ b/tests/manifest/buildfile @@ -5,4 +5,4 @@ import libs = libbutl%lib{butl} import libs += libbbot%lib{bbot} -exe{driver}: {hxx cxx}{*} $libs test{*} +exe{driver}: {hxx cxx}{*} $libs testscript{*} diff --git a/tests/manifest/machine-header.test b/tests/manifest/machine-header.test deleted file mode 100644 index 6b880b1..0000000 --- a/tests/manifest/machine-header.test +++ /dev/null @@ -1,116 +0,0 @@ -# file : tests/manifest/machine-header.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -test.options += -m - -: valid -: -: Roundtrip the machine header manifest. -: -{ - $* <>EOF - : 1 - id: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - name: windows_10-msvc_14 - summary: Windows 10 build 1607 with VC 14 update 3 - EOF -} - -: multiple -: -$* <'stdin:5:1: error: single machine header manifest expected' == 1 -: 1 -id: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 -name: windows_10-msvc_14 -summary: Windows 10 build 1607 with VC 14 update 3 -: -EOI - -: redefinition -: -{ - : id - : - $* <'stdin:3:1: error: machine id redefinition' == 1 - : 1 - id: 123 - id: 123 - EOI - - : name - : - $* <'stdin:3:1: error: machine name redefinition' == 1 - : 1 - name: windows - name: windows - EOI - - : summary - : - $* <'stdin:3:1: error: machine summary redefinition' == 1 - : 1 - summary: Windows - summary: Windows - EOI -} - -: empty -: -{ - : id - : - $* <'stdin:2:4: error: empty machine id' == 1 - : 1 - id: - EOI - - : name - : - $* <'stdin:2:6: error: empty machine name' == 1 - : 1 - name: - EOI - - : summary - : - $* <'stdin:2:9: error: empty machine summary' == 1 - : 1 - summary: - EOI -} - -: unknown-name -: -$* <"stdin:2:1: error: unknown name 'x' in machine header manifest" == 1 -: 1 -x: -EOI - -: missed -: -{ - : id - : - $* <'stdin:4:1: error: no machine id specified' == 1 - : 1 - name: windows - summary: Windows - EOI - - : name - : - $* <'stdin:4:1: error: no machine name specified' == 1 - : 1 - id: 123 - summary: Windows - EOI - - : summary - : - $* <'stdin:4:1: error: no machine summary specified' == 1 - : 1 - id: 123 - name: windows - EOI -} diff --git a/tests/manifest/machine-header.testscript b/tests/manifest/machine-header.testscript new file mode 100644 index 0000000..6d33531 --- /dev/null +++ b/tests/manifest/machine-header.testscript @@ -0,0 +1,116 @@ +# file : tests/manifest/machine-header.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -m + +: valid +: +: Roundtrip the machine header manifest. +: +{ + $* <>EOF + : 1 + id: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + name: windows_10-msvc_14 + summary: Windows 10 build 1607 with VC 14 update 3 + EOF +} + +: multiple +: +$* <'stdin:5:1: error: single machine header manifest expected' == 1 +: 1 +id: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 +name: windows_10-msvc_14 +summary: Windows 10 build 1607 with VC 14 update 3 +: +EOI + +: redefinition +: +{ + : id + : + $* <'stdin:3:1: error: machine id redefinition' == 1 + : 1 + id: 123 + id: 123 + EOI + + : name + : + $* <'stdin:3:1: error: machine name redefinition' == 1 + : 1 + name: windows + name: windows + EOI + + : summary + : + $* <'stdin:3:1: error: machine summary redefinition' == 1 + : 1 + summary: Windows + summary: Windows + EOI +} + +: empty +: +{ + : id + : + $* <'stdin:2:4: error: empty machine id' == 1 + : 1 + id: + EOI + + : name + : + $* <'stdin:2:6: error: empty machine name' == 1 + : 1 + name: + EOI + + : summary + : + $* <'stdin:2:9: error: empty machine summary' == 1 + : 1 + summary: + EOI +} + +: unknown-name +: +$* <"stdin:2:1: error: unknown name 'x' in machine header manifest" == 1 +: 1 +x: +EOI + +: missed +: +{ + : id + : + $* <'stdin:4:1: error: no machine id specified' == 1 + : 1 + name: windows + summary: Windows + EOI + + : name + : + $* <'stdin:4:1: error: no machine name specified' == 1 + : 1 + id: 123 + summary: Windows + EOI + + : summary + : + $* <'stdin:4:1: error: no machine summary specified' == 1 + : 1 + id: 123 + name: windows + EOI +} diff --git a/tests/manifest/result-request.test b/tests/manifest/result-request.test deleted file mode 100644 index 7b03ce1..0000000 --- a/tests/manifest/result-request.test +++ /dev/null @@ -1,106 +0,0 @@ -# file : tests/manifest/result-request.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -test.options += -rq - -: valid -: -: Roundtrip the result request manifest. -: -{ - : all-values - : - $* <>EOF - : 1 - session: abcd - challenge: YQo= - : - name: libfoo - version: 1.0 - status: error - EOF - - : no-challenge - : - $* <>EOF - : 1 - session: abcd - : - name: libfoo - version: 1.0 - status: error - EOF - -} - -: redefinition -: -{ - : session - : - $* <'stdin:3:1: error: result request session redefinition' == 1 - : 1 - session: abcd - session: abcd - EOI - - : challenge - : - $* <'stdin:3:1: error: result request challenge redefinition' == 1 - : 1 - challenge: YQo= - challenge: YQo= - EOI -} - -: invalid -: -{ - : empty-session - : - $* <'stdin:2:9: error: empty result request session' == 1 - : 1 - session: - EOI - - : challenge - : - $* <'stdin:2:12: error: invalid result request challenge' == 1 - : 1 - challenge: abc - EOI - - : empty-challenge - : - $* <'stdin:2:11: error: empty result request challenge' == 1 - : 1 - challenge: - EOI -} - -: unknown-name -: -$* <"stdin:2:1: error: unknown name 'x' in result request manifest" == 1 -: 1 -x: -EOI - -: missed -: -{ - : session - : - $* <'stdin:3:1: error: no result request session specified' == 1 - : 1 - challenge: YQo= - EOI - - : result - : - $* <'stdin:4:1: error: result manifest expected' == 1 - : 1 - session: abc - challenge: YQo= - EOI -} diff --git a/tests/manifest/result-request.testscript b/tests/manifest/result-request.testscript new file mode 100644 index 0000000..20fbfbb --- /dev/null +++ b/tests/manifest/result-request.testscript @@ -0,0 +1,106 @@ +# file : tests/manifest/result-request.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -rq + +: valid +: +: Roundtrip the result request manifest. +: +{ + : all-values + : + $* <>EOF + : 1 + session: abcd + challenge: YQo= + : + name: libfoo + version: 1.0 + status: error + EOF + + : no-challenge + : + $* <>EOF + : 1 + session: abcd + : + name: libfoo + version: 1.0 + status: error + EOF + +} + +: redefinition +: +{ + : session + : + $* <'stdin:3:1: error: result request session redefinition' == 1 + : 1 + session: abcd + session: abcd + EOI + + : challenge + : + $* <'stdin:3:1: error: result request challenge redefinition' == 1 + : 1 + challenge: YQo= + challenge: YQo= + EOI +} + +: invalid +: +{ + : empty-session + : + $* <'stdin:2:9: error: empty result request session' == 1 + : 1 + session: + EOI + + : challenge + : + $* <'stdin:2:12: error: invalid result request challenge' == 1 + : 1 + challenge: abc + EOI + + : empty-challenge + : + $* <'stdin:2:11: error: empty result request challenge' == 1 + : 1 + challenge: + EOI +} + +: unknown-name +: +$* <"stdin:2:1: error: unknown name 'x' in result request manifest" == 1 +: 1 +x: +EOI + +: missed +: +{ + : session + : + $* <'stdin:3:1: error: no result request session specified' == 1 + : 1 + challenge: YQo= + EOI + + : result + : + $* <'stdin:4:1: error: result manifest expected' == 1 + : 1 + session: abc + challenge: YQo= + EOI +} diff --git a/tests/manifest/result.test b/tests/manifest/result.test deleted file mode 100644 index 54f60ed..0000000 --- a/tests/manifest/result.test +++ /dev/null @@ -1,230 +0,0 @@ -# file : tests/manifest/result.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -test.options += -r - -: valid -: -: Roundtrip the result manifest. -: -{ - : test-error - : - $* <>EOF - : 1 - name: libfoo - version: 1.0 - status: error - configure-status: success - update-status: warning - test-status: error - configure-log: \ - conf line 1 - conf line 2 - \ - update-log: \ - update line 1 - update line 2 - \ - test-log: \ - test line 1 - test line 2 - \ - EOF - - : update-error - : - $* <>EOF - : 1 - name: libfoo - version: 1.0 - status: error - configure-status: warning - update-status: error - configure-log: \ - conf line 1 - conf line 2 - \ - update-log: \ - update line 1 - update line 2 - \ - EOF - - : early-abort - : - $* <>EOF - : 1 - name: libfoo - version: 1.0 - status: abort - EOF -} - -: redefinition -: -{ - : name - : - $* <'stdin:3:1: error: result package name redefinition' == 1 - : 1 - name: libfoo - name: libfoo - EOI - - : version - : - $* <'stdin:3:1: error: result package version redefinition' == 1 - : 1 - version: 1.0 - version: 1.0 - EOI - - : status - : - $* <'stdin:3:1: error: result status redefinition' == 1 - : 1 - status: success - status: error - EOI - - : configure-status - : - $* <'stdin:4:1: error: result configure-status redefinition' == 1 - : 1 - status: success - configure-status: success - configure-status: abnormal - EOI - - : configure-log - : - $* <'stdin:5:1: error: unexpected configure-log' == 1 - : 1 - status: success - configure-status: success - configure-log: configured - configure-log: configured - EOI -} - -: invalid -: -{ - : name-empty - : - $* <'stdin:2:6: error: invalid result package name: length is less than two characters' == 1 - : 1 - name: - EOI - - : version - : - { - : empty - : - $* <'stdin:2:9: error: invalid result package version: unexpected end' == 1 - : 1 - version: - EOI - - : release - : - $* <'stdin:2:10: error: invalid result package version release' == 1 - : 1 - version: 1.2.3- - EOI - } - - : status - : - $* <'stdin:2:9: error: invalid result status' == 1 - : 1 - status: alert - EOI - - : configure-status - : - $* <'stdin:3:19: error: invalid configure-status' == 1 - : 1 - status: abort - configure-status: alert - EOI - - : order - : - { - : op-status-before-status - : - $* <'stdin:2:1: error: result status must appear first' == 1 - : 1 - configure-status: success - EOI - - : op-status-after-log - : - $* <'stdin:5:1: error: update-status after operations logs' == 1 - : 1 - status: success - configure-status: success - configure-log: log - update-status: error - EOI - - : wrong-op-log - : - $* <'stdin:5:1: error: configure-log is expected' == 1 - : 1 - status: success - configure-status: success - update-status: error - update-log: log - EOI - } -} - -: unknown-name -: -$* <"stdin:2:1: error: unknown name 'full-logs' in result manifest" == 1 -: 1 -full-logs: log -EOI - -: missed -: -{ - : name - : - $* <'stdin:4:1: error: no result package name specified' == 1 - : 1 - version: 1.0 - status: success - EOI - - : version - : - $* <'stdin:4:1: error: no result package version specified' == 1 - : 1 - name: libfoo - status: success - EOI - - : status - : - $* <'stdin:4:1: error: no result status specified' == 1 - : 1 - name: libfoo - version: 1.0 - EOI - - : configure-log - : - $* <'stdin:6:1: error: no result configure-log specified' == 1 - : 1 - name: libfoo - version: 1.0 - status: error - configure-status: error - EOI -} diff --git a/tests/manifest/result.testscript b/tests/manifest/result.testscript new file mode 100644 index 0000000..a3c35a9 --- /dev/null +++ b/tests/manifest/result.testscript @@ -0,0 +1,230 @@ +# file : tests/manifest/result.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -r + +: valid +: +: Roundtrip the result manifest. +: +{ + : test-error + : + $* <>EOF + : 1 + name: libfoo + version: 1.0 + status: error + configure-status: success + update-status: warning + test-status: error + configure-log: \ + conf line 1 + conf line 2 + \ + update-log: \ + update line 1 + update line 2 + \ + test-log: \ + test line 1 + test line 2 + \ + EOF + + : update-error + : + $* <>EOF + : 1 + name: libfoo + version: 1.0 + status: error + configure-status: warning + update-status: error + configure-log: \ + conf line 1 + conf line 2 + \ + update-log: \ + update line 1 + update line 2 + \ + EOF + + : early-abort + : + $* <>EOF + : 1 + name: libfoo + version: 1.0 + status: abort + EOF +} + +: redefinition +: +{ + : name + : + $* <'stdin:3:1: error: result package name redefinition' == 1 + : 1 + name: libfoo + name: libfoo + EOI + + : version + : + $* <'stdin:3:1: error: result package version redefinition' == 1 + : 1 + version: 1.0 + version: 1.0 + EOI + + : status + : + $* <'stdin:3:1: error: result status redefinition' == 1 + : 1 + status: success + status: error + EOI + + : configure-status + : + $* <'stdin:4:1: error: result configure-status redefinition' == 1 + : 1 + status: success + configure-status: success + configure-status: abnormal + EOI + + : configure-log + : + $* <'stdin:5:1: error: unexpected configure-log' == 1 + : 1 + status: success + configure-status: success + configure-log: configured + configure-log: configured + EOI +} + +: invalid +: +{ + : name-empty + : + $* <'stdin:2:6: error: invalid result package name: length is less than two characters' == 1 + : 1 + name: + EOI + + : version + : + { + : empty + : + $* <'stdin:2:9: error: invalid result package version: unexpected end' == 1 + : 1 + version: + EOI + + : release + : + $* <'stdin:2:10: error: invalid result package version release' == 1 + : 1 + version: 1.2.3- + EOI + } + + : status + : + $* <'stdin:2:9: error: invalid result status' == 1 + : 1 + status: alert + EOI + + : configure-status + : + $* <'stdin:3:19: error: invalid configure-status' == 1 + : 1 + status: abort + configure-status: alert + EOI + + : order + : + { + : op-status-before-status + : + $* <'stdin:2:1: error: result status must appear first' == 1 + : 1 + configure-status: success + EOI + + : op-status-after-log + : + $* <'stdin:5:1: error: update-status after operations logs' == 1 + : 1 + status: success + configure-status: success + configure-log: log + update-status: error + EOI + + : wrong-op-log + : + $* <'stdin:5:1: error: configure-log is expected' == 1 + : 1 + status: success + configure-status: success + update-status: error + update-log: log + EOI + } +} + +: unknown-name +: +$* <"stdin:2:1: error: unknown name 'full-logs' in result manifest" == 1 +: 1 +full-logs: log +EOI + +: missed +: +{ + : name + : + $* <'stdin:4:1: error: no result package name specified' == 1 + : 1 + version: 1.0 + status: success + EOI + + : version + : + $* <'stdin:4:1: error: no result package version specified' == 1 + : 1 + name: libfoo + status: success + EOI + + : status + : + $* <'stdin:4:1: error: no result status specified' == 1 + : 1 + name: libfoo + version: 1.0 + EOI + + : configure-log + : + $* <'stdin:6:1: error: no result configure-log specified' == 1 + : 1 + name: libfoo + version: 1.0 + status: error + configure-status: error + EOI +} diff --git a/tests/manifest/task-request.test b/tests/manifest/task-request.test deleted file mode 100644 index c8c4150..0000000 --- a/tests/manifest/task-request.test +++ /dev/null @@ -1,127 +0,0 @@ -# file : tests/manifest/task-request.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -test.options += -tq - -: valid -: -: Roundtrip the task request manifest. -: -{ - : all-values - : - $* <>EOF - : 1 - agent: upsa - toolchain-name: queue - toolchain-version: 0.5.0 - fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e - : - id: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - name: windows_10-msvc_14 - summary: Windows 10 build 1607 with VC 14 update 3 - EOF - - : no-fingerprint - : - $* <>EOF - : 1 - agent: upsa - toolchain-name: queue - toolchain-version: 0.5.0 - : - id: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 - name: windows_10-msvc_14 - summary: Windows 10 build 1607 with VC 14 update 3 - EOF -} - -: redefinition -: -{ - : agent - : - $* <'stdin:3:1: error: task request agent redefinition' == 1 - : 1 - agent: upsa - agent: upsa - EOI - - : toolchain-name - : - $* <'stdin:3:1: error: task request toolchain name redefinition' == 1 - : 1 - toolchain-name: queue - toolchain-name: queue - EOI - - : toolchain-version - : - $* <'stdin:3:1: error: task request toolchain version redefinition' == 1 - : 1 - toolchain-version: 0.5.0 - toolchain-version: 0.5.0 - EOI - - : fingerprint - : - $* <'stdin:3:1: error: task request fingerprint redefinition' == 1 - : 1 - fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e - fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e - EOI -} - -: empty -: -{ - : agent - : - $* <'stdin:2:7: error: empty task request agent' == 1 - : 1 - agent: - EOI - - : toolchain-name - : - $* <'stdin:2:16: error: empty task request toolchain name' == 1 - : 1 - toolchain-name: - EOI -} - -: invalid-toolchain-version -: -$* <'stdin:2:19: error: invalid task request toolchain version: invalid major version' == 1 -: 1 -toolchain-version: -EOI - -: invalid-fingerprint -: -$* <'stdin:2:14: error: invalid task request fingerprint' == 1 -: 1 -fingerprint: 123x -EOI - -: missed -: -{ - : agent - : - $* <'stdin:3:1: error: no task request agent specified' == 1 - : 1 - fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e - EOI -} - -: no-machines -: -$* <'stdin:6:1: error: no task request machines specified' == 1 -: 1 -agent: upsa -toolchain-name: queue -toolchain-version: 0.5.0 -fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e -EOI diff --git a/tests/manifest/task-request.testscript b/tests/manifest/task-request.testscript new file mode 100644 index 0000000..5a60271 --- /dev/null +++ b/tests/manifest/task-request.testscript @@ -0,0 +1,127 @@ +# file : tests/manifest/task-request.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -tq + +: valid +: +: Roundtrip the task request manifest. +: +{ + : all-values + : + $* <>EOF + : 1 + agent: upsa + toolchain-name: queue + toolchain-version: 0.5.0 + fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e + : + id: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + name: windows_10-msvc_14 + summary: Windows 10 build 1607 with VC 14 update 3 + EOF + + : no-fingerprint + : + $* <>EOF + : 1 + agent: upsa + toolchain-name: queue + toolchain-version: 0.5.0 + : + id: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 + name: windows_10-msvc_14 + summary: Windows 10 build 1607 with VC 14 update 3 + EOF +} + +: redefinition +: +{ + : agent + : + $* <'stdin:3:1: error: task request agent redefinition' == 1 + : 1 + agent: upsa + agent: upsa + EOI + + : toolchain-name + : + $* <'stdin:3:1: error: task request toolchain name redefinition' == 1 + : 1 + toolchain-name: queue + toolchain-name: queue + EOI + + : toolchain-version + : + $* <'stdin:3:1: error: task request toolchain version redefinition' == 1 + : 1 + toolchain-version: 0.5.0 + toolchain-version: 0.5.0 + EOI + + : fingerprint + : + $* <'stdin:3:1: error: task request fingerprint redefinition' == 1 + : 1 + fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e + fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e + EOI +} + +: empty +: +{ + : agent + : + $* <'stdin:2:7: error: empty task request agent' == 1 + : 1 + agent: + EOI + + : toolchain-name + : + $* <'stdin:2:16: error: empty task request toolchain name' == 1 + : 1 + toolchain-name: + EOI +} + +: invalid-toolchain-version +: +$* <'stdin:2:19: error: invalid task request toolchain version: invalid major version' == 1 +: 1 +toolchain-version: +EOI + +: invalid-fingerprint +: +$* <'stdin:2:14: error: invalid task request fingerprint' == 1 +: 1 +fingerprint: 123x +EOI + +: missed +: +{ + : agent + : + $* <'stdin:3:1: error: no task request agent specified' == 1 + : 1 + fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e + EOI +} + +: no-machines +: +$* <'stdin:6:1: error: no task request machines specified' == 1 +: 1 +agent: upsa +toolchain-name: queue +toolchain-version: 0.5.0 +fingerprint: 1105fb394ee870adb154b7abfbbae5755df7dcef6c81db34e8d1b68d2653734e +EOI diff --git a/tests/manifest/task-response.test b/tests/manifest/task-response.test deleted file mode 100644 index c823160..0000000 --- a/tests/manifest/task-response.test +++ /dev/null @@ -1,165 +0,0 @@ -# file : tests/manifest/task-response.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -test.options += -ts - -: valid -: -: Roundtrip the task response manifest. -: -{ - : session-not-empty - : - { - : all-values - : - $* <>EOF - : 1 - session: abcd - challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 - result-url: https://cppget.org/?build-result - : - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - machine: windows_10-msvc_14 - target: x86_64-microsoft-win32-msvc14.0 - EOF - - : no-challenge - : - $* <>EOF - : 1 - session: abcd - result-url: https://cppget.org/?build-result - : - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - machine: windows_10-msvc_14 - target: x86_64-microsoft-win32-msvc14.0 - EOF - } - - : session-empty - : - $* <>EOF - : 1 - session: - EOF -} - -: redefinition -: -{ - : session - : - $* <'stdin:3:1: error: task response session redefinition' == 1 - : 1 - session: abcd - session: abcd - EOI - - : challenge - : - $* <'stdin:3:1: error: task response challenge redefinition' == 1 - : 1 - challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 - challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 - EOI - - : result-url - : - $* <'stdin:3:1: error: task response result url redefinition' == 1 - : 1 - result-url: https://cppget.org/?build-result - result-url: https://cppget.org/?build-result - EOI -} - -: invalid -: -{ - : challenge - : - { - : size - : - $* <'stdin:2:12: error: invalid task response challenge' == 1 - : 1 - challenge: abc - EOI - - : redundant - : - $* <'stdin:4:1: error: unexpected task response challenge' == 1 - : 1 - session: - challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 - EOI - } - - : result-url - : - { - : empty - : - $* <'stdin:2:12: error: empty task response result url' == 1 - : 1 - result-url: - EOI - - : redundant - : - $* <'stdin:4:1: error: unexpected task response result url' == 1 - : 1 - session: - result-url: https://cppget.org/?build-result - EOI - } - - : task-unexpected - : - $* <'stdin:3:1: error: single task response manifest expected' == 1 - : 1 - session: - : - EOI -} - -: unknown-name -: -$* <"stdin:2:1: error: unknown name 'x' in task response manifest" == 1 -: 1 -x: -EOI - -: missed -: -{ - : session - : - $* <'stdin:2:1: error: no task response session specified' == 1 - : 1 - EOI - - : result-url - : - $* <'stdin:4:1: error: no task response result url specified' == 1 - : 1 - session: abc - challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 - EOI - - : task - : - $* <'stdin:5:1: error: task manifest expected' == 1 - : 1 - session: abcd - challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 - result-url: https://cppget.org/?build-result - EOI -} diff --git a/tests/manifest/task-response.testscript b/tests/manifest/task-response.testscript new file mode 100644 index 0000000..b424cbf --- /dev/null +++ b/tests/manifest/task-response.testscript @@ -0,0 +1,165 @@ +# file : tests/manifest/task-response.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -ts + +: valid +: +: Roundtrip the task response manifest. +: +{ + : session-not-empty + : + { + : all-values + : + $* <>EOF + : 1 + session: abcd + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + result-url: https://cppget.org/?build-result + : + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows_10-msvc_14 + target: x86_64-microsoft-win32-msvc14.0 + EOF + + : no-challenge + : + $* <>EOF + : 1 + session: abcd + result-url: https://cppget.org/?build-result + : + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows_10-msvc_14 + target: x86_64-microsoft-win32-msvc14.0 + EOF + } + + : session-empty + : + $* <>EOF + : 1 + session: + EOF +} + +: redefinition +: +{ + : session + : + $* <'stdin:3:1: error: task response session redefinition' == 1 + : 1 + session: abcd + session: abcd + EOI + + : challenge + : + $* <'stdin:3:1: error: task response challenge redefinition' == 1 + : 1 + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + EOI + + : result-url + : + $* <'stdin:3:1: error: task response result url redefinition' == 1 + : 1 + result-url: https://cppget.org/?build-result + result-url: https://cppget.org/?build-result + EOI +} + +: invalid +: +{ + : challenge + : + { + : size + : + $* <'stdin:2:12: error: invalid task response challenge' == 1 + : 1 + challenge: abc + EOI + + : redundant + : + $* <'stdin:4:1: error: unexpected task response challenge' == 1 + : 1 + session: + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + EOI + } + + : result-url + : + { + : empty + : + $* <'stdin:2:12: error: empty task response result url' == 1 + : 1 + result-url: + EOI + + : redundant + : + $* <'stdin:4:1: error: unexpected task response result url' == 1 + : 1 + session: + result-url: https://cppget.org/?build-result + EOI + } + + : task-unexpected + : + $* <'stdin:3:1: error: single task response manifest expected' == 1 + : 1 + session: + : + EOI +} + +: unknown-name +: +$* <"stdin:2:1: error: unknown name 'x' in task response manifest" == 1 +: 1 +x: +EOI + +: missed +: +{ + : session + : + $* <'stdin:2:1: error: no task response session specified' == 1 + : 1 + EOI + + : result-url + : + $* <'stdin:4:1: error: no task response result url specified' == 1 + : 1 + session: abc + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + EOI + + : task + : + $* <'stdin:5:1: error: task manifest expected' == 1 + : 1 + session: abcd + challenge: cc6585375ef81898cc60791b11852e3d2ed9ebb82ebb0874010fe0e6f9ebdb73 + result-url: https://cppget.org/?build-result + EOI +} diff --git a/tests/manifest/task.test b/tests/manifest/task.test deleted file mode 100644 index e3f413e..0000000 --- a/tests/manifest/task.test +++ /dev/null @@ -1,343 +0,0 @@ -# file : tests/manifest/task.test -# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd -# license : MIT; see accompanying LICENSE file - -test.options += -t - -: valid -: -: Roundtrip the task manifest. -: -{ - : all-names - : - $* <>EOF - : 1 - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - trust: AB:0D:3F:C1:B0:13:E4:0E:AD:4A:08:06:AE:F3:85:DB:E2:27:5F:83:11:47:A2:7\ - 8:64:3C:73:60:F8:66:3A:A4 - machine: windows_10-msvc_14 - target: x86_64-microsoft-win32-msvc14.0 - config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG - warning-regex: '^warning: ' '^.+: warning: ' - EOF - - : no-config-no-regex - : - $* <>EOF - : 1 - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - machine: windows_10-msvc_14 - target: x86_64-microsoft-win32-msvc14.0 - EOF - - : config - : - { - : empty-var-value - : - $* <>EOF - : 1 - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - machine: windows - target: x86_64-microsoft-win32-msvc14.0 - config: abc= - EOF - - : var-value-quoting - : - $* <>EOF - : 1 - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - machine: windows - target: x86_64-microsoft-win32-msvc14.0 - config: abc='a "b '"d\e x y=" - EOF - } - - : trust-yes - : - $* <>EOF - : 1 - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - trust: yes - machine: windows_10-msvc_14 - target: x86_64-microsoft-win32-msvc14.0 - config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG - EOF -} - -: redefinition -: -{ - : name - : - $* <'stdin:3:1: error: task package name redefinition' == 1 - : 1 - name: libfoo - name: libfoo - EOI - - : version - : - $* <'stdin:3:1: error: task package version redefinition' == 1 - : 1 - version: 1.0 - version: 1.0 - EOI - - : repository - : - $* <'stdin:3:1: error: task repository URL redefinition' == 1 - : 1 - repository-url: http://pkg.example.org/1/math - repository-url: http://pkg.example.org/1/math - EOI - - : machine - : - $* <'stdin:3:1: error: task machine redefinition' == 1 - : 1 - machine: windows_10-msvc_14 - machine: windows_10-msvc_14 - EOI - - : target - : - $* <'stdin:3:1: error: task target redefinition' == 1 - : 1 - target: x86_64-microsoft-win32-msvc14.0 - target: x86_64-microsoft-win32-msvc14.0 - EOI - - : config - : - $* <'stdin:3:1: error: task configuration redefinition' == 1 - : 1 - config: config.cc.coptions=/Z7 - config: config.cc.loptions=/DEBUG - EOI - - : warning-regex - : - $* <'stdin:3:1: error: task warning regex redefinition' == 1 - : 1 - warning-regex: '^warning: ' - warning-regex: '^.+: warning: ' - EOI -} - -: invalid -: -{ - : name-empty - : - $* <'stdin:2:6: error: invalid task package name: length is less than two characters' == 1 - : 1 - name: - EOI - - : version - : - { - : empty - : - $* <'stdin:2:9: error: invalid task package version: unexpected end' == 1 - : 1 - version: - EOI - - : release - : - $* <'stdin:2:10: error: invalid task package version release' == 1 - : 1 - version: 1.2.3- - EOI - } - - : repository - : - { - : url - : - $* <>EOE == 1 - : 1 - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/math - repository-type: pkg - machine: windows_10-msvc_14 - target: x86_64-microsoft-win32-msvc14.0 - EOI - stdin:4:17: error: invalid task repository URL: missing repository version - EOE - - : type - : - $* <>EOE == 1 - : 1 - repository-type: svn - EOI - stdin:2:18: error: invalid task repository type 'svn' - EOE - } - - : machine-empty - : - $* <'stdin:2:9: error: empty task machine' == 1 - : 1 - machine: - EOI - - : target-empty - : - $* <'stdin:2:8: error: invalid task target: missing cpu' == 1 - : 1 - target: - EOI - - : config - : - { - : empty - : - $* <'stdin:2:8: error: empty task configuration' == 1 - : 1 - config: - EOI - - : bad-field - : - $* <'stdin:2:15: error: invalid task configuration: unterminated quoted string' == 1 - : 1 - config: 'abc=x - EOI - - : multiline - : - { - : bad-field - : - $* <'stdin:3:7: error: invalid task configuration: unterminated quoted string' == 1 - : 1 - config: \ - 'abc=x - \ - EOI - } - } - - : warning-regex - : - { - : empty - : - $* <'stdin:2:15: error: empty task warning regex' == 1 - : 1 - warning-regex: - EOI - - : regex-error - : - $* <>~/EOE/ == 1 - : 1 - warning-regex: '^[warning: ' - EOI - /stdin:2:16: error: invalid task warning regex: invalid regex.*/ - EOE - } - - : trust - : - $* <'stdin:2:8: error: invalid repository certificate fingerprint' == 1 - : 1 - trust: abc - EOI -} - -: unknown-name -: -$* <"stdin:2:1: error: unknown name 'x' in task manifest" == 1 -: 1 -x: -EOI - -: missed -: -{ - : name - : - $* <'stdin:6:1: error: no task package name specified' == 1 - : 1 - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - machine: windows_10-msvc_14 - EOI - - : version - : - $* <'stdin:6:1: error: no task package version specified' == 1 - : 1 - name: libfoo - repository-url: http://pkg.example.org/1/math - repository-type: pkg - machine: windows_10-msvc_14 - EOI - - : repository-url - : - $* <'stdin:6:1: error: no task repository URL specified' == 1 - : 1 - name: libfoo - version: 1.0 - machine: windows_10-msvc_14 - repository-type: git - EOI - - : repository-type - : - $* <'stdin:6:1: error: no task repository type specified' == 1 - : 1 - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - machine: windows_10-msvc_14 - EOI - - : machine - : - $* <'stdin:6:1: error: no task machine specified' == 1 - : 1 - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - EOI - - : target - : - $* <'stdin:7:1: error: no task target specified' == 1 - : 1 - name: libfoo - version: 1.0 - repository-url: http://pkg.example.org/1/math - repository-type: pkg - machine: windows_10-msvc_14 - EOI -} diff --git a/tests/manifest/task.testscript b/tests/manifest/task.testscript new file mode 100644 index 0000000..e68bd09 --- /dev/null +++ b/tests/manifest/task.testscript @@ -0,0 +1,343 @@ +# file : tests/manifest/task.testscript +# copyright : Copyright (c) 2014-2018 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -t + +: valid +: +: Roundtrip the task manifest. +: +{ + : all-names + : + $* <>EOF + : 1 + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + trust: AB:0D:3F:C1:B0:13:E4:0E:AD:4A:08:06:AE:F3:85:DB:E2:27:5F:83:11:47:A2:7\ + 8:64:3C:73:60:F8:66:3A:A4 + machine: windows_10-msvc_14 + target: x86_64-microsoft-win32-msvc14.0 + config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG + warning-regex: '^warning: ' '^.+: warning: ' + EOF + + : no-config-no-regex + : + $* <>EOF + : 1 + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows_10-msvc_14 + target: x86_64-microsoft-win32-msvc14.0 + EOF + + : config + : + { + : empty-var-value + : + $* <>EOF + : 1 + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows + target: x86_64-microsoft-win32-msvc14.0 + config: abc= + EOF + + : var-value-quoting + : + $* <>EOF + : 1 + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows + target: x86_64-microsoft-win32-msvc14.0 + config: abc='a "b '"d\e x y=" + EOF + } + + : trust-yes + : + $* <>EOF + : 1 + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + trust: yes + machine: windows_10-msvc_14 + target: x86_64-microsoft-win32-msvc14.0 + config: config.cc.coptions=/Z7 config.cc.loptions=/DEBUG + EOF +} + +: redefinition +: +{ + : name + : + $* <'stdin:3:1: error: task package name redefinition' == 1 + : 1 + name: libfoo + name: libfoo + EOI + + : version + : + $* <'stdin:3:1: error: task package version redefinition' == 1 + : 1 + version: 1.0 + version: 1.0 + EOI + + : repository + : + $* <'stdin:3:1: error: task repository URL redefinition' == 1 + : 1 + repository-url: http://pkg.example.org/1/math + repository-url: http://pkg.example.org/1/math + EOI + + : machine + : + $* <'stdin:3:1: error: task machine redefinition' == 1 + : 1 + machine: windows_10-msvc_14 + machine: windows_10-msvc_14 + EOI + + : target + : + $* <'stdin:3:1: error: task target redefinition' == 1 + : 1 + target: x86_64-microsoft-win32-msvc14.0 + target: x86_64-microsoft-win32-msvc14.0 + EOI + + : config + : + $* <'stdin:3:1: error: task configuration redefinition' == 1 + : 1 + config: config.cc.coptions=/Z7 + config: config.cc.loptions=/DEBUG + EOI + + : warning-regex + : + $* <'stdin:3:1: error: task warning regex redefinition' == 1 + : 1 + warning-regex: '^warning: ' + warning-regex: '^.+: warning: ' + EOI +} + +: invalid +: +{ + : name-empty + : + $* <'stdin:2:6: error: invalid task package name: length is less than two characters' == 1 + : 1 + name: + EOI + + : version + : + { + : empty + : + $* <'stdin:2:9: error: invalid task package version: unexpected end' == 1 + : 1 + version: + EOI + + : release + : + $* <'stdin:2:10: error: invalid task package version release' == 1 + : 1 + version: 1.2.3- + EOI + } + + : repository + : + { + : url + : + $* <>EOE == 1 + : 1 + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/math + repository-type: pkg + machine: windows_10-msvc_14 + target: x86_64-microsoft-win32-msvc14.0 + EOI + stdin:4:17: error: invalid task repository URL: missing repository version + EOE + + : type + : + $* <>EOE == 1 + : 1 + repository-type: svn + EOI + stdin:2:18: error: invalid task repository type 'svn' + EOE + } + + : machine-empty + : + $* <'stdin:2:9: error: empty task machine' == 1 + : 1 + machine: + EOI + + : target-empty + : + $* <'stdin:2:8: error: invalid task target: missing cpu' == 1 + : 1 + target: + EOI + + : config + : + { + : empty + : + $* <'stdin:2:8: error: empty task configuration' == 1 + : 1 + config: + EOI + + : bad-field + : + $* <'stdin:2:15: error: invalid task configuration: unterminated quoted string' == 1 + : 1 + config: 'abc=x + EOI + + : multiline + : + { + : bad-field + : + $* <'stdin:3:7: error: invalid task configuration: unterminated quoted string' == 1 + : 1 + config: \ + 'abc=x + \ + EOI + } + } + + : warning-regex + : + { + : empty + : + $* <'stdin:2:15: error: empty task warning regex' == 1 + : 1 + warning-regex: + EOI + + : regex-error + : + $* <>~/EOE/ == 1 + : 1 + warning-regex: '^[warning: ' + EOI + /stdin:2:16: error: invalid task warning regex: invalid regex.*/ + EOE + } + + : trust + : + $* <'stdin:2:8: error: invalid repository certificate fingerprint' == 1 + : 1 + trust: abc + EOI +} + +: unknown-name +: +$* <"stdin:2:1: error: unknown name 'x' in task manifest" == 1 +: 1 +x: +EOI + +: missed +: +{ + : name + : + $* <'stdin:6:1: error: no task package name specified' == 1 + : 1 + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows_10-msvc_14 + EOI + + : version + : + $* <'stdin:6:1: error: no task package version specified' == 1 + : 1 + name: libfoo + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows_10-msvc_14 + EOI + + : repository-url + : + $* <'stdin:6:1: error: no task repository URL specified' == 1 + : 1 + name: libfoo + version: 1.0 + machine: windows_10-msvc_14 + repository-type: git + EOI + + : repository-type + : + $* <'stdin:6:1: error: no task repository type specified' == 1 + : 1 + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + machine: windows_10-msvc_14 + EOI + + : machine + : + $* <'stdin:6:1: error: no task machine specified' == 1 + : 1 + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + EOI + + : target + : + $* <'stdin:7:1: error: no task target specified' == 1 + : 1 + name: libfoo + version: 1.0 + repository-url: http://pkg.example.org/1/math + repository-type: pkg + machine: windows_10-msvc_14 + EOI +} -- cgit v1.1