VirtualBox

source: vbox/trunk/src/VBox/Installer/linux/testcase/tstInstaller.sh@ 57643

Last change on this file since 57643 was 56299, checked in by vboxsync, 9 years ago

Installer: Updated (C) year.

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Author Date Id Revision
File size: 2.5 KB
Line 
1#!/bin/sh
2#
3# Oracle VM VirtualBox
4# VirtualBox linux installation script unit test
5
6#
7# Copyright (C) 2007-2015 Oracle Corporation
8#
9# This file is part of VirtualBox Open Source Edition (OSE), as
10# available from http://www.virtualbox.org. This file is free software;
11# you can redistribute it and/or modify it under the terms of the GNU
12# General Public License (GPL) as published by the Free Software
13# Foundation, in version 2 as it comes in the "COPYING" file of the
14# VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15# hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16#
17
18#include installer-common.sh
19
20echo Testing udev rule generation
21
22setup_test_install_udev
23
24TEST_UDEV_VERSION=55
25
26udev_55_rules=`cat <<UDEV_END
27KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"
28SUBSYSTEM=="usb_device", ACTION=="add", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
29SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
30SUBSYSTEM=="usb_device", ACTION=="remove", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"
31SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"
32UDEV_END
33
34install_udev_output="`install_udev_run`"
35case "$install_udev_output" in
36 "$udev_55_rules") ;;
37 *)
38 echo "Bad output for udev version 55. Expected:"
39 echo "$udev_55_rules"
40 echo "Actual:"
41 echo "$install_udev_output"
42 ;;
43esac
44
45TEST_UDEV_VERSION=54
46
47udev_54_rules=`cat <<UDEV_END
48KERNEL="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="vboxusers", MODE="0660"
49SUBSYSTEM="usb_device", ACTION="add", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
50SUBSYSTEM="usb", ACTION="add", ENV{DEVTYPE}="usb_device", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass}"
51SUBSYSTEM="usb_device", ACTION="remove", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"
52SUBSYSTEM="usb", ACTION="remove", ENV{DEVTYPE}="usb_device", RUN="/opt/VirtualBox/VBoxCreateUSBNode.sh --remove $major $minor"
53UDEV_END
54
55install_udev_output="`install_udev_run`"
56case "$install_udev_output" in
57 "$udev_54_rules") ;;
58 *)
59 echo "Bad output for udev version 54. Expected:"
60 echo "$udev_54_rules"
61 echo "Actual:"
62 echo "$install_udev_output"
63 ;;
64esac
65
66echo Done.
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette