diff options
author | Enji Cooper <ngie@FreeBSD.org> | 2017-04-22 20:15:47 +0000 |
---|---|---|
committer | Enji Cooper <ngie@FreeBSD.org> | 2017-04-22 20:15:47 +0000 |
commit | b58910a05f4669b5e83607ae8079aad72aecacba (patch) | |
tree | e667d7fe3068f71826ad2bfb2f0b896789869081 /tools | |
parent | e02a067a1ae7959b4fdb834461ff805384e18114 (diff) | |
download | src-b58910a05f4669b5e83607ae8079aad72aecacba.tar.gz src-b58910a05f4669b5e83607ae8079aad72aecacba.zip |
gctl_test.t: use make to compile gctl_test_helper instead of calling cc directly
MFC after: 5 weeks
Sponsored by: Dell EMC Isilon
Notes
Notes:
svn path=/head/; revision=317292
Diffstat (limited to 'tools')
-rw-r--r-- | tools/regression/geom_gpt/Makefile | 8 | ||||
-rw-r--r-- | tools/regression/geom_gpt/gctl_test.t | 10 |
2 files changed, 12 insertions, 6 deletions
diff --git a/tools/regression/geom_gpt/Makefile b/tools/regression/geom_gpt/Makefile new file mode 100644 index 000000000000..eb5a9659ff4f --- /dev/null +++ b/tools/regression/geom_gpt/Makefile @@ -0,0 +1,8 @@ +# $FreeBSD$ + +PROG= gctl_test_helper +MAN= + +LIBADD+= geom + +.include <bsd.prog.mk> diff --git a/tools/regression/geom_gpt/gctl_test.t b/tools/regression/geom_gpt/gctl_test.t index 3c019108a7ad..1e526fc227af 100644 --- a/tools/regression/geom_gpt/gctl_test.t +++ b/tools/regression/geom_gpt/gctl_test.t @@ -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") { |