blob: 4df54717d1feb8eaba61e8097819e026908df444 [file] [log] [blame]
// Copyright 2016 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "test.h"
#include <lib/driver/component/cpp/driver_export.h>
zx::result<> TestDriver::Start() {
fuchsia_driver_framework::DevfsAddArgs devfs_args(
{.connector_supports{fuchsia_device_fs::ConnectionType::kController}});
// Create a child that driver-test-realm tests can watch for.
zx::result child = AddOwnedChild("test2", devfs_args);
if (child.is_error()) {
fdf::error("Failed to add child: {}", child);
return child.take_error();
}
child_ = std::move(child.value());
return zx::ok();
}
FUCHSIA_DRIVER_EXPORT(TestDriver);