2004-08-18 16:33:01 +00:00
|
|
|
/*
|
2004-11-22 01:38:40 +00:00
|
|
|
* Copyright (c) 2004-2005 The Trustees of Indiana University.
|
|
|
|
* All rights reserved.
|
|
|
|
* Copyright (c) 2004-2005 The Trustees of the University of Tennessee.
|
|
|
|
* All rights reserved.
|
2004-11-28 20:09:25 +00:00
|
|
|
* Copyright (c) 2004-2005 High Performance Computing Center Stuttgart,
|
|
|
|
* University of Stuttgart. All rights reserved.
|
2004-11-22 01:38:40 +00:00
|
|
|
* $COPYRIGHT$
|
|
|
|
*
|
|
|
|
* Additional copyrights may follow
|
|
|
|
*
|
2004-08-18 16:33:01 +00:00
|
|
|
* $HEADER$
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#include "ompi_config.h"
|
|
|
|
#include "support.h"
|
|
|
|
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "mca/pcm/base/base.h"
|
2004-09-03 19:19:59 +00:00
|
|
|
#include "util/argv.h"
|
2004-08-18 16:33:01 +00:00
|
|
|
|
|
|
|
char *env[] = {
|
|
|
|
"ENV0=",
|
|
|
|
"OMPI_MCA_CONFIG_FOO=blah",
|
|
|
|
"ENV1=blah blah blah",
|
|
|
|
"FOO_OMPI_MCA_BLAH=hi there",
|
|
|
|
"ENV2=foo bar is fun",
|
|
|
|
"ENV3=123",
|
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
|
|
|
{
|
|
|
|
int ret;
|
|
|
|
int len = 0;
|
|
|
|
char ** out = NULL;
|
|
|
|
int i;
|
|
|
|
|
|
|
|
test_init("sched_comm_t");
|
|
|
|
|
|
|
|
len = ompi_argv_count(env);
|
|
|
|
if (len != 6) {
|
|
|
|
test_failure( "ompi_argv_count(env) failed" );
|
|
|
|
} else {
|
|
|
|
test_success();
|
|
|
|
}
|
|
|
|
|
|
|
|
ret = mca_pcm_base_build_base_env(env, &out);
|
|
|
|
if (OMPI_SUCCESS != ret) {
|
|
|
|
test_failure("mca_pcm_base_build_base_env");
|
|
|
|
} else {
|
|
|
|
test_success();
|
|
|
|
}
|
|
|
|
|
|
|
|
len = ompi_argv_count(out);
|
|
|
|
if (len != 1) {
|
|
|
|
printf("out:\n");
|
|
|
|
for (i = 0 ; out[i] != NULL ; ++i) {
|
|
|
|
printf("\t%s\n", out[i]);
|
|
|
|
}
|
|
|
|
test_failure("ompi_argv_count(out)");
|
|
|
|
} else {
|
|
|
|
test_success();
|
|
|
|
}
|
|
|
|
|
|
|
|
test_finalize();
|
|
|
|
return 0;
|
|
|
|
}
|