diff mbox series

[v3,10/10] linux-gen: use EXEEXT in shmem_linux test

Message ID 1508302806-20268-11-git-send-email-odpbot@yandex.ru
State Superseded
Headers show
Series [v3,1/10] configure: odp_openssl: use AS_HELP_STRING | expand

Commit Message

Github ODP bot Oct. 18, 2017, 5 a.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Use EXEEXT environment variable when calling test programs during
shmem_linux test.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 235 (lumag:plat-def-2)
 ** https://github.com/Linaro/odp/pull/235
 ** Patch: https://github.com/Linaro/odp/pull/235.patch
 ** Base sha: ec0c3145fcafa09ae3a79875e7e07dd4794583cc
 ** Merge commit sha: c7d08f738718f049cece37227820be39f1274875
 **/
 platform/linux-generic/test/validation/api/shmem/shmem_linux.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/test/validation/api/shmem/shmem_linux.c b/platform/linux-generic/test/validation/api/shmem/shmem_linux.c
index 10bbb6a47..7f0343cfd 100644
--- a/platform/linux-generic/test/validation/api/shmem/shmem_linux.c
+++ b/platform/linux-generic/test/validation/api/shmem/shmem_linux.c
@@ -218,10 +218,14 @@  int main(int argc __attribute__((unused)), char *argv[])
 	int app2_status;
 	uid_t uid = getuid();
 	char *shm_dir = getenv("ODP_SHM_DIR");
+	const char *exeext = getenv("EXEEXT");
+
+	if (exeext == NULL)
+		exeext = "";
 
 	/* odp_app1 is in the same directory as this file: */
 	strncpy(prg_name, argv[0], PATH_MAX - 1);
-	sprintf(odp_name1, "%s/%s", dirname(prg_name), ODP_APP1_NAME);
+	sprintf(odp_name1, "%s/%s%s", dirname(prg_name), ODP_APP1_NAME, exeext);
 
 	/* start the ODP application: */
 	odp_app1 = fork();
@@ -292,7 +296,7 @@  int main(int argc __attribute__((unused)), char *argv[])
 
 	/* odp_app2 is in the same directory as this file: */
 	strncpy(prg_name, argv[0], PATH_MAX - 1);
-	sprintf(odp_name2, "%s/%s", dirname(prg_name), ODP_APP2_NAME);
+	sprintf(odp_name2, "%s/%s%s", dirname(prg_name), ODP_APP2_NAME, exeext);
 
 	/* start the second ODP application with pid of ODP_APP1 as parameter:*/
 	sprintf(pid1, "%d", odp_app1);