diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2017-03-29 00:45:30 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2017-04-04 13:35:14 +0300 |
commit | dd973d03bf5f3f439dcdacbb22470105e66e698a (patch) | |
tree | 6856ab313c75f3459df80511c98d3f788bf1c22b /tests/manifest/result.test | |
parent | c72bbd5d04084547c53e9593af4d76d9e5135a53 (diff) |
Implement manifests and build_config
Diffstat (limited to 'tests/manifest/result.test')
-rw-r--r-- | tests/manifest/result.test | 230 |
1 files changed, 230 insertions, 0 deletions
diff --git a/tests/manifest/result.test b/tests/manifest/result.test new file mode 100644 index 0000000..52964e0 --- /dev/null +++ b/tests/manifest/result.test @@ -0,0 +1,230 @@ +# file : tests/manifest/result.test +# copyright : Copyright (c) 2014-2017 Code Synthesis Ltd +# license : MIT; see accompanying LICENSE file + +test.options += -r + +: valid +: +: Roundtrip the result manifest. +: +{ + : test-error + : + $* <<EOF >>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 >>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 >>EOF + : 1 + name: libfoo + version: 1.0 + status: abort + EOF +} + +: redefinition +: +{ + : name + : + $* <<EOI 2>'stdin:3:1: error: result package name redefinition' == 1 + : 1 + name: libfoo + name: libfoo + EOI + + : version + : + $* <<EOI 2>'stdin:3:1: error: result package version redefinition' == 1 + : 1 + version: 1.0 + version: 1.0 + EOI + + : status + : + $* <<EOI 2>'stdin:3:1: error: result status redefinition' == 1 + : 1 + status: success + status: error + EOI + + : configure-status + : + $* <<EOI 2>'stdin:4:1: error: result configure-status redefinition' == 1 + : 1 + status: success + configure-status: success + configure-status: abnormal + EOI + + : configure-log + : + $* <<EOI 2>'stdin:5:1: error: unexpected configure-log' == 1 + : 1 + status: success + configure-status: success + configure-log: configured + configure-log: configured + EOI +} + +: invalid +: +{ + : name-empty + : + $* <<EOI 2>'stdin:2:6: error: empty result package name' == 1 + : 1 + name: + EOI + + : version + : + { + : empty + : + $* <<EOI 2>'stdin:2:9: error: invalid result package version: unexpected end' == 1 + : 1 + version: + EOI + + : release + : + $* <<EOI 2>'stdin:2:10: error: invalid result package version release' == 1 + : 1 + version: 1.2.3- + EOI + } + + : status + : + $* <<EOI 2>'stdin:2:9: error: invalid result status' == 1 + : 1 + status: alert + EOI + + : configure-status + : + $* <<EOI 2>'stdin:3:19: error: invalid configure-status' == 1 + : 1 + status: abort + configure-status: alert + EOI + + : order + : + { + : op-status-before-status + : + $* <<EOI 2>'stdin:2:1: error: result status must appear first' == 1 + : 1 + configure-status: success + EOI + + : op-status-after-log + : + $* <<EOI 2>'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 + : + $* <<EOI 2>'stdin:5:1: error: configure-log is expected' == 1 + : 1 + status: success + configure-status: success + update-status: error + update-log: log + EOI + } +} + +: unknown-name +: +$* <<EOI 2>"stdin:2:1: error: unknown name 'full-logs' in result manifest" == 1 +: 1 +full-logs: log +EOI + +: missed +: +{ + : name + : + $* <<EOI 2>'stdin:4:1: error: no result package name specified' == 1 + : 1 + version: 1.0 + status: success + EOI + + : version + : + $* <<EOI 2>'stdin:4:1: error: no result package version specified' == 1 + : 1 + name: libfoo + status: success + EOI + + : status + : + $* <<EOI 2>'stdin:4:1: error: no result status specified' == 1 + : 1 + name: libfoo + version: 1.0 + EOI + + : configure-log + : + $* <<EOI 2>'stdin:6:1: error: no result configure-log specified' == 1 + : 1 + name: libfoo + version: 1.0 + status: error + configure-status: error + EOI +} |