chiark / gitweb /
[PATCH] fix up the tests to work without all of the environ variables.
[elogind.git] / test / topo_test
1 #!/bin/bash
2
3 RULES=replace_test.rules
4 CONFIG=replace_test.conf
5
6 export UDEV_TEST=yes
7 export SYSFS_PATH=$PWD/sys/
8 export UDEV_CONFIG_FILE=$PWD/$CONFIG
9
10 cat > $RULES << EOF
11 TOPOLOGY, BUS="scsi", place="0:0:0:0", NAME="first_disk%n"
12 EOF
13
14 cat > $CONFIG << EOF
15 udev_root="$PWD/udev/"
16 udev_db="$PWD/udev/.udev.tdb"
17 udev_rules="$PWD/$RULES"
18 udev_permissions="$PWD/udev.permissions"
19 EOF
20
21 export ACTION=add
22 export DEVPATH=block/sda
23
24 ../udev block
25 ls udev
26
27 export DEVPATH=block/sda/sda3
28
29 ../udev block
30 ls udev
31
32 export ACTION=remove
33 export DEVPATH=block/sda
34
35 ../udev block
36 ls udev
37
38 export DEVPATH=block/sda/sda3
39
40 ../udev block
41 ls udev
42
43 rm $RULES
44 rm $CONFIG