]> sourceware.org Git - lvm2.git/commitdiff
tests: export many shell vars with 1 command
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 10 Jul 2017 11:33:55 +0000 (13:33 +0200)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 10 Jul 2017 12:23:53 +0000 (14:23 +0200)
test/Makefile.in
test/lib/inittest.sh

index c39959609d230fe97836f3d1f396bcdeb1f1b00f..eee9bf2f36eb26105fec27d384b5d4eee3e249e4 100644 (file)
@@ -273,22 +273,26 @@ lib/flavour-%: $(srcdir)/lib/flavour-%.sh .lib-dir-stamp
        cp $< $@
 
 lib/paths-common: $(srcdir)/Makefile.in .lib-dir-stamp Makefile
-       echo 'export DM_UDEV_SYNCHRONISATION=$(dm_udev_synchronisation)' >> $@-t
-       echo 'export THIN=@THIN@' >> $@-t
-       echo 'export RAID=@RAID@' >> $@-t
-       echo 'export CACHE=@CACHE@' >> $@-t
-       echo 'export LVMETAD_PIDFILE="@LVMETAD_PIDFILE@"' >> $@-t
-       echo 'export LVMPOLLD_PIDFILE="@LVMPOLLD_PIDFILE@"' >> $@-t
-       echo 'export DMEVENTD_PIDFILE="@DMEVENTD_PIDFILE@"' >> $@-t
-       echo 'export CLVMD_PIDFILE="@CLVMD_PIDFILE@"' >> $@-t
-       echo 'export LVM_TEST_THIN_CHECK_CMD=$${LVM_TEST_THIN_CHECK_CMD-@THIN_CHECK_CMD@}' >> $@-t
-       echo 'export LVM_TEST_THIN_DUMP_CMD=$${LVM_TEST_THIN_DUMP_CMD-@THIN_DUMP_CMD@}' >> $@-t
-       echo 'export LVM_TEST_THIN_REPAIR_CMD=$${LVM_TEST_THIN_REPAIR_CMD-@THIN_REPAIR_CMD@}' >> $@-t
-       echo 'export LVM_TEST_THIN_RESTORE_CMD=$${LVM_TEST_THIN_RESTORE_CMD-@THIN_RESTORE_CMD@}' >> $@-t
-       echo 'export LVM_TEST_CACHE_CHECK_CMD=$${LVM_TEST_CACHE_CHECK_CMD-@CACHE_CHECK_CMD@}' >> $@-t
-       echo 'export LVM_TEST_CACHE_DUMP_CMD=$${LVM_TEST_CACHE_DUMP_CMD-@CACHE_DUMP_CMD@}' >> $@-t
-       echo 'export LVM_TEST_CACHE_REPAIR_CMD=$${LVM_TEST_CACHE_REPAIR_CMD-@CACHE_REPAIR_CMD@}' >> $@-t
-       echo 'export LVM_TEST_CACHE_RESTORE_CMD=$${LVM_TEST_CACHE_RESTORE_CMD-@CACHE_RESTORE_CMD@}' >> $@-t
+       echo 'DM_UDEV_SYNCHRONISATION=$(dm_udev_synchronisation)' >> $@-t
+       echo 'THIN=@THIN@' >> $@-t
+       echo 'RAID=@RAID@' >> $@-t
+       echo 'CACHE=@CACHE@' >> $@-t
+       echo 'LVMETAD_PIDFILE="@LVMETAD_PIDFILE@"' >> $@-t
+       echo 'LVMPOLLD_PIDFILE="@LVMPOLLD_PIDFILE@"' >> $@-t
+       echo 'DMEVENTD_PIDFILE="@DMEVENTD_PIDFILE@"' >> $@-t
+       echo 'CLVMD_PIDFILE="@CLVMD_PIDFILE@"' >> $@-t
+       echo 'LVM_TEST_THIN_CHECK_CMD=$${LVM_TEST_THIN_CHECK_CMD-@THIN_CHECK_CMD@}' >> $@-t
+       echo 'LVM_TEST_THIN_DUMP_CMD=$${LVM_TEST_THIN_DUMP_CMD-@THIN_DUMP_CMD@}' >> $@-t
+       echo 'LVM_TEST_THIN_REPAIR_CMD=$${LVM_TEST_THIN_REPAIR_CMD-@THIN_REPAIR_CMD@}' >> $@-t
+       echo 'LVM_TEST_THIN_RESTORE_CMD=$${LVM_TEST_THIN_RESTORE_CMD-@THIN_RESTORE_CMD@}' >> $@-t
+       echo 'LVM_TEST_CACHE_CHECK_CMD=$${LVM_TEST_CACHE_CHECK_CMD-@CACHE_CHECK_CMD@}' >> $@-t
+       echo 'LVM_TEST_CACHE_DUMP_CMD=$${LVM_TEST_CACHE_DUMP_CMD-@CACHE_DUMP_CMD@}' >> $@-t
+       echo 'LVM_TEST_CACHE_REPAIR_CMD=$${LVM_TEST_CACHE_REPAIR_CMD-@CACHE_REPAIR_CMD@}' >> $@-t
+       echo 'LVM_TEST_CACHE_RESTORE_CMD=$${LVM_TEST_CACHE_RESTORE_CMD-@CACHE_RESTORE_CMD@}' >> $@-t
+       echo 'export DM_UDEV_SYNCHRONISATION THIN RAID CACHE\' >> $@-t
+       echo ' LVMETAD_PIDFILE LVMPOLLD_PIDFILE DMEVENTD_PIDFILE CLVMD_PIDFILE\' >> $@-t
+       echo ' LVM_TEST_THIN_CHECK_CMD LVM_TEST_THIN_DUMP_CMD LVM_TEST_THIN_REPAIR_CMD LVM_TEST_THIN_RESTORE_CMD\' >> $@-t
+       echo ' LVM_TEST_CACHE_CHECK_CMD LVM_TEST_CACHE_DUMP_CMD LVM_TEST_CACHE_REPAIR_CMD LVM_TEST_CACHE_RESTORE_CMD' >> $@-t
        mv $@-t $@
 
 lib/paths-installed: lib/paths-common
index f959b717404e609ff3f72f9eb03166fffb506a69..d3844b46710e9bba6fdeac8852ae86961df5885a 100644 (file)
@@ -57,9 +57,10 @@ TESTDIR=$(mkdtemp "${LVM_TEST_DIR:-/tmp}" "$PREFIX.XXXXXXXXXX") || \
 RUNNING_DMEVENTD=$(pgrep dmeventd || true)
 
 export TESTOLDPWD TESTDIR COMMON_PREFIX PREFIX RUNNING_DMEVENTD
-export LVM_LOG_FILE_EPOCH=DEBUG
-export LVM_LOG_FILE_MAX_LINES=100000
-export LVM_EXPECTED_EXIT_STATUS=1
+LVM_LOG_FILE_EPOCH=DEBUG
+LVM_LOG_FILE_MAX_LINES=100000
+LVM_EXPECTED_EXIT_STATUS=1
+export LVM_LOG_FILE_EPOCH LVM_LOG_FILE_MAX_LINES LVM_EXPECTED_EXIT_STATUS
 
 test -n "$BASH" && trap 'set +vx; STACKTRACE; set -vx' ERR
 trap 'aux teardown' EXIT # don't forget to clean up
This page took 0.036263 seconds and 5 git commands to generate.