chiark / gitweb /
[PATCH] allow to match against empty key values
[elogind.git] / test / replace_test
index 0caa4df..6e01f28 100644 (file)
@@ -1,21 +1,33 @@
 #!/bin/bash
 
-export UDEV_TEST=yes
+RULES=replace_test.rules
+CONFIG=replace_test.conf
+
 export SYSFS_PATH=$PWD/sys/
-export UDEV_CONFIG_DIR=$PWD/
-export UDEV_ROOT=$PWD/udev/
-export UDEV_DB=udev.tdb
-export UDEV_CONFIG_FILE=replace_test.config
-export UDEV_PERMISSION_FILE=udev.permissions
+export UDEV_CONFIG_FILE=$PWD/$CONFIG
+
+cat > $RULES << EOF
+KERNEL="ttyUSB0", NAME="visor"
+EOF
+
+cat > $CONFIG << EOF
+udev_root="$PWD/udev/"
+udev_db="$PWD/udev/.udevdb"
+udev_rules="$PWD/$RULES"
+EOF
+
+mkdir udev
 
 export DEVPATH=class/tty/ttyUSB0
 export ACTION=add
 
 ../udev tty
-ls udev
+ls -l udev
 
 export ACTION=remove
 ../udev tty
-ls udev
-
+ls -l udev
 
+rm $RULES
+rm $CONFIG
+rm -rf udev