Bluetooth: Mesh: shell: Add iv-update command

This command is needed to pass some IV Update-related PTS tests.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
diff --git a/subsys/bluetooth/host/mesh/shell.c b/subsys/bluetooth/host/mesh/shell.c
index 5f22447..391b4c7 100644
--- a/subsys/bluetooth/host/mesh/shell.c
+++ b/subsys/bluetooth/host/mesh/shell.c
@@ -660,6 +660,25 @@
 	return 0;
 }
 
+static int cmd_iv_update(int argc, char *argv[])
+{
+	if (!bt_mesh_is_provisioned()) {
+		printk("Not yet provisioned!\n");
+		return 0;
+	}
+
+	if (bt_mesh.iv_update) {
+		printk("Transitioning to IV Update Normal state\n");
+		bt_mesh_iv_update(bt_mesh.iv_index, false);
+	} else {
+		printk("Transitioning to IV Update In Progress state\n");
+		bt_mesh_iv_update(bt_mesh.iv_index + 1, true);
+		printk("New IV Index 0x%08x\n", bt_mesh.iv_index);
+	}
+
+	return 0;
+}
+
 static int cmd_beacon(int argc, char *argv[])
 {
 	u8_t status;
@@ -1760,7 +1779,9 @@
 	{ "netidx", cmd_netidx, "[NetIdx]" },
 	{ "appidx", cmd_appidx, "[AppIdx]" },
 
+	/* Commands which access internal APIs, for testing only */
 	{ "net-send", cmd_net_send, "<hex string>" },
+	{ "iv-update", cmd_iv_update, NULL },
 
 	/* Configuration Client Model operations */
 	{ "get-comp", cmd_get_comp, "[page]" },