VirtualBox

Ignore:
Timestamp:
May 17, 2011 11:26:00 AM (14 years ago)
Author:
vboxsync
Message:

Installer/linux: refactored udev rule installation

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Installer/linux/testcase/tstInstallerLinux.sh

    r37123 r37124  
    2020CERRS=0
    2121
    22 echo "Testing udev rule generation for the \".run\" installer"
     22echo "Testing udev rule generation"
    2323
    2424setup_test_input_install_udev ".run, udev-59" 59
     
    3232UDEV_END`
    3333
    34 install_udev_output="`install_udev_run vboxusers 0660 /opt/VirtualBox`"
     34install_udev_output="`install_udev vboxusers 0660 /opt/VirtualBox`"
    3535case "$install_udev_output" in
    3636    "$udev_59_rules") ;;
     
    5252UDEV_END`
    5353
    54 install_udev_output="`install_udev_run vboxusers 0660 /opt/VirtualBox`"
     54install_udev_output="`install_udev vboxusers 0660 /opt/VirtualBox`"
    5555case "$install_udev_output" in
    5656    "$udev_55_rules") ;;
     
    7272UDEV_END`
    7373
    74 install_udev_output="`install_udev_run root 0600 /usr/lib/virtualbox`"
     74install_udev_output="`install_udev root 0600 /usr/lib/virtualbox`"
    7575case "$install_udev_output" in
    7676    "$udev_54_rules") ;;
     
    8686cleanup_test_input_install_udev
    8787
    88 echo "Testing udev rule generation for the \"package\" installer"
    89 
    90 setup_test_input_install_udev "package, udev-59" 59
    91 
    92 udev_59_rules=`cat <<'UDEV_END'
    93 KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
    94 SUBSYSTEM=="usb_device", ACTION=="add", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"
    95 SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh $major $minor $attr{bDeviceClass} vboxusers"
    96 SUBSYSTEM=="usb_device", ACTION=="remove", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
    97 SUBSYSTEM=="usb", ACTION=="remove", ENV{DEVTYPE}=="usb_device", RUN+="/usr/share/virtualbox/VBoxCreateUSBNode.sh --remove $major $minor"
    98 UDEV_END`
    99 
    100 install_udev_output="`install_udev_package vboxusers`"
    101 case "$install_udev_output" in
    102     "$udev_59_rules") ;;
    103     *)
    104         echo "Bad output for udev version 59.  Expected:"
    105         echo "$udev_59_rules"
    106         echo "Actual:"
    107         echo "$install_udev_output"
    108         CERRS="`expr "$CERRS" + 1`"
    109         ;;
    110 esac
    111 
    112 cleanup_test_input_install_udev
    113 
    114 setup_test_input_install_udev "package, udev-55" 55
    115 
    116 udev_55_rules=`cat <<'UDEV_END'
    117 KERNEL=="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
    118 UDEV_END`
    119 
    120 install_udev_output="`install_udev_package vboxusers`"
    121 case "$install_udev_output" in
    122     "$udev_55_rules") ;;
    123     *)
    124         echo "Bad output for udev version 55.  Expected:"
    125         echo "$udev_55_rules"
    126         echo "Actual:"
    127         echo "$install_udev_output"
    128         CERRS="`expr "$CERRS" + 1`"
    129         ;;
    130 esac
    131 
    132 cleanup_test_input_install_udev
    133 
    134 setup_test_input_install_udev "package, udev-54" 54
    135 
    136 udev_54_rules=`cat <<'UDEV_END'
    137 KERNEL="vboxdrv", NAME="vboxdrv", OWNER="root", GROUP="root", MODE="0600"
    138 UDEV_END`
    139 
    140 install_udev_output="`install_udev_package root`"
    141 case "$install_udev_output" in
    142     "$udev_54_rules") ;;
    143     *)
    144         echo "Bad output for udev version 54.  Expected:"
    145         echo "$udev_54_rules"
    146         echo "Actual:"
    147         echo "$install_udev_output"
    148         CERRS="`expr "$CERRS" + 1`"
    149         ;;
    150 esac
    151 
    152 cleanup_test_input_install_udev
    153 
    154 setup_test_input_install_udev "package, no udev" 54
    155 INSTALL_NO_UDEV=1
    156 
    157 install_udev_output="`install_udev_package root`"
    158 case "$install_udev_output" in
    159     "") ;;
    160     *)
    161         echo "Bad output for udev version 54.  Expected:"
    162         echo "$udev_54_rules"
    163         echo "Actual:"
    164         echo "$install_udev_output"
    165         CERRS="`expr "$CERRS" + 1`"
    166         ;;
    167 esac
    168 
    169 cleanup_test_input_install_udev
    170 INSTALL_NO_UDEV=
    171 
    17288echo "Done.  Error count $CERRS."
Note: See TracChangeset for help on using the changeset viewer.

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