aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/agent/agent.cxx3
-rw-r--r--bbot/machine-manifest.cxx10
-rw-r--r--bbot/machine-manifest.hxx7
-rw-r--r--unit-tests/machine-manifest/testscript15
4 files changed, 32 insertions, 3 deletions
diff --git a/bbot/agent/agent.cxx b/bbot/agent/agent.cxx
index dac70ee..ea0bb34 100644
--- a/bbot/agent/agent.cxx
+++ b/bbot/agent/agent.cxx
@@ -311,7 +311,8 @@ try
mh.summary,
machine_type::kvm,
string ("de:ad:be:ef:de:ad"),
- nullopt},
+ nullopt,
+ strings ()},
toolchain_manifest {tc_id},
bootstrap_manifest {}
});
diff --git a/bbot/machine-manifest.cxx b/bbot/machine-manifest.cxx
index be921d9..b30d551 100644
--- a/bbot/machine-manifest.cxx
+++ b/bbot/machine-manifest.cxx
@@ -144,6 +144,13 @@ namespace bbot
options = move (op);
}
+ else if (n == "changes")
+ {
+ if (v.empty ())
+ bad_value ("empty machine changes");
+
+ changes.emplace_back (move (v));
+ }
else if (!iu)
bad_name ("unknown name '" + n + "' in machine manifest");
}
@@ -187,6 +194,9 @@ namespace bbot
s.next ("options", v);
}
+ for (const string& c: changes)
+ s.next ("changes", c);
+
s.next ("", ""); // End of manifest.
}
diff --git a/bbot/machine-manifest.hxx b/bbot/machine-manifest.hxx
index efcdda4..47dd7ac 100644
--- a/bbot/machine-manifest.hxx
+++ b/bbot/machine-manifest.hxx
@@ -36,6 +36,7 @@ namespace bbot
machine_type type;
optional<string> mac; // Required in bootstrapped machine manifest.
optional<strings> options; // Note: could be quoted.
+ strings changes;
strings
unquoted_options () const; // Return empty if absent.
@@ -45,13 +46,15 @@ namespace bbot
std::string s,
machine_type t,
optional<string> m,
- optional<strings> o)
+ optional<strings> o,
+ strings c)
: machine_header_manifest (std::move (i),
std::move (n),
std::move (s)),
type (t),
mac (std::move (m)),
- options (std::move (o)) {}
+ options (std::move (o)),
+ changes (std::move (c)) {}
public:
machine_manifest () = default; // VC export.
diff --git a/unit-tests/machine-manifest/testscript b/unit-tests/machine-manifest/testscript
index e264b41..7506796 100644
--- a/unit-tests/machine-manifest/testscript
+++ b/unit-tests/machine-manifest/testscript
@@ -20,6 +20,11 @@
type: kvm
mac: de:ad:be:ef:de:ad
options: -device "virtio-scsi-pci,id=scsi" -device "scsi-hd,drive=disk0"
+ changes: \
+ 0.7.0
+ - mac is changed to de:ad:be:ef:de:ad
+ - increased disk size to 30GB
+ \
EOF
: multi-line-options
@@ -152,6 +157,16 @@
\
EOI
}
+
+ : changes
+ :
+ $* <<EOI 2>'stdin:5:9: error: empty machine changes' == 1
+ : 1
+ id: a2b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
+ name: windows_10-msvc_14
+ summary: Windows 10 build 1607 with VC 14 update 3
+ changes:
+ EOI
}
: missed