Author: ngie
Date: Sat Apr 22 20:15:47 2017
New Revision: 317292
URL: https://svnweb.freebsd.org/changeset/base/317292

Log:
  gctl_test.t: use make to compile gctl_test_helper instead of calling cc 
directly
  
  MFC after:    5 weeks
  Sponsored by: Dell EMC Isilon

Added:
  head/tools/regression/geom_gpt/Makefile   (contents, props changed)
Modified:
  head/tools/regression/geom_gpt/gctl_test.t

Added: head/tools/regression/geom_gpt/Makefile
==============================================================================
--- /dev/null   00:00:00 1970   (empty, because file is newly added)
+++ head/tools/regression/geom_gpt/Makefile     Sat Apr 22 20:15:47 2017        
(r317292)
@@ -0,0 +1,8 @@
+# $FreeBSD$
+
+PROG=  gctl_test_helper
+MAN=
+
+LIBADD+=       geom
+
+.include <bsd.prog.mk>

Modified: head/tools/regression/geom_gpt/gctl_test.t
==============================================================================
--- head/tools/regression/geom_gpt/gctl_test.t  Sat Apr 22 20:06:11 2017        
(r317291)
+++ head/tools/regression/geom_gpt/gctl_test.t  Sat Apr 22 20:15:47 2017        
(r317292)
@@ -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") {
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to