diff options
author | Tom Gundersen <teg@jklm.no> | 2015-03-25 12:28:15 +0100 |
---|---|---|
committer | Tom Gundersen <teg@jklm.no> | 2015-03-27 16:23:46 +0100 |
commit | 333e07b793836442dc320c60d5ae66f95c4489e1 (patch) | |
tree | 55d6e6f15882d078e249b9f14cf1afbe8344a5a0 /test | |
parent | af3aa302741b6edb0729925febb5f8bc26721fe3 (diff) |
test: udev - add gdb support
Diffstat (limited to 'test')
-rwxr-xr-x | test/udev-test.pl | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl index d9b7967004..126eab9869 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -22,7 +22,9 @@ use strict; my $udev_bin = "./test-udev"; my $valgrind = 0; +my $gdb = 0; my $udev_bin_valgrind = "valgrind --tool=memcheck --leak-check=yes --quiet $udev_bin"; +my $udev_bin_gdb = "gdb --args $udev_bin"; my $udev_dev = "test/dev"; my $udev_run = "test/run"; my $udev_rules_dir = "$udev_run/udev/rules.d"; @@ -1326,6 +1328,8 @@ sub udev { if ($valgrind > 0) { system("$udev_bin_valgrind $action $devpath"); + } elsif ($gdb > 0) { + system("$udev_bin_gdb $action $devpath"); } else { system("$udev_bin", "$action", "$devpath"); } @@ -1502,6 +1506,9 @@ foreach my $arg (@ARGV) { if ($arg =~ m/--valgrind/) { $valgrind = 1; printf("using valgrind\n"); + } elsif ($arg =~ m/--gdb/) { + $gdb = 1; + printf("using gdb\n"); } else { push(@list, $arg); } |