From bd4d4080d81b0bda395a796c185de227fb90ac23 Mon Sep 17 00:00:00 2001
From: Danny Auble <da@llnl.gov>
Date: Wed, 12 Sep 2007 18:44:44 +0000
Subject: [PATCH] fix to work in not standard installs.  added a build_dir var
 for globals to say where config.h is

---
 testsuite/expect/globals         | 1 +
 testsuite/expect/test1.89        | 2 +-
 testsuite/expect/test1.89.prog.c | 2 +-
 testsuite/expect/test1.91        | 2 +-
 testsuite/expect/test1.91.prog.c | 2 +-
 5 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/testsuite/expect/globals b/testsuite/expect/globals
index 0229e75001b..b313a8cd49f 100755
--- a/testsuite/expect/globals
+++ b/testsuite/expect/globals
@@ -53,6 +53,7 @@ if [file exists globals.local] {
 # Used to locate binaries, libraries, and header files.
 #
 cset slurm_dir   "/usr"
+cset build_dir   "../../"
 cset sacct       "${slurm_dir}/bin/sacct"
 cset salloc      "${slurm_dir}/bin/salloc"
 cset sattach     "${slurm_dir}/bin/sattach"
diff --git a/testsuite/expect/test1.89 b/testsuite/expect/test1.89
index 6778c1dc317..da1a4aa8501 100755
--- a/testsuite/expect/test1.89
+++ b/testsuite/expect/test1.89
@@ -64,7 +64,7 @@ send_user "\ntask affinity plugin installed\n"
 # Build a test program to report affinity by task
 #
 exec $bin_rm -f $file_prog
-exec $bin_make -f /dev/null $file_prog
+exec $bin_cc -I$build_dir $file_prog.c -o $file_prog
 exec $bin_chmod 700 $file_prog
 
 #
diff --git a/testsuite/expect/test1.89.prog.c b/testsuite/expect/test1.89.prog.c
index bcd2c40ec02..46828790188 100644
--- a/testsuite/expect/test1.89.prog.c
+++ b/testsuite/expect/test1.89.prog.c
@@ -32,7 +32,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "../../config.h"
+#include "config.h"
 
 static void _load_mask(cpu_set_t *mask)
 {
diff --git a/testsuite/expect/test1.91 b/testsuite/expect/test1.91
index 3b5d65ffc54..f091f175e2c 100644
--- a/testsuite/expect/test1.91
+++ b/testsuite/expect/test1.91
@@ -93,7 +93,7 @@ send_user "Node config: Sockets=$num_sockets Cores=$num_cores Threads=$num_threa
 # Build a test program to report affinity by task
 #
 exec $bin_rm -f $file_prog
-exec $bin_make -f /dev/null $file_prog
+exec $bin_cc -I$build_dir $file_prog.c -o $file_prog
 exec $bin_chmod 700 $file_prog
 
 #
diff --git a/testsuite/expect/test1.91.prog.c b/testsuite/expect/test1.91.prog.c
index bcd2c40ec02..46828790188 100644
--- a/testsuite/expect/test1.91.prog.c
+++ b/testsuite/expect/test1.91.prog.c
@@ -32,7 +32,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
-#include "../../config.h"
+#include "config.h"
 
 static void _load_mask(cpu_set_t *mask)
 {
-- 
GitLab