summaryrefslogtreecommitdiff
path: root/tests/scripts/features/loadapi
diff options
context:
space:
mode:
authorJinWang An <jinwang.an@samsung.com>2021-12-28 15:15:18 +0900
committerJinWang An <jinwang.an@samsung.com>2021-12-28 15:15:18 +0900
commit62e818d0e4e064f6da403cbf516dc7a7301ec569 (patch)
tree6460e009c267f3712a693403b2dbdf161ab0941b /tests/scripts/features/loadapi
parente15597c3e85dedc015ff923a88febd46a1551f71 (diff)
downloadmake-62e818d0e4e064f6da403cbf516dc7a7301ec569.tar.gz
make-62e818d0e4e064f6da403cbf516dc7a7301ec569.tar.bz2
make-62e818d0e4e064f6da403cbf516dc7a7301ec569.zip
Imported Upstream version 4.1upstream/4.1
Diffstat (limited to 'tests/scripts/features/loadapi')
-rw-r--r--tests/scripts/features/loadapi12
1 files changed, 8 insertions, 4 deletions
diff --git a/tests/scripts/features/loadapi b/tests/scripts/features/loadapi
index 6d3b03f..8c824c0 100644
--- a/tests/scripts/features/loadapi
+++ b/tests/scripts/features/loadapi
@@ -6,8 +6,6 @@ $details = "Verify the different aspects of the shared object API.";
# Don't do anything if this system doesn't support "load"
exists $FEATURES{load} or return -1;
-my $sobuild = '$(CC) '.($srcdir? "-I$srcdir":'').' -g -shared -fPIC -o $@ $<';
-
# First build a shared object
# Provide both a default and non-default load symbol
@@ -38,7 +36,7 @@ test_expand (const char *val)
static char *
test_noexpand (const char *val)
{
- char *str = gmk_alloc (strlen (val));
+ char *str = gmk_alloc (strlen (val) + 1);
strcpy (str, val);
return str;
}
@@ -74,7 +72,13 @@ testapi_gmk_setup ()
EOF
close($F) or die "close: testapi.c: $!\n";
-run_make_test('testapi.so: testapi.c ; @'.$sobuild, '', '');
+my $sobuild = "$CONFIG_FLAGS{CC} ".($srcdir? "-I$srcdir":'')." $CONFIG_FLAGS{CPPFLAGS} $CONFIG_FLAGS{CFLAGS} -shared -fPIC $CONFIG_FLAGS{LDFLAGS} -o testapi.so testapi.c";
+
+my $clog = `$sobuild 2>&1`;
+if ($? != 0) {
+ $verbose and print "Failed to build testapi.so:\n$sobuild\n$_";
+ return -1;
+}
# TEST 1
# Check the gmk_expand() function