gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly
MFC after: 5 weeks Sponsored by: Dell EMC Isilon
This commit is contained in:
parent
e02a067a1a
commit
b58910a05f
8
tools/regression/geom_gpt/Makefile
Normal file
8
tools/regression/geom_gpt/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
# $FreeBSD$
|
||||
|
||||
PROG= gctl_test_helper
|
||||
MAN=
|
||||
|
||||
LIBADD+= geom
|
||||
|
||||
.include <bsd.prog.mk>
|
@ -26,11 +26,6 @@
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
my $srcdir = `dirname $0`;
|
||||
chomp $srcdir;
|
||||
|
||||
my $cmd = "/tmp/gctl-$$";
|
||||
my $out = "$cmd.out";
|
||||
my $disk = "/tmp/disk-$$";
|
||||
my $mntpt = "/tmp/mount-$$";
|
||||
|
||||
@ -132,11 +127,14 @@ if (exists $ENV{'TEST_VERBOSE'}) {
|
||||
}
|
||||
|
||||
# Compile the driver...
|
||||
my $st = system("cc -o $cmd -g $srcdir/gctl_test_helper.c -lgeom");
|
||||
my $st = system("make obj && make all");
|
||||
if ($st != 0) {
|
||||
print "1..0 # SKIP error compiling test.c\n";
|
||||
exit 0;
|
||||
}
|
||||
chomp(my $cmd = `make '-V\${.OBJDIR}/\${PROG}'`);
|
||||
|
||||
my $out = "/tmp/$cmd.out";
|
||||
|
||||
# Make sure we have permission to use gctl...
|
||||
if (`$cmd` =~ "^FAIL Permission denied") {
|
||||
|
Loading…
Reference in New Issue
Block a user