blob: ed7f0b944f589dfce8fc1af3b0b333f1b399a2ee [file] [log] [blame]
# Copyright 2018 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
description "Load vivid module, required by camera tests on VM"
author ""
start on started system-services
# We use vivid, which emulates video4linux hardwares, to run camera tests on VM
# boards.
# By loading vivid in upstart, each test doesn't have to care whether a DUT is a
# VM or not.
# The following script loads vivid as a video capture device if the DUT is QEMU.
# |n_devs| in the module parameter is the number of instances to create.
# "0x1" for |node_types| represents a video capture device.
if grep -sq "^QEMU$" /sys/devices/virtual/dmi/id/sys_vendor; then
modprobe vivid n_devs=1 node_types=0x1
end script